Class CTabbedPane

    • Constructor Detail

      • CTabbedPane

        public CTabbedPane()
        Creates an empty TabbedPane with a default tab placement of JTabbedPane.TOP and default tab layout policy of JTabbedPane.WRAP_TAB_LAYOUT.
      • CTabbedPane

        public CTabbedPane​(int tabPlacement)
        Creates an empty TabbedPane with the specified tab placement of either: JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHT, and a default tab layout policy of JTabbedPane.WRAP_TAB_LAYOUT.
        Parameters:
        tabPlacement - the placement for the tabs relative to the content
      • CTabbedPane

        public CTabbedPane​(int tabPlacement,
                           int tabLayoutPolicy)
        Creates an empty TabbedPane with the specified tab placement and tab layout policy. Tab placement may be either: JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHT. Tab layout policy may be either: JTabbedPane.WRAP_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUT.
        Parameters:
        tabPlacement - the placement for the tabs relative to the content
        tabLayoutPolicy - the policy for laying out tabs when all tabs will not fit on one run
        Throws:
        IllegalArgumentException - if tab placement or tab layout policy are not one of the above supported values
      • CTabbedPane

        public CTabbedPane​(CompiereColor bg)
        Creates an empty TabbedPane with a defaults and Color
        Parameters:
        bg - Color
    • Method Detail

      • setBackground

        public void setBackground​(Color bg)
        Set Background - ignored by UI -
        Overrides:
        setBackground in class JComponent
        Parameters:
        bg - ignored
      • setBackgroundColor

        public void setBackgroundColor()
        Set Standard Background
      • setBackgroundColor

        public void setBackgroundColor​(CompiereColor bg)
        Set Background
        Parameters:
        bg - AdempiereColor for Background, if null set standard background
      • getBackgroundColor

        public CompiereColor getBackgroundColor()
        Get Background
        Returns:
        Color for Background
      • insertTab

        public void insertTab​(String text,
                              Icon icon,
                              Component component,
                              String tip,
                              int index)
        Insert tab. If the component is a JPanel, the backround is set to the default AdempiereColor (and Opaque) if nothing was defined. Redquired as otherwise a gray background would be pained.

        Inserts a component, at index, represented by a title and/or icon, either of which may be null. If icon is non-null and it implements ImageIcon a corresponding disabled icon will automatically be created and set on the tabbedpane. Uses java.util.Vector internally, see insertElementAt for details of insertion conventions.

        Overrides:
        insertTab in class JTabbedPane
        Parameters:
        text - the title with Mnemonic to be displayed in this tab
        icon - the icon to be displayed in this tab
        component - The component to be displayed when this tab is clicked.
        tip - the tooltip to be displayed for this tab
        index - the position to insert this new tab
      • setTitleAt

        public void setTitleAt​(int index,
                               String text)
        Set Title At
        Overrides:
        setTitleAt in class JTabbedPane
        Parameters:
        index - index
        text - title with opt Mnemonic
      • setMnemonicAt

        public boolean setMnemonicAt​(int index,
                                     String text)
        Set Mnemonic for Index based on text
        Parameters:
        index - for index
        text - text
      • toString

        public String toString()
        String representation
        Overrides:
        toString in class Component
        Returns:
        String representation