Class JDPTabSelectPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----JDPTabSelectPanel

public class JDPTabSelectPanel
extends Panel
Class JDPTabSelectPanel represents a tab panel class.


Variable Index

 o activated
 o iconNames

Constructor Index

 o JDPTabSelectPanel(JDPUser, JDPMenuStruct, String)
Creates a Tab class that provides the features of the Menu tab class.
 o JDPTabSelectPanel(JDPUser, String[], Panel[], String)
Creates a Tab class.

Method Index

 o add(Component, String)
Add a component creating a new tab for it.
 o getFont()
 o getSelectedIndex()
Get the tab number of the currently selected tab.
 o getSelectedItem()
Get the tab name of the currently selected tab.
 o getTabcount()
Get the number of tabs.
 o getTabIcon(int)
Get the tab icon of a specific tab.
 o getTabIconList()
Get a list of all the tab icon names.
 o getTabIcons()
Get a list of the icon numbers of the current tabs.
 o getTabnames()
Get the tab names.
 o handleEvent(Event)
 o isSelected(int)
Check whether a specific tab is selected.
 o loadNewTabs(String[], Panel[], String)
Load a new set of tabs
 o loadNextTab()
Load the next tab to the right.
 o loadObject(String)
Load the panel on a tab that has the requested menu object but leave the menu displaying the current tab.
 o loadPrevTab()
Load the next tab to the left.
 o reloadTab()
Redraw the tab panel.
 o removeAllTabs()
Remove all of the tabs from this tab panel
 o removeTab(Component)
Remove a specific tab
 o select(int)
Select a tab
 o select(String)
Select a tab
 o selectObject(String)
Select a tab that has the requested menu object
 o setFont(Font)
 o setIconImagePath(String)
Set the path for the image that conatins the button icons.
 o setTabcolor(int, Color, Color)
Set the tab color of a specific tab.
 o setTabIcon(int, int)
Set the tab icon of a specific tab.
 o setTabIcon(int, String)
Set the tab icon of a specific tab.
 o setTabname(int, String)
Set the tab name of a specific tab.
 o setTitle(String)
Set the right hand panel title.

Variables

 o activated
 public static boolean activated
 o iconNames
 public static final String iconNames[]

Constructors

 o JDPTabSelectPanel
 public JDPTabSelectPanel(JDPUser user,
                          String titles[],
                          Panel tabpanels[],
                          String tabOrientation)
Creates a Tab class.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
titles - the titles of the tabs.
tabpanels - handles to the panels to be displayed in the tabs.
tabOrientation - the orientation of the tabs (North, South, East, West).
 o JDPTabSelectPanel
 public JDPTabSelectPanel(JDPUser user,
                          JDPMenuStruct menu,
                          String tabOrientation)
Creates a Tab class that provides the features of the Menu tab class.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
menu - the menu structure that contains the menu options.
tabOrientation - the orientation of the tabs (North, South, East, West).

Methods

 o removeAllTabs
 public void removeAllTabs()
Remove all of the tabs from this tab panel

 o removeTab
 public void removeTab(Component thisComponent)
Remove a specific tab

Parameters:
comp - the handle to the panel that should be removed
 o loadNewTabs
 public void loadNewTabs(String titles[],
                         Panel tabpanels[],
                         String tabOrientation)
Load a new set of tabs

Parameters:
titles - the titles of the tabs.
tabpanels - handles to the panels to be displayed in the tabs.
tabOrientation - the orientation of the tabs (North, South, East, West).
 o select
 public void select(int tab)
Select a tab

Parameters:
tabNumber - the number of the tab to select.
 o select
 public void select(String tab)
Select a tab

Parameters:
tabName - the name of the tab to select.
 o loadObject
 public boolean loadObject(String objectName)
Load the panel on a tab that has the requested menu object but leave the menu displaying the current tab.

Parameters:
objectName - the name of object residing on the tab to select.
Returns:
whether a menu option with this object name was found.
 o selectObject
 public boolean selectObject(String objectName)
Select a tab that has the requested menu object

Parameters:
objectName - the name of object residing on the tab to select.
Returns:
whether a menu option with this object name was found.
 o isSelected
 public boolean isSelected(int ix)
Check whether a specific tab is selected.

Parameters:
tabNumber - the number of the tab to check.
Returns:
whether the tab is selected or not.
 o getSelectedIndex
 public int getSelectedIndex()
Get the tab number of the currently selected tab.

Returns:
the currently selected tab number.
 o getSelectedItem
 public String getSelectedItem()
Get the tab name of the currently selected tab.

Returns:
the currently selected tab number.
 o getTabnames
 public String[] getTabnames()
Get the tab names.

Returns:
the array of tab names.
 o setTitle
 public void setTitle(String title)
Set the right hand panel title.

Parameters:
title - the right hand panel title.
 o setTabname
 public void setTabname(int tabNum,
                        String tabName)
Set the tab name of a specific tab.

Parameters:
tabNumber - the tab number.
tabName - the new name of the tab.
 o setTabcolor
 public void setTabcolor(int tabNum,
                         Color tabFGColor,
                         Color tabBGColor)
Set the tab color of a specific tab.

Parameters:
tabNumber - the tab number.
tabFGColor - the foreground color of the tab.
tabBGColor - the background color of the tab.
 o getTabIconList
 public static String[] getTabIconList()
Get a list of all the tab icon names.

Returns:
the list of all the tab icon names.
 o setTabIcon
 public void setTabIcon(int tabNum,
                        int icon)
Set the tab icon of a specific tab.

Parameters:
tabNumber - the tab number.
iconNumber - the icon number of the tab.
 o getTabIcon
 public int getTabIcon(int tabNum)
Get the tab icon of a specific tab.

Parameters:
tabNumber - the tab number.
Returns:
the icon number of the tab.
 o setTabIcon
 public void setTabIcon(int tabNum,
                        String icon)
Set the tab icon of a specific tab.

Parameters:
tabNumber - the tab number.
iconName - the icon name of the tab.
 o getTabIcons
 public int[] getTabIcons()
Get a list of the icon numbers of the current tabs.

Returns:
the list of all the tab icons.
 o setIconImagePath
 public void setIconImagePath(String thisImageLoc)
Set the path for the image that conatins the button icons. This class has a default image call JDPBUTNS.gif that may be overidden. To create your own icon image use the JDPBUTNS.gif as a template.

Parameters:
thisImageLoc - the full or partial path to the new image.
 o getTabcount
 public int getTabcount()
Get the number of tabs.

Parameters:
tabCount - the number of tabs.
 o reloadTab
 public void reloadTab()
Redraw the tab panel.

 o loadNextTab
 public void loadNextTab()
Load the next tab to the right.

 o loadPrevTab
 public void loadPrevTab()
Load the next tab to the left.

 o setFont
 public void setFont(Font thisFont)
Overrides:
setFont in class Component
 o getFont
 public Font getFont()
Overrides:
getFont in class Component
 o add
 public Component add(Component thisComponent,
                      String title)
Add a component creating a new tab for it.

Parameters:
comp - the component to add.
title - the title of the new tab.
 o handleEvent
 public boolean handleEvent(Event e)
Overrides:
handleEvent in class Component