|
|||||||||
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 | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.borland.primetime.actions.ActionToolBarPane
The ActionToolBarPane defines a pane of toolbars dynamically built from the contents of the ActionGroups it is associated with.
ActionToolBarPanes are constructed with a source Object, which will be passed as the source of the ActionEvent when the actionPerformed methods are called in the associated actions. This allows the ActionToolBarPane to pass a particular source object (not the buttons themselves), so the associated actions can have direct access to a specific Object. This source is determined by the code that instantiates the ActionToolBarPane.
Once instantiated, you can add toolbars to the ActionToolBarPane by calling the addGroup(ActionGroup) methods. An ActionToolBar will be constructed and placed in the pane.
ActionToolBar
,
ActionGroup
, Serialized FormInner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
protected ActionGroup |
contextGroup
|
protected java.awt.FlowLayout |
flowLayout
|
protected java.util.ArrayList |
groups
|
protected boolean |
horizontal
|
protected ActionPopupMenu |
pop
|
protected boolean |
rebuilding
|
protected java.lang.Object |
source
|
protected java.util.HashMap |
toolbarHash
|
protected VerticalFlowLayout |
vertFlowLayout
|
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 |
Constructor Summary | |
ActionToolBarPane(java.lang.Object source)
Constructs an ActionToolBarPane with the specified source object. |
Method Summary | |
void |
addGroup(ActionGroup group)
Adds an ActionGroup (toolbar) to this ActionToolBarPane at the end. |
void |
addGroup(int index,
ActionGroup group)
Inserts an ActionGroup (toolbar) into this ActionToolBarPane at the specified index. |
void |
doLayout()
|
protected ActionToolBar |
getActionToolBar(ActionGroup group)
|
ActionGroup |
getContextGroup()
Returns the context pop-up ActionGroup. |
ActionGroup |
getGroup(int index)
Returns the ActionGroup (toolbar) at the specified index. |
int |
getGroupCount()
Returns the count of ActionGroups (toolbars) in this ActionToolBarPane. |
ActionGroup[] |
getGroups()
Returns an array containing all ActionGroups (toolbars) in this ActionToolBarPane. |
java.awt.Dimension |
getPreferredSize()
|
java.lang.Object |
getSource()
Returns the object source for this ActionToolBarPane. |
boolean |
isHorizontal()
Returns the horizontal property setting. |
boolean |
isToolBarVisible(ActionGroup group)
Returns the visible state for the specified ActionGroup (toolbar). |
protected void |
rebuildComplete(boolean visible)
Subclasses should override this to hide/show the toolbar completely |
void |
removeGroup(ActionGroup group)
Removes the specified ActionGroup (toolbar) from this ActionToolBarPane. |
void |
setContextGroup(ActionGroup group)
Sets the context pop-up ActionGroup for this ActionToolBarPane. |
void |
setHorizontal(boolean horz)
Sets the horizontal property for this ActionToolBarPane. |
void |
setToolBarVisible(ActionGroup group,
boolean visible)
Sets the specified ActionGroup (toolbar) to the specified visible state. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
print,
printAll,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected ActionGroup contextGroup
protected boolean horizontal
protected java.util.ArrayList groups
protected java.util.HashMap toolbarHash
protected ActionPopupMenu pop
protected java.lang.Object source
protected java.awt.FlowLayout flowLayout
protected VerticalFlowLayout vertFlowLayout
protected boolean rebuilding
Constructor Detail |
public ActionToolBarPane(java.lang.Object source)
source
- The source objectMethod Detail |
public java.lang.Object getSource()
public int getGroupCount()
public ActionGroup getGroup(int index)
index
- The index of the ActionGrouppublic ActionGroup[] getGroups()
public void addGroup(ActionGroup group)
group
- The ActionGroup to addpublic void addGroup(int index, ActionGroup group)
index
- The index at which to insert the ActionGroupgroup
- The ActionGroup to insertpublic void removeGroup(ActionGroup group)
group
- The ActionGroup to removepublic void setHorizontal(boolean horz)
horz
- The horizontal property settingpublic boolean isHorizontal()
public void setContextGroup(ActionGroup group)
group
- The right-click context ActionGrouppublic ActionGroup getContextGroup()
public void setToolBarVisible(ActionGroup group, boolean visible)
group
- The ActionGroup to set the visible state forvisible
- true for visible, false for invisiblepublic boolean isToolBarVisible(ActionGroup group)
group
- The ActionGroup to get the visible state forprotected void rebuildComplete(boolean visible)
protected ActionToolBar getActionToolBar(ActionGroup group)
public java.awt.Dimension getPreferredSize()
public void doLayout()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |