use of com.extjs.gxt.ui.client.event.TabPanelEvent in project kura by eclipse.
the class FirewallConfigTabs method onRender.
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setId("firewall-tabs-wrapper");
setLayout(new FitLayout());
m_tabsPanel = new TabPanel();
m_tabsPanel.setPlain(true);
m_tabsPanel.setBorders(false);
m_tabsPanel.setStyleAttribute("padding-top", "5px");
m_tabOpenPortsConfig = new TabItem(MSGS.firewallOpenPorts());
m_tabOpenPortsConfig.setBorders(true);
m_tabOpenPortsConfig.setLayout(new FitLayout());
m_tabOpenPortsConfig.add(m_openPortsConfigTab);
m_tabOpenPortsConfig.addListener(Events.BeforeSelect, new Listener<TabPanelEvent>() {
public void handleEvent(final TabPanelEvent be) {
handleTabChangeEvent(m_openPortsConfigTab.isDirty(), be);
}
});
m_tabsPanel.add(m_tabOpenPortsConfig);
m_tabPortForwardingConfig = new TabItem(MSGS.firewallPortForwarding());
m_tabPortForwardingConfig.setBorders(true);
m_tabPortForwardingConfig.setLayout(new FitLayout());
m_tabPortForwardingConfig.add(m_portForwardingConfigTab);
m_tabPortForwardingConfig.addListener(Events.BeforeSelect, new Listener<TabPanelEvent>() {
public void handleEvent(final TabPanelEvent be) {
handleTabChangeEvent(m_portForwardingConfigTab.isDirty(), be);
}
});
m_tabsPanel.add(m_tabPortForwardingConfig);
m_tabNatConfig = new TabItem(MSGS.firewallNat());
m_tabNatConfig.setBorders(true);
m_tabNatConfig.setLayout(new FitLayout());
m_tabNatConfig.add(m_natConfigTab);
m_tabNatConfig.addListener(Events.BeforeSelect, new Listener<TabPanelEvent>() {
public void handleEvent(final TabPanelEvent be) {
handleTabChangeEvent(m_natConfigTab.isDirty(), be);
}
});
m_tabsPanel.add(m_tabNatConfig);
add(m_tabsPanel);
}
use of com.extjs.gxt.ui.client.event.TabPanelEvent in project kapua by eclipse.
the class AccountViewTabs method onRender.
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setLayout(new FitLayout());
m_tabsPanel = new TabPanel();
m_tabsPanel.setPlain(true);
m_tabsPanel.setBorders(false);
m_tabsPanel.setBodyBorder(false);
m_generalTab = new TabItem(MSGS.tabGeneral());
m_generalTab.setBorders(false);
m_generalTab.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.info16()));
m_generalTab.setLayout(new FitLayout());
m_generalTab.add(m_centerAccountViewGeneralTab);
m_generalTab.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_centerAccountViewGeneralTab.refresh();
}
});
m_tabsPanel.add(m_generalTab);
if (m_currentSession.hasUserReadPermission()) {
m_usersTab = new TabItem(MSGS.accountTabUsers());
m_usersTab.setBorders(false);
m_usersTab.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.users16()));
m_usersTab.setLayout(new FitLayout());
m_usersTab.add(m_centerAccountViewUserTab);
m_usersTab.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_centerAccountViewUserTab.refresh();
}
});
m_tabsPanel.add(m_usersTab);
}
m_tabsPanel.addListener(Events.Select, new Listener<TabPanelEvent>() {
public void handleEvent(TabPanelEvent tpe) {
TabItem tabItem = tpe.getItem();
if (tabItem.getItem(0) instanceof AccountDetailsView) {
AccountDetailsView generalTab = (AccountDetailsView) tabItem.getItem(0);
generalTab.refresh();
}
}
});
add(m_tabsPanel);
}
Aggregations