|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
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.JToolBar
oracle.ide.controls.Toolbar
public class Toolbar
The Toolbar
class is a replacement for JToolBar
specialized for use in the IDE.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JToolBar |
---|
javax.swing.JToolBar.AccessibleJToolBar, javax.swing.JToolBar.Separator |
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
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 | |
---|---|
Toolbar() Creates an empty toolbar. |
Method Summary | |
---|---|
ToolButton |
add(ToggleAction action) Adds a new button to the toolbar. |
ActionMenuToolButton |
addActionMenuButton(javax.swing.Action action) Adds a new menu button to the toolbar. |
java.awt.Component |
addComponent(java.awt.Component component, int index) Adds the specified component to this toolbar at the given position. |
void |
addFiller() Adds a small blank space filler to the toolbar. |
protected void |
addImpl(java.awt.Component comp, java.lang.Object constraints, int index) |
MenuToolButton |
addMenuButton(ToggleAction[] actions) Adds a new menu button to the toolbar. |
void |
addNotify() |
RadioToolButton |
addRadioButton(ToggleAction action, javax.swing.ButtonGroup bgroup) Adds a RadioToolButton to the toolbar. |
void |
addSeparator() Adds a new separator to the toolbar. |
ToggleToolButton |
addToggleButton(ToggleAction action) Adds a toggling button to the toolbar. |
static void |
addToolbarFilter(ActionFilter filter) |
void |
dispose() Sets the action of each AbstractButton contained within the toolbar to null to avoid memory leaks. |
void |
forcePrimaryViewToolbar(boolean primaryViewToolbar) Forces this toolbar to either use or not use the primary view toolbar visual style in theme mode. |
javax.swing.Action[] |
getActions() |
protected boolean |
isActionAccepted(javax.swing.Action action) Indicates whether an action can be aded to the toolbar. |
protected boolean |
isActiveViewToolbar() Determines whether this toolbar is the active view toolbar. |
boolean |
isLabelVisible() Deprecated. No replacement. |
javax.swing.JToolBar.Separator |
newSeparator() Creates a new separator for use in the toolbar. |
protected void |
paintComponent(java.awt.Graphics g) |
protected void |
processMouseEvent(java.awt.event.MouseEvent e) |
void |
remove(java.awt.Component comp) |
void |
remove(int index) |
void |
removeAll() |
void |
removeNotify() |
static void |
removeToolbarFilter(ActionFilter filter) |
void |
setLabelVisible(boolean labelVisible) Deprecated. Not recommended. Can be replaced with putClientProperty("hideActionText", Boolean) on individual toolbar buttons. |
void |
setPrimaryViewToolbar(boolean primaryViewToolbar) Sets whether this toolbar is the primary toolbar of a view. |
Methods inherited from class javax.swing.JToolBar |
---|
add, 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 javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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 |
Constructor Detail |
---|
public Toolbar()
Method Detail |
---|
public void forcePrimaryViewToolbar(boolean primaryViewToolbar)
primaryViewToolbar
- if true, this toolbar will be rendered using themes if themes are switched on.public void setPrimaryViewToolbar(boolean primaryViewToolbar)
This method is normally called automatically by the IDE framework for toolbars that are installed into views. To programmatically force a toolbar to either use or not use the visual style, call the forcePrimaryViewToolbar( boolean )
method.
primaryViewToolbar
- if true, this toolbar will act as if it is the primary toolbar in the view, ignoring the normal algorithm for detecting this automatically.public final ToolButton add(ToggleAction action)
action
- the action that gets executed when the button is clickedpublic final ToggleToolButton addToggleButton(ToggleAction action)
action
- the action that gets executed when the button is clickedpublic final RadioToolButton addRadioButton(ToggleAction action, javax.swing.ButtonGroup bgroup)
action
- the action that gets executed when the button is clickedbgroup
- the button group to which the action belongspublic final MenuToolButton addMenuButton(ToggleAction[] actions)
actions
- the actions that are shown in a popup menu when the toolbar button is clickedpublic final ActionMenuToolButton addActionMenuButton(javax.swing.Action action)
action
- the action to add to the popup toolbar buttonpublic final javax.swing.JToolBar.Separator newSeparator()
public final void addSeparator()
addSeparator
in class javax.swing.JToolBar
public final void addFiller()
public java.awt.Component addComponent(java.awt.Component component, int index)
component
- the component to be addedindex
- the position at which to insert the component, or -1 to insert the component at the end
@Deprecated
public void setLabelVisible(boolean labelVisible)
putClientProperty("hideActionText", Boolean)
on individual toolbar buttons.
@Deprecated
public boolean isLabelVisible()
public javax.swing.Action[] getActions()
public void dispose()
AbstractButton
contained within the toolbar to null
to avoid memory leaks.public void remove(java.awt.Component comp)
remove
in class java.awt.Container
public void remove(int index)
remove
in class java.awt.Container
public void removeAll()
removeAll
in class java.awt.Container
protected void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
addImpl
in class javax.swing.JToolBar
protected void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent
in class javax.swing.JComponent
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
protected boolean isActiveViewToolbar()
This implementation checks the active view using IdeMainWindow.getLastActiveView()
. If this toolbar instance is the toolbar of that view, then this method returns true.
Subclasses may want to override this to provide a custom implementation, particularly if the toolbar is not returned by the View.getToolbar()
or Editor.getScrollableTopMargin()
methods.
public void addNotify()
addNotify
in class javax.swing.JComponent
public void removeNotify()
removeNotify
in class javax.swing.JComponent
public static void addToolbarFilter(ActionFilter filter)
public static void removeToolbarFilter(ActionFilter filter)
protected final boolean isActionAccepted(javax.swing.Action action)
action
- The action to add to the toolbar.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |