|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JToolBar
org.dishevelled.identify.IdToolBar
public final class IdToolBar
An extension of JToolBar that accepts identifiable actions and provides actions for changing display properties and icon sizes.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JToolBar |
|---|
JToolBar.AccessibleJToolBar, JToolBar.Separator |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static IconSize |
DEFAULT_ICON_SIZE
Default icon size, IconSize.DEFAULT_16X16. |
static IconTextDirection |
DEFAULT_ICON_TEXT_DIRECTION
Default icon text direction, IconTextDirection.LEFT_TO_RIGHT. |
| 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 javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IdToolBar()
Create a new tool bar. |
|
IdToolBar(int orientation)
Create a new tool bar with the specified orientation. |
|
IdToolBar(String name)
Create a new tool bar with the specified name. |
|
IdToolBar(String name,
int orientation)
Create a new tool bar with the specified name and orientation. |
|
| Method Summary | |
|---|---|
IdButton |
add(IdentifiableAction identifiableAction)
Add and return a new identifiable button to this tool bar which dispatches the specified identifiable action. |
ContextMenuButton |
add(JPopupMenu contextMenu)
Add and return a new context menu button to this tool bar which raises the specified context menu. |
Action |
createIconSizeAction(IconSize iconSize)
Create and return a new icon size action for this tool bar for the specified icon size. |
JCheckBoxMenuItem |
createIconSizeMenuItem(IconSize iconSize)
Create and return a new icon size menu item for this tool bar for the specified icon size. |
void |
displayIcons()
Display icons only for the buttons in this tool bar. |
void |
displayIconsAndText()
Display icons and text for the buttons in this tool bar. |
void |
displayText()
Display text only for the buttons in this tool bar. |
List |
getDefaultIconSizeActions()
Return an unmodifiable list of the default icon size actions. |
List |
getDefaultIconSizeMenuItems()
Return an unmodifiable list of check box menu items for the default icon size actions. |
List |
getDisplayActions()
Return an unmodifiable list of display actions. |
List |
getDisplayMenuItems()
Return an unmodifiable list of check box menu items for the display actions. |
IconSize |
getIconSize()
Return the icon size for all identifiable buttons in this tool bar. |
IconTextDirection |
getIconTextDirection()
Return the icon text direction for all identifiable buttons in this tool bar. |
IdButton |
remove(IdentifiableAction identifiableAction)
Remove the identifiable button for the specified identifiable action from this tool bar, if such exists. |
void |
setIconSize(IconSize iconSize)
Set the icon size for all identifiable buttons in this tool bar to iconSize. |
| Methods inherited from class javax.swing.JToolBar |
|---|
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final IconSize DEFAULT_ICON_SIZE
IconSize.DEFAULT_16X16.
public static final IconTextDirection DEFAULT_ICON_TEXT_DIRECTION
IconTextDirection.LEFT_TO_RIGHT.
| Constructor Detail |
|---|
public IdToolBar()
public IdToolBar(int orientation)
orientation - orientation, must be either HORIZONTAL
or VERTICALpublic IdToolBar(String name)
name - name of this tool bar
public IdToolBar(String name,
int orientation)
name - name of this tool barorientation - orientation, must be either HORIZONTAL
or VERTICAL| Method Detail |
|---|
public ContextMenuButton add(JPopupMenu contextMenu)
contextMenu - context menu to add to this tool bar, must not be null
public IdButton add(IdentifiableAction identifiableAction)
identifiableAction - identifiable action to add to this tool bar, must not be null
public IdButton remove(IdentifiableAction identifiableAction)
identifiableAction - identifiable action to remove from this tool bar
public void displayIcons()
public void displayText()
public void displayIconsAndText()
public IconSize getIconSize()
public void setIconSize(IconSize iconSize)
iconSize.
iconSize - icon size for all identifiable buttons in this tool bar, must not be nullpublic IconTextDirection getIconTextDirection()
public List getDisplayActions()
public List getDisplayMenuItems()
public Action createIconSizeAction(IconSize iconSize)
iconSize - icon size for the new icon size action, must not be null
public JCheckBoxMenuItem createIconSizeMenuItem(IconSize iconSize)
iconSize - icon size for the new icon size menu item, must not be null
public List getDefaultIconSizeActions()
public List getDefaultIconSizeMenuItems()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||