Class jclass.contrib.JCTabManager
All Packages Class Hierarchy This Package Previous Next Index
Class jclass.contrib.JCTabManager
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----jclass.contrib.JCTabManager
- public class JCTabManager
- extends Panel
JCTabManager is used to create a tab layout within Java.
JCTabManager uses the AWT CardLayout class to implement the
concept of different folders. The tabs are an array
of buttons. Hitting a particular button causes CardLayout
to display the corresponding folder.
-
JCTabManager(String)
- The sole constructor for JCTabManager.
-
action(Event, Object)
- Process button events in the tab manager.
-
add(String, Component)
- This adds a component to a named folder.
-
setTabStyle(String)
- Sets the tab style to one of Left, Right Top or Bottom by
destroying all the children of this component and re-creating
the tab manager.
-
show(String)
- Makes a specific folder the current folder.
JCTabManager
public JCTabManager(String name)
- The sole constructor for JCTabManager.
- Parameters:
- name - sets the tab style to Left, Right, Top or Bottom.
setTabStyle
public void setTabStyle(String name)
- Sets the tab style to one of Left, Right Top or Bottom by
destroying all the children of this component and re-creating
the tab manager.
- Parameters:
- name - sets the tab style to Left, Right, Top or
Bottom.
show
public void show(String name)
- Makes a specific folder the current folder.
Folders are referenced by name, and the folder name
matches the name that appears in the button that
activates the form.
- Parameters:
- name - the name of the folder to activate
add
public synchronized Component add(String name,
Component comp)
- This adds a component to a named folder. This is
used to add items to the tab manager. This is commonly
used to add a new Panel to each folder, and then
items can be added to the folder.
- Parameters:
- name - the name of the folder where the item is added to
- comp - the component to add
- Returns:
- this returns the added component
- Overrides:
- add in class Container
action
public boolean action(Event evt,
Object arg)
- Process button events in the tab manager. It activates the
folder corresponding to a particular button.
- Parameters:
- evt - the AWT event instance
- arg - the object associated with event (this is not used)
- Returns:
- true if event is a button press, otherwise it is false
- Overrides:
- action in class Component
All Packages Class Hierarchy This Package Previous Next Index