All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fr.l2f.gui.FolderTabPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----fr.l2f.gui.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 images
The tab images
 o insets
The border within the FolderTabPanel to display between the rectangle and the contained components.
 o labels
The tab labels.
 o p_height
 o p_width
 o panels
The panels representing each tab.
 o selectedPanel
The label of the currently selected tab.
 o selectedTabFont
 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)
 o addPanel(Panel, String, Image)
Adds a tab to the FolderTabPanel.
 o doLayout()
Performs a layout() that shapes the current tab into the FolderTabPanel.
 o getInsets()
Returns the border within the FolderTabPanel to display between the rectangle and the contained components.
 o getMinimumSize()
 o getPreferredSize()
 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 next()
 o paint(Graphics)
Paints the FolderTabPanel and its selected tab.
 o previous()
 o processMouseEvent(MouseEvent)
 o removePanel(String)
Removes a tab from the FolderTabPanel.
 o setFont(Font)
 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 setSize(int, int)
 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 selectedTabFont
 protected Font selectedTabFont
 o labels
 protected Vector labels
The tab labels.

 o panels
 protected Vector panels
The panels representing each tab.

 o images
 protected Vector images
The tab images

 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.

 o p_width
 protected int p_width
 o p_height
 protected int p_height

Constructors

 o FolderTabPanel
 public FolderTabPanel()
Constructs a new FolderTabPanel.

Methods

 o addPanel
 public void addPanel(Panel panel,
                      String label)
 o addPanel
 public void addPanel(Panel panel,
                      String label,
                      Image image)
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 next
 public void next()
 o previous
 public void previous()
 o setPanel
 public void setPanel(String label)
Sets the FolderTabPanel's active tab.

Parameters:
label - the label of the tab to select.
 o doLayout
 public void doLayout()
Performs a layout() that shapes the current tab into the FolderTabPanel.

Overrides:
doLayout in class Container
 o setSize
 public void setSize(int w,
                     int h)
Overrides:
setSize in class Component
 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 getInsets
 public Insets getInsets()
Returns the border within the FolderTabPanel to display between the rectangle and the contained components.

Overrides:
getInsets 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 getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Container
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Container
 o setFont
 public void setFont(Font f)
Overrides:
setFont in class Component
 o paint
 public void paint(Graphics g)
Paints the FolderTabPanel and its selected tab.

Overrides:
paint in class Container
 o processMouseEvent
 public void processMouseEvent(MouseEvent event)
Overrides:
processMouseEvent in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index