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.
-
insets
- The border within the FolderTabPanel to display between the rectangle
and the contained components.
-
labels
- The tab labels.
-
panels
- The panels representing each tab.
-
selectedPanel
- The label of the currently selected tab.
-
tabHeight
- The height of the tabs.
-
tabWidthBuffer
- The margin to the left and right of the tab text.
-
tabWidths
- The widths of the tabs.
-
FolderTabPanel()
- Constructs a new FolderTabPanel.
-
addPanel(Panel, String)
- Adds a tab to the FolderTabPanel.
-
getSelectedPanel()
- Returns the panel of the selected tab.
-
getSelectedPanelLabel()
- Returns the label of the selected tab.
-
getTabHeight()
- Returns the height of the tabs.
-
getTabWidthBuffer()
- Returns the margin to the left and right of the tab text.
-
insets()
- Returns the border within the FolderTabPanel to display between the rectangle
and the contained components.
-
layout()
- Performs a layout() that shapes the current tab into the FolderTabPanel.
-
mouseDown(Event, int, int)
- Sets the selected tab when a tab is clicked.
-
paint(Graphics)
- Paints the FolderTabPanel and its selected tab.
-
removePanel(String)
- Removes a tab from the FolderTabPanel.
-
setInsets(Insets)
- Sets the border within the FolderTabPanel to display between the rectangle
and the contained components.
-
setPanel(String)
- Sets the FolderTabPanel's active tab.
-
setTabHeight(int)
- Sets the height of the tabs.
-
setTabWidthBuffer(int)
- Sets the margin to the left and right of the tab text.
labels
protected Vector labels
- The tab labels.
panels
protected Vector panels
- The panels representing each tab.
tabWidths
protected int tabWidths[]
- The widths of the tabs.
selectedPanel
protected String selectedPanel
- The label of the currently selected tab.
insets
protected Insets insets
- The border within the FolderTabPanel to display between the rectangle
and the contained components.
tabHeight
protected int tabHeight
- The height of the tabs.
tabWidthBuffer
protected int tabWidthBuffer
- The margin to the left and right of the tab text.
FolderTabPanel
public FolderTabPanel()
- Constructs a new FolderTabPanel.
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
removePanel
public void removePanel(String label)
- Removes a tab from the FolderTabPanel.
- Parameters:
- label - the label of the tab to remove.
setPanel
public void setPanel(String label)
- Sets the FolderTabPanel's active tab.
- Parameters:
- label - the label of the tab to select.
layout
public void layout()
- Performs a layout() that shapes the current tab into the FolderTabPanel.
- Overrides:
- layout in class Container
getSelectedPanelLabel
public String getSelectedPanelLabel()
- Returns the label of the selected tab.
getSelectedPanel
public Panel getSelectedPanel()
- Returns the panel of the selected tab.
insets
public Insets insets()
- Returns the border within the FolderTabPanel to display between the rectangle
and the contained components.
- Overrides:
- insets in class Container
setInsets
public void setInsets(Insets insets)
- Sets the border within the FolderTabPanel to display between the rectangle
and the contained components.
getTabHeight
public int getTabHeight()
- Returns the height of the tabs.
setTabHeight
public void setTabHeight(int tabHeight)
- Sets the height of the tabs.
getTabWidthBuffer
public int getTabWidthBuffer()
- Returns the margin to the left and right of the tab text.
setTabWidthBuffer
public void setTabWidthBuffer(int tabWidthBuffer)
- Sets the margin to the left and right of the tab text.
paint
public void paint(Graphics g)
- Paints the FolderTabPanel and its selected tab.
- Overrides:
- paint in class Component
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