Class jrad.util.FolderTabPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jrad.util.FolderTabPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----jrad.util.FolderTabPanel

public class FolderTabPanel
extends Panel
A panel that displays Windows 95-style folder tabs that displays discrete components when a tab is selected.

Variable Index

 o insets
The border within the FolderTabPanel to display between the rectangle and the contained components.
 o labels
The tab labels.
 o panels
The panels representing each tab.
 o selectedPanel
The label of the currently selected tab.
 o tabHeight
The height of the tabs.
 o tabWidthBuffer
The margin to the left and right of the tab text.
 o tabWidths
The widths of the tabs.

Constructor Index

 o FolderTabPanel()
Constructs a new FolderTabPanel.

Method Index

 o addPanel(Panel, String)
Adds a tab to the FolderTabPanel.
 o getSelectedPanel()
Returns the panel of the selected tab.
 o getSelectedPanelLabel()
Returns the label of the selected tab.
 o getTabHeight()
Returns the height of the tabs.
 o getTabWidthBuffer()
Returns the margin to the left and right of the tab text.
 o insets()
Returns the border within the FolderTabPanel to display between the rectangle and the contained components.
 o layout()
Performs a layout() that shapes the current tab into the FolderTabPanel.
 o mouseDown(Event, int, int)
Sets the selected tab when a tab is clicked.
 o paint(Graphics)
Paints the FolderTabPanel and its selected tab.
 o removePanel(String)
Removes a tab from the FolderTabPanel.
 o setInsets(Insets)
Sets the border within the FolderTabPanel to display between the rectangle and the contained components.
 o setPanel(String)
Sets the FolderTabPanel's active tab.
 o setTabHeight(int)
Sets the height of the tabs.
 o setTabWidthBuffer(int)
Sets the margin to the left and right of the tab text.

Variables

 o labels
  protected Vector labels
The tab labels.
 o panels
  protected Vector panels
The panels representing each tab.
 o tabWidths
  protected int tabWidths[]
The widths of the tabs.
 o selectedPanel
  protected String selectedPanel
The label of the currently selected tab.
 o insets
  protected Insets insets
The border within the FolderTabPanel to display between the rectangle and the contained components.
 o tabHeight
  protected int tabHeight
The height of the tabs.
 o tabWidthBuffer
  protected int tabWidthBuffer
The margin to the left and right of the tab text.

Constructors

 o FolderTabPanel
  public FolderTabPanel()
Constructs a new FolderTabPanel.

Methods

 o addPanel
  public void addPanel(Panel panel,
                       String label)
Adds a tab to the FolderTabPanel.
Parameters:
panel - the panel to display when the tab is selected
label - the tab label
 o removePanel
  public void removePanel(String label)
Removes a tab from the FolderTabPanel.
Parameters:
label - the label of the tab to remove.
 o setPanel
  public void setPanel(String label)
Sets the FolderTabPanel's active tab.
Parameters:
label - the label of the tab to select.
 o layout
  public void layout()
Performs a layout() that shapes the current tab into the FolderTabPanel.
Overrides:
layout in class Container
 o getSelectedPanelLabel
  public String getSelectedPanelLabel()
Returns the label of the selected tab.
 o getSelectedPanel
  public Panel getSelectedPanel()
Returns the panel of the selected tab.
 o insets
  public Insets insets()
Returns the border within the FolderTabPanel to display between the rectangle and the contained components.
Overrides:
insets in class Container
 o setInsets
  public void setInsets(Insets insets)
Sets the border within the FolderTabPanel to display between the rectangle and the contained components.
 o getTabHeight
  public int getTabHeight()
Returns the height of the tabs.
 o setTabHeight
  public void setTabHeight(int tabHeight)
Sets the height of the tabs.
 o getTabWidthBuffer
  public int getTabWidthBuffer()
Returns the margin to the left and right of the tab text.
 o setTabWidthBuffer
  public void setTabWidthBuffer(int tabWidthBuffer)
Sets the margin to the left and right of the tab text.
 o paint
  public void paint(Graphics g)
Paints the FolderTabPanel and its selected tab.
Overrides:
paint in class Component
 o mouseDown
  public boolean mouseDown(Event event,
                           int x,
                           int y)
Sets the selected tab when a tab is clicked.
Overrides:
mouseDown in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index