|
||||||||||
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 netcom.gui.TabPanel
TabPanel is a container for a set of tabbed cards, lying atop each other, but with the labelled tabs exposed at the top. That is, the classic Tab Folder. Each card is an awt.component of whatever design you wish. The topmost card can be selected programmatically (Using first(), last(), next(), previous(), or show(name)), or by clicking on the tab with the mouse.
Components should be added using add(name,component)); the name is used to label the tab. If you set the layout manager, it should be a subclass of CardLayout.
Whenever a card is selected (whether by software or mouse), an event with id = Event.WINDOW_EXPOSE is sent to the selected component. Handling this event may be useful for deferred initialization.
Nested Class Summary |
Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
int |
margin
The width of the margins around the cards. |
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 | |
TabPanel()
Creates an empty TabPanel. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ev)
|
java.awt.Component |
add(java.lang.String name,
java.awt.Component component)
|
java.awt.Component |
add(java.lang.String name,
java.lang.String title,
java.awt.Component component)
|
java.lang.String |
documentCard(java.lang.String name)
Return a mouse documentation string for selecting this card. |
void |
first()
Select the first card in the Panel. |
boolean |
getClosable()
|
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
java.awt.Component |
getTopComponent()
Component Selection |
java.awt.Insets |
insets()
Allocates extra margins to give the cards some `body'. |
void |
last()
Select the last card in the Panel. |
void |
layout()
Computes tab geometry while laying out the panels components. |
void |
mouseClicked(java.awt.event.MouseEvent p1)
|
void |
mouseEntered(java.awt.event.MouseEvent p1)
|
void |
mouseExited(java.awt.event.MouseEvent p1)
|
void |
mousePressed(java.awt.event.MouseEvent p1)
|
void |
mouseReleased(java.awt.event.MouseEvent p1)
|
void |
next()
Select the next card in the Panel. |
void |
paint(java.awt.Graphics gg)
Paint the tabs in a row atop the cards. |
void |
previous()
Select the previous card in the Panel. |
void |
remove(java.awt.Component component)
remove the card, component, from the TabPanel. |
void |
remove(java.lang.String name)
remove the card having the given name from the TabPanel. |
void |
removeAll()
remove all cards from the TabPanel. |
void |
setClosable(boolean b)
|
void |
setLabel(java.lang.String name,
java.lang.String label)
Add a card, component, to the TabPanel with a given name. |
void |
setMinimumSize(java.awt.Dimension d)
|
void |
setTabFont(java.awt.Font font)
Specify the Font to be used for labeling the Tabs. |
void |
show(java.awt.Component component)
Select the card component in the Panel. |
void |
show(java.lang.String name)
Select the named card in the Panel. |
void |
update(java.awt.Graphics g)
Update (repaint) the TabPanel. |
Methods inherited from class java.awt.Panel |
addNotify, 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, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, 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, 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, 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, isOpaque, 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, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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 |
public int margin
Constructor Detail |
public TabPanel()
Method Detail |
public boolean getClosable()
public void setClosable(boolean b)
public void setLabel(java.lang.String name, java.lang.String label)
public java.awt.Component add(java.lang.String name, java.awt.Component component)
public java.awt.Component add(java.lang.String name, java.lang.String title, java.awt.Component component)
public void remove(java.awt.Component component)
public void remove(java.lang.String name)
public void removeAll()
public java.awt.Component getTopComponent()
public void first()
public void last()
public void next()
public void previous()
public void show(java.lang.String name)
public void show(java.awt.Component component)
public java.lang.String documentCard(java.lang.String name)
public java.awt.Insets insets()
public void setTabFont(java.awt.Font font)
public void setMinimumSize(java.awt.Dimension d)
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public void layout()
public void update(java.awt.Graphics g)
public void paint(java.awt.Graphics gg)
public void mouseReleased(java.awt.event.MouseEvent p1)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent p1)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent p1)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent p1)
mousePressed
in interface java.awt.event.MouseListener
public void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed
in interface java.awt.event.ActionListener
public void mouseExited(java.awt.event.MouseEvent p1)
mouseExited
in interface java.awt.event.MouseListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |