|
||||||||||
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 javax.swing.JComponent javax.swing.JPanel org.xnap.gui.component.ToggleableIconPane
public class ToggleableIconPane
Provides a container that can display multiple panels. The view can be
switched between a JTabbedPane
view and
an IconSplitPane
view.
Nested Class Summary | |
---|---|
protected class |
ToggleableIconPane.Blinker
|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
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 | |
---|---|
static int |
BLINK_INTERVAL
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
ToggleableIconPane(boolean tabbed)
Constructs a ToggleableIconPane in tabbed mode if tabbed is true. |
|
ToggleableIconPane(boolean tabbed,
int dividerSize)
Constructs a ToggleableIconPane in tabbed mode if tabbed is true and given dividerSize for the IconSplitPane. |
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to this toggableiconpane. |
void |
addTab(java.lang.String description,
javax.swing.Icon icon,
javax.swing.JComponent c)
Adds a component, represented by a description and/or icon. |
void |
blink(int i,
javax.swing.Icon blinkIcon)
Sets a blinking icon for the component at index i. |
javax.swing.Icon |
getIconAt(int i)
Returns the icon at index i. |
java.awt.Component |
getSelectedComponent()
Returns the currently selected component for this toggableiconpane. |
int |
getSelectedIndex()
Returns the index of the currently selected component. |
int |
getTabCount()
Returns the number of child components. |
java.awt.Component[] |
getTabs()
Returns all the components in this container. |
int |
indexOfComponent(java.awt.Component c)
Returns the index of the tab/icon for the specified component. |
void |
insertTab(java.lang.String description,
javax.swing.Icon icon,
javax.swing.JComponent c,
int index)
Inserts a component, at index, represented by a description and/or icon. |
void |
putTabClientProperty(java.lang.Object key,
java.lang.Object value)
|
void |
remove(java.awt.Component c)
Removes the specified component from the ToggleableIconPane. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from this toggableiconpane. |
void |
setDividerSize(int newSize)
Sets the divider size for the IconSplitPane view. |
void |
setIconAt(int i,
javax.swing.Icon icon)
Sets the icon at index i. |
void |
setSelectedComponent(java.awt.Component c)
Selects the given child component. |
void |
setSelectedComponent(java.lang.String description)
Selects the tab/icon having the given description. |
void |
setTabbed(boolean newValue)
Toggles between the TabbedPane view and the IconSplitPane view. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Implements the ChangeListener interface. |
void |
unblink()
Stops blinking and restores the original icon for the blinking tab/icon. |
protected void |
updateClientProperties()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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 static final int BLINK_INTERVAL
Constructor Detail |
---|
public ToggleableIconPane(boolean tabbed, int dividerSize)
tabbed
- if true the TabbedPane is the active view, otherwise it's
the IconSplitPanedividerSize
- the size of the divider for the IconSplitPane viewpublic ToggleableIconPane(boolean tabbed)
tabbed
- if true the TabbedPane is the active view, otherwise it is
the IconSplitPaneMethod Detail |
---|
public void insertTab(java.lang.String description, javax.swing.Icon icon, javax.swing.JComponent c, int index)
description
- the title for this componenticon
- the icon to be displayed representing the componentc
- the component to be displayed when the respective tab/icon is
clickedindex
- the position where the component is insertedpublic void addTab(java.lang.String description, javax.swing.Icon icon, javax.swing.JComponent c)
description
- the title for this componenticon
- the icon to be displayed representing the componentc
- the component to be displayed when the respective tab/icon is
clickedpublic java.awt.Component[] getTabs()
public int indexOfComponent(java.awt.Component c)
component
- - the component for the tab/icon
public void setDividerSize(int newSize)
newSize
- an integer giving the size of the divider in pixelspublic void remove(java.awt.Component c)
remove
in class java.awt.Container
c
- the componennt which is to be removedpublic void addChangeListener(javax.swing.event.ChangeListener l)
l
- the changelistener to addpublic void removeChangeListener(javax.swing.event.ChangeListener l)
l
- the changelistener to removepublic javax.swing.Icon getIconAt(int i)
i
- the index of the item being queried
public void setIconAt(int i, javax.swing.Icon icon)
i
- the index of the item being seticon
- the icon to be setpublic void blink(int i, javax.swing.Icon blinkIcon)
i
- the index of the item being blinkedblinkIcon
- the icon which blinks.public void unblink()
public int getSelectedIndex()
public java.awt.Component getSelectedComponent()
public int getTabCount()
public void putTabClientProperty(java.lang.Object key, java.lang.Object value)
public void setSelectedComponent(java.lang.String description)
public void setSelectedComponent(java.awt.Component c)
public void setTabbed(boolean newValue)
newValue
- whether or not the new view is the tabbed viewpublic void stateChanged(javax.swing.event.ChangeEvent e)
ChangeListener
interface.
stateChanged
in interface javax.swing.event.ChangeListener
protected void updateClientProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |