use of com.extjs.gxt.ui.client.widget.TabPanel in project kapua by eclipse.
the class DeviceTabConfiguration method onRender.
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setId("DeviceTabsContainer");
setLayout(new FitLayout());
m_tabsPanel = new TabPanel();
m_tabsPanel.setPlain(true);
m_tabsPanel.setBorders(false);
m_tabsPanel.setTabPosition(TabPosition.BOTTOM);
m_tabComponents = new TabItem(msgs.deviceConfigComponents());
m_tabComponents.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.component()));
m_tabComponents.setBorders(false);
m_tabComponents.setLayout(new FitLayout());
m_tabComponents.add(m_configComponents);
m_tabComponents.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_configComponents.refresh();
}
});
m_tabsPanel.add(m_tabComponents);
m_tabSnapshots = new TabItem(msgs.deviceConfigSnapshots());
m_tabSnapshots.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.snapshots()));
m_tabSnapshots.setBorders(false);
m_tabSnapshots.setLayout(new FitLayout());
m_tabSnapshots.add(m_configSnapshots);
m_tabSnapshots.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_configSnapshots.refresh();
}
});
m_tabsPanel.add(m_tabSnapshots);
add(m_tabsPanel);
}
use of com.extjs.gxt.ui.client.widget.TabPanel in project kapua by eclipse.
the class DeviceTabs method onRender.
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setId("DeviceTabsContainer");
setLayout(new FitLayout());
m_tabsPanel = new TabPanel();
m_tabsPanel.setPlain(true);
m_tabsPanel.setBorders(false);
m_tabsPanel.setBodyBorder(false);
m_tabsPanel.setStyleAttribute("padding-top", "5px");
m_tabProfile = new TabItem(MSGS.deviceTabDescription());
m_tabProfile.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.deviceProfile()));
m_tabProfile.setBorders(true);
m_tabProfile.setLayout(new FitLayout());
m_tabProfile.add(m_deviceProfileTab);
m_tabProfile.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_deviceProfileTab.refresh();
}
});
m_tabsPanel.add(m_tabProfile);
m_tabHistory = new TabItem(MSGS.tabHistory());
m_tabHistory.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.history()));
m_tabHistory.setBorders(true);
m_tabHistory.setLayout(new FitLayout());
m_tabHistory.add(m_deviceHistoryTab);
m_tabHistory.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_deviceHistoryTab.refresh();
}
});
m_tabsPanel.add(m_tabHistory);
m_tabPackages = new TabItem(MSGS.tabPackages());
m_tabPackages.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.package16()));
m_tabPackages.setBorders(true);
m_tabPackages.setLayout(new FitLayout());
m_tabPackages.add(m_devicePackagesTab);
m_tabPackages.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_devicePackagesTab.refresh();
}
});
m_tabsPanel.add(m_tabPackages);
m_tabBundles = new TabItem(MSGS.tabBundles());
m_tabBundles.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.bundles()));
m_tabBundles.setBorders(true);
m_tabBundles.setLayout(new FitLayout());
m_tabBundles.add(m_deviceBundlesTab);
m_tabBundles.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_deviceBundlesTab.refresh();
}
});
m_tabsPanel.add(m_tabBundles);
m_tabConfiguration = new TabItem(MSGS.tabConfiguration());
m_tabConfiguration.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.configuration()));
m_tabConfiguration.setBorders(true);
m_tabConfiguration.setLayout(new FitLayout());
m_tabConfiguration.add(m_deviceConfigTab);
m_tabConfiguration.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_deviceConfigTab.refresh();
}
});
m_tabsPanel.add(m_tabConfiguration);
m_tabCommand = new TabItem(MSGS.tabCommand());
m_tabCommand.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.terminal()));
m_tabCommand.setBorders(false);
m_tabCommand.setLayout(new FitLayout());
m_tabCommand.add(m_deviceCommandTab);
m_tabCommand.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_deviceCommandTab.refresh();
}
});
m_tabsPanel.add(m_tabCommand);
add(m_tabsPanel);
}
use of com.extjs.gxt.ui.client.widget.TabPanel in project kapua by eclipse.
the class DevicesView method onRender.
protected void onRender(final Element parent, int index) {
super.onRender(parent, index);
// FitLayout that expands to the whole screen
setLayout(new FitLayout());
setBorders(false);
LayoutContainer mf = new LayoutContainer();
mf.setBorders(false);
mf.setLayout(new BorderLayout());
// East Panel: Filtering menu
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 220);
eastData.setMargins(new Margins(0, 0, 0, 0));
eastData.setCollapsible(false);
eastData.setSplit(false);
m_deviceFilterPanel = new DeviceFilterPanel(m_currentSession);
ContentPanel panel = new ContentPanel();
panel.setLayout(new FitLayout());
panel.setBorders(false);
panel.setBodyBorder(false);
panel.setHeading(MSGS.deviceFilteringPanelHeading());
panel.add(m_deviceFilterPanel);
mf.add(panel, eastData);
// Center Main panel:
BorderLayoutData centerMainPanel = new BorderLayoutData(LayoutRegion.CENTER);
centerMainPanel.setMargins(new Margins(0, 5, 0, 0));
centerMainPanel.setSplit(false);
LayoutContainer resultContainer = new LayoutContainer(new BorderLayout());
resultContainer.setBorders(false);
mf.add(resultContainer, centerMainPanel);
//
// North Panel: Devices Table and Map Tabs
m_deviceTable = new DevicesTable(this, m_currentSession, panel);
m_deviceFilterPanel.setDeviceTable(m_deviceTable);
m_deviceMap = new DevicesMap(this, m_currentSession);
m_tabsPanel = new TabPanel();
m_tabsPanel.setPlain(false);
m_tabsPanel.setBorders(false);
m_tabsPanel.setBodyBorder(true);
m_tabTable = new TabItem(MSGS.tabTable());
m_tabTable.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.table()));
m_tabTable.setBorders(false);
m_tabTable.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_deviceTable.refresh(new GwtDeviceQueryPredicates());
}
});
m_tabTable.setLayout(new FitLayout());
m_tabTable.add(m_deviceTable);
m_tabsPanel.add(m_tabTable);
m_tabMap = new TabItem(MSGS.tabMap());
m_tabMap.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.deviceMap()));
m_tabMap.setBorders(false);
m_tabMap.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
m_deviceMap.refresh(new GwtDeviceQueryPredicates());
}
});
m_tabMap.setLayout(new FitLayout());
m_tabMap.add(m_deviceMap);
m_tabsPanel.add(m_tabMap);
BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, .45F);
northData.setMargins(new Margins(0, 0, 0, 0));
northData.setSplit(true);
northData.setMinSize(0);
resultContainer.add(m_tabsPanel, northData);
//
// Center Panel: Profile and History Tabs
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER, .55F);
centerData.setMargins(new Margins(5, 0, 0, 0));
centerData.setCollapsible(true);
centerData.setHideCollapseTool(true);
centerData.setSplit(true);
m_deviceTabs = new DeviceTabs(m_deviceTable, m_deviceFilterPanel, m_currentSession);
resultContainer.add(m_deviceTabs, centerData);
add(mf);
}
use of com.extjs.gxt.ui.client.widget.TabPanel in project kapua by eclipse.
the class TabbedDialog method onRender.
@Override
protected void onRender(Element parent, int pos) {
super.onRender(parent, pos);
//
// Tabs setup
m_tabsPanel = new TabPanel();
m_tabsPanel.setPlain(true);
m_tabsPanel.setBorders(false);
m_tabsPanel.setHeight(1000);
m_tabsPanel.setBodyBorder(false);
createTabItems();
// Color tab items background
for (TabItem t : m_tabsPanel.getItems()) {
t.setStyleAttribute("background-color", "#E8E8E8");
}
m_formPanel.add(m_tabsPanel);
}
use of com.extjs.gxt.ui.client.widget.TabPanel in project kura by eclipse.
the class SettingsTabs method onRender.
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setId("settings-tabs-wrapper");
setLayout(new FitLayout());
m_tabsPanel = new TabPanel();
m_tabsPanel.setPlain(true);
m_tabsPanel.setBorders(false);
m_tabsPanel.setBodyBorder(false);
m_tabsPanel.setStyleAttribute("padding-top", "5px");
m_snapshotsConfig = new TabItem(MSGS.settingsSnapshots());
m_snapshotsConfig.setIcon(AbstractImagePrototype.create(Resources.INSTANCE.snapshots()));
m_snapshotsConfig.setBorders(true);
m_snapshotsConfig.setLayout(new FitLayout());
m_snapshotsConfig.add(m_snapshotsTab);
m_applicationCertsConfig = new TabItem(MSGS.settingsAddBundleCerts());
m_applicationCertsConfig.setBorders(true);
m_applicationCertsConfig.setLayout(new FitLayout());
m_applicationCertsConfig.add(m_bundleCertsTab);
m_sslConfig = new TabItem(MSGS.settingsSSLConfiguration());
m_sslConfig.setBorders(true);
m_sslConfig.setLayout(new FitLayout());
m_sslConfig.add(m_sslTab);
m_serverSSLConfig = new TabItem(MSGS.settingsAddCertificates());
m_serverSSLConfig.setBorders(true);
m_serverSSLConfig.setLayout(new FitLayout());
m_serverSSLConfig.add(m_serverSSLTab);
m_deviceSSLConfig = new TabItem(MSGS.settingsAddMAuthCertificates());
m_deviceSSLConfig.setBorders(true);
m_deviceSSLConfig.setLayout(new FitLayout());
m_deviceSSLConfig.add(m_deviceSSLTab);
m_securityConfig = new TabItem(MSGS.settingsSecurityOptions());
m_securityConfig.setBorders(true);
m_securityConfig.setLayout(new FitLayout());
m_securityConfig.add(m_securityTab);
AsyncCallback<Boolean> callback = new AsyncCallback<Boolean>() {
public void onFailure(Throwable caught) {
m_tabsPanel.add(m_snapshotsConfig);
m_tabsPanel.add(m_sslConfig);
m_tabsPanel.add(m_serverSSLConfig);
m_tabsPanel.add(m_deviceSSLConfig);
}
public void onSuccess(Boolean result) {
m_tabsPanel.add(m_snapshotsConfig);
if (result) {
m_tabsPanel.add(m_applicationCertsConfig);
}
m_tabsPanel.add(m_sslConfig);
m_tabsPanel.add(m_serverSSLConfig);
m_tabsPanel.add(m_deviceSSLConfig);
if (result) {
m_tabsPanel.add(m_securityConfig);
}
}
};
gwtSecurityService.isSecurityServiceAvailable(callback);
add(m_tabsPanel);
}
Aggregations