Search in sources :

Example 6 with TabPanel

use of com.extjs.gxt.ui.client.widget.TabPanel in project kura by eclipse.

the class NetInterfaceConfigTabs method onRender.

protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    setId("network-tabs-wrapper");
    setLayout(new FitLayout());
    synchronized (m_tabsPanelLock) {
        m_tabsPanel = new TabPanel();
        m_tabsPanel.setPlain(true);
        m_tabsPanel.setBorders(false);
        m_tabsPanel.setStyleAttribute("padding-top", "5px");
        m_tabIPv4Config = new TabItem(MSGS.netIPv4());
        m_tabIPv4Config.setBorders(true);
        m_tabIPv4Config.setLayout(new FitLayout());
        m_tabIPv4Config.add(m_tcpIpConfigTab);
        m_tabIPv4Config.addListener(Events.Select, new Listener<ComponentEvent>() {

            public void handleEvent(ComponentEvent be) {
                m_tcpIpConfigTab.refresh();
            }
        });
        m_tabsPanel.add(m_tabIPv4Config);
        m_tabWirelessConfig = new TabItem(MSGS.netWifiWireless());
        m_tabWirelessConfig.setBorders(true);
        m_tabWirelessConfig.setLayout(new FitLayout());
        m_tabWirelessConfig.add(m_wirelessConfigTab);
        m_tabWirelessConfig.addListener(Events.Select, new Listener<ComponentEvent>() {

            public void handleEvent(ComponentEvent be) {
                m_wirelessConfigTab.refresh();
            }
        });
        m_tabsPanel.add(m_tabWirelessConfig);
        m_tabModemConfig = new TabItem(MSGS.netModemCellular());
        m_tabModemConfig.setBorders(true);
        m_tabModemConfig.setLayout(new FitLayout());
        m_tabModemConfig.add(m_modemConfigTab);
        m_tabModemConfig.addListener(Events.Select, new Listener<ComponentEvent>() {

            public void handleEvent(ComponentEvent be) {
                m_modemConfigTab.refresh();
            }
        });
        m_tabsPanel.add(m_tabModemConfig);
        m_tabModemGpsConfig = new TabItem(MSGS.netModemGps());
        m_tabModemGpsConfig.setBorders(true);
        m_tabModemGpsConfig.setLayout(new FitLayout());
        m_tabModemGpsConfig.add(m_modemGpsConfigTab);
        m_tabModemGpsConfig.addListener(Events.Select, new Listener<ComponentEvent>() {

            public void handleEvent(ComponentEvent be) {
                m_modemGpsConfigTab.refresh();
            }
        });
        m_tabsPanel.add(m_tabModemGpsConfig);
        m_tabDhcpNatConfig = new TabItem(MSGS.netRouter());
        m_tabDhcpNatConfig.setBorders(true);
        m_tabDhcpNatConfig.setLayout(new FitLayout());
        m_tabDhcpNatConfig.add(m_dhcpNatConfigTab);
        m_tabDhcpNatConfig.addListener(Events.Select, new Listener<ComponentEvent>() {

            public void handleEvent(ComponentEvent be) {
                m_dhcpNatConfigTab.refresh();
            }
        });
        m_tabsPanel.add(m_tabDhcpNatConfig);
        m_tabHardwareConfig = new TabItem(MSGS.netHwHardware());
        m_tabHardwareConfig.setBorders(true);
        m_tabHardwareConfig.setLayout(new FitLayout());
        m_tabHardwareConfig.add(m_hwConfigTab);
        m_tabHardwareConfig.addListener(Events.Select, new Listener<ComponentEvent>() {

            public void handleEvent(ComponentEvent be) {
                m_hwConfigTab.refresh();
            }
        });
        m_tabsPanel.add(m_tabHardwareConfig);
        add(m_tabsPanel);
    }
}
Also used : TabPanel(com.extjs.gxt.ui.client.widget.TabPanel) TabItem(com.extjs.gxt.ui.client.widget.TabItem) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 7 with TabPanel

use of com.extjs.gxt.ui.client.widget.TabPanel in project geo-platform by geosdi.

the class GeoPlatformLayoutManager method createSouth.

/**
 * Create South Panel in Main UI
 */
private void createSouth() {
    BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 200, 200, 200);
    southData.setMargins(new Margins(5, 0, 5, 5));
    southData.setSplit(true);
    southData.setCollapsible(true);
    southData.setFloatable(false);
    south = new ContentPanel();
    south.setBodyBorder(false);
    south.setLayout(new FitLayout());
    south.setLayoutOnChange(true);
    south.setScrollMode(Scroll.AUTOY);
    south.setHeaderVisible(false);
    // south.setScrollMode(Scroll.NONE);
    // south.setHeaderVisible(true);
    this.southTabPanel = new TabPanel();
    this.southTabPanel.setAutoWidth(true);
    this.southTabPanel.setAutoHeight(true);
    south.add(this.southTabPanel);
    south.hide();
    viewport.add(south, southData);
}
Also used : TabPanel(com.extjs.gxt.ui.client.widget.TabPanel) BorderLayoutData(com.extjs.gxt.ui.client.widget.layout.BorderLayoutData) Margins(com.extjs.gxt.ui.client.util.Margins) ContentPanel(com.extjs.gxt.ui.client.widget.ContentPanel) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 8 with TabPanel

use of com.extjs.gxt.ui.client.widget.TabPanel in project geo-platform by geosdi.

the class AdvancedGeocoderPluginManager method buildTabPanel.

private void buildTabPanel() {
    this.tabPanel = new TabPanel();
    this.tabPanel.setAutoWidth(true);
}
Also used : TabPanel(com.extjs.gxt.ui.client.widget.TabPanel)

Example 9 with TabPanel

use of com.extjs.gxt.ui.client.widget.TabPanel in project jahia by Jahia.

the class AbstractContentEngine method init.

protected void init(EngineContainer container) {
    this.container = container;
    setLayout(new FillLayout());
    addStyleName("content-engine");
    buttonBar = new ButtonBar();
    buttonBar.addStyleName("JahiaEditEngineButtonBar");
    container.setEngine(this, heading, buttonBar, null, this.getLinker());
    // init language switcher
    initLanguageSwitcher();
    // init tabs
    tabs = new TabPanel();
    tabs.setBodyBorder(false);
    tabs.setBorders(true);
    add(tabs);
    buttonBar.setAlignment(Style.HorizontalAlignment.CENTER);
    initFooter();
    container.getPanel().setFooter(true);
    loading();
}
Also used : TabPanel(com.extjs.gxt.ui.client.widget.TabPanel) ButtonBar(com.extjs.gxt.ui.client.widget.button.ButtonBar) FillLayout(com.extjs.gxt.ui.client.widget.layout.FillLayout)

Example 10 with TabPanel

use of com.extjs.gxt.ui.client.widget.TabPanel in project jahia by Jahia.

the class SidePanel method initTabs.

/**
 * Initializes the tabs based on the edit mode settings
 *
 * @param config the edit mode configuration settings
 */
public void initTabs(final GWTEditConfiguration config) {
    removeAll();
    tabs.clear();
    this.config = config;
    final Storage storage = Storage.getSessionStorageIfSupported();
    tabPanel = new TabPanel();
    tabPanel.setBorders(false);
    tabPanel.setBodyBorder(false);
    // this id is for the container, each tab has its own ID concatenated with this one
    tabPanel.setId("JahiaGxtSidePanelTabs");
    tabPanel.addListener(Events.Select, new Listener<TabPanelEvent>() {

        public void handleEvent(TabPanelEvent be) {
            SidePanelTabItem selectedTab = ((SidePanelTabItem) tabPanel.getSelectedItem().getData("tabItem"));
            selectedTab.refresh(selectedTab.getAutoRefreshData());
            updateRefreshButton();
            if (storage != null) {
                storage.setItem(SidePanel.this.config.getName() + "_selectedTab", Integer.toString(tabPanel.getItems().indexOf(tabPanel.getSelectedItem())));
            }
        }
    });
    int selectedTab = 0;
    if (storage != null && storage.getItem(config.getName() + "_selectedTab") != null) {
        selectedTab = Integer.parseInt(storage.getItem(config.getName() + "_selectedTab"));
    }
    final int selectedTabFinal = selectedTab;
    Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {

        @Override
        public void execute() {
            tabPanel.setSelection(tabPanel.getItem(selectedTabFinal));
        }
    });
    for (GWTSidePanelTab tabConfig : config.getTabs()) {
        SidePanelTabItem tabItem = tabConfig.getTabItem();
        tabs.add(tabItem);
        tabPanel.add(tabItem.create(tabConfig));
    }
    add(tabPanel);
}
Also used : TabPanel(com.extjs.gxt.ui.client.widget.TabPanel) Storage(com.google.gwt.storage.client.Storage) GWTSidePanelTab(org.jahia.ajax.gwt.client.data.toolbar.GWTSidePanelTab) Scheduler(com.google.gwt.core.client.Scheduler)

Aggregations

TabPanel (com.extjs.gxt.ui.client.widget.TabPanel)17 FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)13 TabItem (com.extjs.gxt.ui.client.widget.TabItem)12 ComponentEvent (com.extjs.gxt.ui.client.event.ComponentEvent)8 Margins (com.extjs.gxt.ui.client.util.Margins)3 TabPanelEvent (com.extjs.gxt.ui.client.event.TabPanelEvent)2 ContentPanel (com.extjs.gxt.ui.client.widget.ContentPanel)2 FieldSet (com.extjs.gxt.ui.client.widget.form.FieldSet)2 FormPanel (com.extjs.gxt.ui.client.widget.form.FormPanel)2 BorderLayoutData (com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)2 FormData (com.extjs.gxt.ui.client.widget.layout.FormData)2 FormLayout (com.extjs.gxt.ui.client.widget.layout.FormLayout)2 ButtonEvent (com.extjs.gxt.ui.client.event.ButtonEvent)1 FormEvent (com.extjs.gxt.ui.client.event.FormEvent)1 SelectionListener (com.extjs.gxt.ui.client.event.SelectionListener)1 LayoutContainer (com.extjs.gxt.ui.client.widget.LayoutContainer)1 Status (com.extjs.gxt.ui.client.widget.Status)1 Button (com.extjs.gxt.ui.client.widget.button.Button)1 ButtonBar (com.extjs.gxt.ui.client.widget.button.ButtonBar)1 FileUploadField (com.extjs.gxt.ui.client.widget.form.FileUploadField)1