Example usage for javax.swing JTabbedPane WRAP_TAB_LAYOUT

List of usage examples for javax.swing JTabbedPane WRAP_TAB_LAYOUT

Introduction

In this page you can find the example usage for javax.swing JTabbedPane WRAP_TAB_LAYOUT.

Prototype

int WRAP_TAB_LAYOUT

To view the source code for javax.swing JTabbedPane WRAP_TAB_LAYOUT.

Click Source Link

Document

The tab layout policy for wrapping tabs in multiple runs when all tabs will not fit within a single run.

Usage

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingTagEltJTabbedPane.java

public CFAccSwingTagEltJTabbedPane(ICFAccSwingSchema argSchema, ICFAccTagObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }/*www  .ja va2s. c  o  m*/
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsTag(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabChildrenTaggedAddressList, getTabViewChildrenTaggedAddressListJPanel());
    addTab(LABEL_TabChildrenTaggedAttachList, getTabViewChildrenTaggedAttachListJPanel());
    addTab(LABEL_TabChildrenTaggedContactsList, getTabViewChildrenTaggedContactsListJPanel());
    addTab(LABEL_TabChildrenTaggedMemoList, getTabViewChildrenTaggedMemoListJPanel());
    addTab(LABEL_TabChildrenTaggedPhoneList, getTabViewChildrenTaggedPhoneListJPanel());
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfgcash.v2_0.CFGCashSwing.CFGCashSwingTagEltJTabbedPane.java

public CFGCashSwingTagEltJTabbedPane(ICFGCashSwingSchema argSchema, ICFGCashTagObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }/* w ww  .j a  v a2 s .com*/
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsTag(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabChildrenTaggedAddressList, getTabViewChildrenTaggedAddressListJPanel());
    addTab(LABEL_TabChildrenTaggedAttachList, getTabViewChildrenTaggedAttachListJPanel());
    addTab(LABEL_TabChildrenTaggedContactsList, getTabViewChildrenTaggedContactsListJPanel());
    addTab(LABEL_TabChildrenTaggedMemoList, getTabViewChildrenTaggedMemoListJPanel());
    addTab(LABEL_TabChildrenTaggedPhoneList, getTabViewChildrenTaggedPhoneListJPanel());
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_2.CFAstSwing.CFAstSwingSysClusterEltJTabbedPane.java

public CFAstSwingSysClusterEltJTabbedPane(ICFAstSwingSchema argSchema, ICFAstSysClusterObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }/*w w  w  . j a  va 2  s.  c  o  m*/
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSysCluster(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswSwing.CFFswSwingSecUserEltJTabbedPane.java

public CFFswSwingSecUserEltJTabbedPane(ICFFswSwingSchema argSchema, ICFFswSecUserObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }//  w  w  w  .  j ava2s.c  o m
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecUser(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabComponentsSecDevList, getTabViewComponentsSecDevListJPanel());
    addTab(LABEL_TabComponentsSecSessList, getTabViewComponentsSecSessListJPanel());
    addTab(LABEL_TabChildrenSecProxyList, getTabViewChildrenSecProxyListJPanel());
    addTab(LABEL_TabChildrenSecGroupMemberList, getTabViewChildrenSecGroupMemberListJPanel());
    addTab(LABEL_TabChildrenTSecGroupMemberList, getTabViewChildrenTSecGroupMemberListJPanel());
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstSwing.CFAstSwingSecUserEltJTabbedPane.java

public CFAstSwingSecUserEltJTabbedPane(ICFAstSwingSchema argSchema, ICFAstSecUserObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }//from   w w w  . j  a  va2s . c  o m
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecUser(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabComponentsSecDevList, getTabViewComponentsSecDevListJPanel());
    addTab(LABEL_TabComponentsSecSessList, getTabViewComponentsSecSessListJPanel());
    addTab(LABEL_TabChildrenSecProxyList, getTabViewChildrenSecProxyListJPanel());
    addTab(LABEL_TabChildrenSecGroupMemberList, getTabViewChildrenSecGroupMemberListJPanel());
    addTab(LABEL_TabChildrenTSecGroupMemberList, getTabViewChildrenTSecGroupMemberListJPanel());
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfensyntax.v2_1.CFEnSyntaxSwing.CFEnSyntaxSwingSecUserEltJTabbedPane.java

public CFEnSyntaxSwingSecUserEltJTabbedPane(ICFEnSyntaxSwingSchema argSchema, ICFEnSyntaxSecUserObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }/*from  www  .  j  ava2 s  . c o m*/
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecUser(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabComponentsSecDevList, getTabViewComponentsSecDevListJPanel());
    addTab(LABEL_TabComponentsSecSessList, getTabViewComponentsSecSessListJPanel());
    addTab(LABEL_TabChildrenSecProxyList, getTabViewChildrenSecProxyListJPanel());
    addTab(LABEL_TabChildrenSecGroupMemberList, getTabViewChildrenSecGroupMemberListJPanel());
    addTab(LABEL_TabChildrenTSecGroupMemberList, getTabViewChildrenTSecGroupMemberListJPanel());
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingContactEltJTabbedPane.java

public CFAccSwingContactEltJTabbedPane(ICFAccSwingSchema argSchema, ICFAccContactObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }/* ww w.  j a v  a 2 s.  c o  m*/
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsContact(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabComponentsTagList, getTabViewComponentsTagListJPanel());
    addTab(LABEL_TabComponentsAddressList, getTabViewComponentsAddressListJPanel());
    addTab(LABEL_TabComponentsPhoneList, getTabViewComponentsPhoneListJPanel());
    addTab(LABEL_TabComponentsContactURLList, getTabViewComponentsContactURLListJPanel());
    addTab(LABEL_TabComponentsMemoList, getTabViewComponentsMemoListJPanel());
    addTab(LABEL_TabChildrenAccContList, getTabViewChildrenAccContListJPanel());
    swingIsInitializing = false;
}

From source file:TabbedPaneTest.java

public TabbedPaneFrame() {
    setTitle("TabbedPaneTest");
    setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);

    tabbedPane = new JTabbedPane();
    // we set the components to null and delay their loading until the tab is shown
    // for the first time

    ImageIcon icon = new ImageIcon("yellow-ball.gif");

    tabbedPane.addTab("Mercury", icon, null);
    tabbedPane.addTab("Venus", icon, null);
    tabbedPane.addTab("Earth", icon, null);
    tabbedPane.addTab("Mars", icon, null);
    tabbedPane.addTab("Jupiter", icon, null);
    tabbedPane.addTab("Saturn", icon, null);
    tabbedPane.addTab("Uranus", icon, null);
    tabbedPane.addTab("Neptune", icon, null);
    tabbedPane.addTab("Pluto", null, null);

    final int plutoIndex = tabbedPane.indexOfTab("Pluto");
    JPanel plutoPanel = new JPanel();
    plutoPanel.add(new JLabel("Pluto", icon, SwingConstants.LEADING));
    JToggleButton plutoCheckBox = new JCheckBox();
    plutoCheckBox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            tabbedPane.remove(plutoIndex);
        }/*from  w  ww  .j a v a 2 s  .  c om*/
    });
    plutoPanel.add(plutoCheckBox);
    tabbedPane.setTabComponentAt(plutoIndex, plutoPanel);

    add(tabbedPane, "Center");

    tabbedPane.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent event) {

            // check if this tab still has a null component

            if (tabbedPane.getSelectedComponent() == null) {
                // set the component to the image icon

                int n = tabbedPane.getSelectedIndex();
                loadTab(n);
            }
        }
    });

    loadTab(0);

    JPanel buttonPanel = new JPanel();
    ButtonGroup buttonGroup = new ButtonGroup();
    JRadioButton wrapButton = new JRadioButton("Wrap tabs");
    wrapButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            tabbedPane.setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);
        }
    });
    buttonPanel.add(wrapButton);
    buttonGroup.add(wrapButton);
    wrapButton.setSelected(true);
    JRadioButton scrollButton = new JRadioButton("Scroll tabs");
    scrollButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
        }
    });
    buttonPanel.add(scrollButton);
    buttonGroup.add(scrollButton);
    add(buttonPanel, BorderLayout.SOUTH);
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_0.CFFswSwing.CFFswSwingFSSofiaEltJTabbedPane.java

public CFFswSwingFSSofiaEltJTabbedPane(ICFFswSwingSchema argSchema, ICFFswFSSofiaObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }//ww  w  .ja  v  a2s .  co m
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsFSSofia(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabComponentsConferenceList, getTabViewComponentsConferenceListJPanel());
    addTab(LABEL_TabComponentsDialerList, getTabViewComponentsDialerListJPanel());
    addTab(LABEL_TabComponentsDialplanList, getTabViewComponentsDialplanListJPanel());
    addTab(LABEL_TabComponentsDirectoryList, getTabViewComponentsDirectoryListJPanel());
    addTab(LABEL_TabComponentsGatewayList, getTabViewComponentsGatewayListJPanel());
    addTab(LABEL_TabComponentsProfileList, getTabViewComponentsProfileListJPanel());
    addTab(LABEL_TabComponentsVMailList, getTabViewComponentsVMailListJPanel());
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingTenantEltJTabbedPane.java

public CFAccSwingTenantEltJTabbedPane(ICFAccSwingSchema argSchema, ICFAccTenantObj argFocus) {
    super(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }//w ww. ja  v a2  s  .c o m
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsTenant(argFocus);
    // Wire the newly constructed JPanels/Tabs to this JTabbedPane
    addTab(LABEL_TabComponentsAcctCfgAttr, getTabViewComponentsAcctCfgAttrJScrollPane());
    addTab(LABEL_TabComponentsTSecGroupList, getTabViewComponentsTSecGroupListJPanel());
    addTab(LABEL_TabComponentsDomainBaseList, getTabViewComponentsDomainBaseListJPanel());
    addTab(LABEL_TabComponentsTLDList, getTabViewComponentsTLDListJPanel());
    addTab(LABEL_TabComponentsCtcListList, getTabViewComponentsCtcListListJPanel());
    addTab(LABEL_TabComponentsTagList, getTabViewComponentsTagListJPanel());
    addTab(LABEL_TabComponentsAccountList, getTabViewComponentsAccountListJPanel());
    swingIsInitializing = false;
}