|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Panel net.xoetrope.awt.XPanel net.xoetrope.awt.XTabPanel
public class XTabPanel
A tab panel. The methods are modelled on the JTabbedPane
Copyright (c) Xoetrope Ltd., 1998-2004
License: see license.txt $Revision: 2.2 $
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected java.awt.CardLayout |
cardManager |
protected XPanel |
contentPane |
protected int |
selIdx |
protected XPanel |
tabPane |
Fields inherited from class net.xoetrope.awt.XPanel |
---|
BORDER_BEVEL, BORDER_FLAT, BORDER_NONE |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
XTabPanel() Create a new tab panel |
Method Summary | |
---|---|
java.awt.Component |
add(java.awt.Component comp) Add a new tab. |
void |
addTab(java.lang.String name, java.awt.Component panel) Add a new tab. |
java.awt.Color |
getBackgroundAt(int index) Get a tab's background color |
java.awt.Component |
getComponentAt(int index) Get the tab component at the specified index |
java.awt.Color |
getForegroundAt(int index) Get a tab's foreground color |
int |
getSelectedIndex() Get the index of the selected tab |
int |
getTabCount() Get the number of tabs |
java.lang.String |
getTitleAt(int index) Get the title of the tab at the specified index |
void |
mouseClicked(java.awt.event.MouseEvent e) Invoked when the mouse button has been clicked (pressed and released) on a component. |
void |
mouseEntered(java.awt.event.MouseEvent e) Invoked when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e) Invoked when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent e) Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(java.awt.event.MouseEvent e) Invoked when a mouse button has been released on a component. |
void |
setBackgroundAt(int index, java.awt.Color clr) Set the tab background color |
void |
setDrawFrame(int value) Toggle the frame display. |
void |
setForegroundAt(int index, java.awt.Color clr) Set the foreground color |
void |
setSelectedIndex(int index) Select a tab |
void |
setTitleAt(int index, java.lang.String str) Set a tab's title |
Methods inherited from class net.xoetrope.awt.XPanel |
---|
addNotify, getDrawFrame, paint, setAttribute, setBounds |
Methods inherited from class java.awt.Panel |
---|
getAccessibleContext |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected XPanel tabPane
protected XPanel contentPane
protected int selIdx
protected java.awt.CardLayout cardManager
Constructor Detail |
---|
public XTabPanel()
Method Detail |
---|
public java.awt.Component add(java.awt.Component comp)
add
in class java.awt.Container
comp
- the new tab componentpublic void addTab(java.lang.String name, java.awt.Component panel)
name
- the name/caption of the tab componentpanel
- the contentpublic java.awt.Component getComponentAt(int index)
index
- the tab indexpublic java.awt.Color getBackgroundAt(int index)
index
- the tab indexpublic java.awt.Color getForegroundAt(int index)
index
- the tab indexpublic int getTabCount()
public int getSelectedIndex()
public java.lang.String getTitleAt(int index)
index
- the tab indexpublic void setBackgroundAt(int index, java.awt.Color clr)
index
- the tab indexclr
- the new colrpublic void setForegroundAt(int index, java.awt.Color clr)
index
- the tab indexclr
- the new colorpublic void setSelectedIndex(int index)
index
- the tab indexpublic void setTitleAt(int index, java.lang.String str)
index
- the tab indexstr
- the text for the tabpublic void setDrawFrame(int value)
setDrawFrame
in class XPanel
value
- 0 for no frame, 1 for a bevel, 2 for a flat framepublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- the eventpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- the eventpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- the eventpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
e
- the eventpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
e
- the event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |