|
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--vipratech.awt.VPanel | +--vipratech.beans.standardbeans.TabPanel
The TabPanel.class provides a tabbed panel for GUIs. By default 3 tabs and panels are provided.
The labels for the tabs should be set up in the various localised resource bundles (for example, LabelsBundle_en_US). The bean checks all labels for all locales and then sets the tab width to the longest string that was found. This ensures that tab label text will be visible, whatever the selected locale.
The locale can be selected at design time or by the user at run time it the button is wired to vipratech.beans.standardbeans.LanguageChoice.
Various utility methods such as tab sizing and drawing are set up in the vipratech.beans.standardbeans.TabSupport class.
TabSupport
, Serialized FormFields inherited from class vipratech.awt.VPanel |
fm |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
TabPanel()
Constructor |
Method Summary | |
void |
drawActiveTab(java.awt.Graphics g)
Indetifies and draws the active tab. |
void |
drawAllTabs(java.awt.Graphics g)
Draws all the tabs as inactive. |
void |
findSelectedTab(int x)
Tests the mouse release to find the selected tab. |
int |
getCurrentPanel()
Sets the panel and tab to be displayed. |
java.util.Locale[] |
getDefaultLocales()
An indexed array of locales that are supported. |
java.awt.Insets |
getInsets()
Returns the insets around this component. |
java.lang.String |
getLanguage()
Returns the language for this component. |
java.util.Locale |
getLocale()
Returns the locale for this component. |
java.lang.String |
getLongestLocalisedLabel(java.lang.String key)
Loops through all possible language labels and finds the longest string. |
java.awt.Dimension |
getMinimumSize()
Returns the minumum size. |
int |
getNumberOfTabs()
Returns the number of tabs displayed. |
VPanel[] |
getPanel()
|
VPanel[] |
getPanelArray()
Returns an array of panels. |
java.lang.String[] |
getTabLabel()
Returns an array of labels according to the current locale of the TabPanel. |
java.awt.Dimension[] |
getTabSize()
Sizes the tab for the longest label out of all possible localised language labels that are available from resource bundles. |
boolean[] |
getTabState()
Returns an array of tab states. |
void |
initialise()
Sets up array of labels, tab states and tab dimensions. |
void |
mouse_released_action(int x,
int y)
Processes the mouse released event. |
boolean |
onTabs(int y)
Tests the mouse release. |
void |
paint(java.awt.Graphics g)
Draws the 3D panel border and tabs. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Allows this component to be wired up to vipratech.beans.LanguageChoice at design time. |
void |
setCurrentPanel(int currentPanel)
Sets the panel and tab to be displayed. |
void |
setLanguage(java.lang.String language)
Sets the language to be used for this component. |
void |
setLocale(java.util.Locale locale)
Sets the locale for this component. |
void |
setNumberOfTabs(int numberOfTabs)
Sets the number of tabs to be displayed. |
void |
setPanel(VPanel[] panel)
|
void |
showPanel(int currentPanel)
Displays the selected panel. |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
getMaximumSize,
getPreferredSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setFont,
setLayout,
update,
validate |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
contains,
contains,
createImage,
createImage,
disable,
dispatchEvent,
enable,
enable,
enableInputMethods,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public TabPanel()
Method Detail |
public void initialise()
public java.lang.String[] getTabLabel()
public java.util.Locale[] getDefaultLocales()
public boolean[] getTabState()
public java.awt.Dimension[] getTabSize()
public java.lang.String getLongestLocalisedLabel(java.lang.String key)
public VPanel[] getPanelArray()
public void mouse_released_action(int x, int y)
public boolean onTabs(int y)
public void findSelectedTab(int x)
public void showPanel(int currentPanel)
public void drawAllTabs(java.awt.Graphics g)
public void drawActiveTab(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
public void propertyChange(java.beans.PropertyChangeEvent event)
public java.awt.Dimension getMinimumSize()
public java.awt.Insets getInsets()
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
public void setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public void setNumberOfTabs(int numberOfTabs)
public int getNumberOfTabs()
public void setCurrentPanel(int currentPanel)
public int getCurrentPanel()
public void setPanel(VPanel[] panel)
public VPanel[] getPanel()
|
dathe@chemie.uni-leipzig.de" | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |