org.openide.loaders 7.10.1

org.openide.awt
Class Toolbar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JToolBar
                  extended by org.openide.awt.Toolbar
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class Toolbar
extends JToolBar

Toolbar provides a component which is useful for displaying commonly used actions. It can be dragged inside its ToolbarPanel to customize its location.

See Also:
Serialized Form

Nested Class Summary
static class Toolbar.DnDEvent
          Deprecated.  
static interface Toolbar.DnDListener
          Deprecated. There is no public support for toolbar drag and drop.
 
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 int BASIC_HEIGHT
          Deprecated. Use getBasicHeight instead.
 
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()
          Create a new Toolbar with empty name.
Toolbar(String name)
          Create a new not floatable Toolbar with programmatic name.
Toolbar(String name, boolean f)
          Create a new Toolbar.
Toolbar(String name, String displayName)
          Create a new not floatable Toolbar with specified programmatic name and display name
Toolbar(String name, String displayName, boolean f)
          Create a new Toolbar.
 
Method Summary
protected  void addImpl(Component c, Object constraints, int idx)
          Overridden to set focusable to false for any AbstractButton subclasses which are added
 void addNotify()
           
protected  void fireDragToolbar(int dx, int dy, int type)
          Deprecated. There is no public support for toolbar drag and drop.
protected  void fireDropToolbar(int dx, int dy, int type)
          Deprecated. There is no public support for toolbar drag and drop.
static int getBasicHeight()
          Deprecated. Returns preferred icon size.
 Component[] getComponents()
           
 String getDisplayName()
           
 String getUIClassID()
           
static int rowCount(int height)
          Deprecated. Always returns 1
 void setDisplayName(String displayName)
          Sets new display name of this toolbar.
 void setDnDListener(Toolbar.DnDListener l)
          Deprecated.  
 void setUI(ToolBarUI ui)
           
 void setVisible(boolean b)
           
 
Methods inherited from class javax.swing.JToolBar
add, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, 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, 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, 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, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BASIC_HEIGHT

@Deprecated
public static final int BASIC_HEIGHT
Deprecated. Use getBasicHeight instead.
Basic toolbar height.

See Also:
Constant Field Values
Constructor Detail

Toolbar

public Toolbar()
Create a new Toolbar with empty name.


Toolbar

public Toolbar(String name)
Create a new not floatable Toolbar with programmatic name. Display name is set to be the same as name


Toolbar

public Toolbar(String name,
               String displayName)
Create a new not floatable Toolbar with specified programmatic name and display name


Toolbar

public Toolbar(String name,
               boolean f)
Create a new Toolbar.

Parameters:
name - a String containing the associated name
f - specified if Toolbar is floatable Display name of the toolbar is set equal to the name.

Toolbar

public Toolbar(String name,
               String displayName,
               boolean f)
Create a new Toolbar.

Parameters:
name - a String containing the associated name
f - specified if Toolbar is floatable
Method Detail

addNotify

public void addNotify()
Overrides:
addNotify in class JComponent

getComponents

public Component[] getComponents()
Overrides:
getComponents in class Container

setVisible

public void setVisible(boolean b)
Overrides:
setVisible in class JComponent

addImpl

protected void addImpl(Component c,
                       Object constraints,
                       int idx)
Overridden to set focusable to false for any AbstractButton subclasses which are added

Overrides:
addImpl in class JToolBar

getBasicHeight

@Deprecated
public static int getBasicHeight()
Deprecated. Returns preferred icon size.

Returns basic toolbar height according to preferred icons size. Used by toolbar layout manager.

Returns:
basic toolbar height
Since:
4.15

getUIClassID

public String getUIClassID()
Overrides:
getUIClassID in class JToolBar

rowCount

@Deprecated
public static int rowCount(int height)
Deprecated. Always returns 1

Compute with HEIGHT_TOLERANCE number of rows for specific toolbar height.

Parameters:
height - of some toolbar
Returns:
number of rows

setDnDListener

@Deprecated
public void setDnDListener(Toolbar.DnDListener l)
Deprecated. 

Set DnDListener to Toolbar.

Parameters:
l - DndListener for toolbar

fireDragToolbar

@Deprecated
protected void fireDragToolbar(int dx,
                                          int dy,
                                          int type)
Deprecated. There is no public support for toolbar drag and drop.

Parameters:
dx -
dy -
type -

fireDropToolbar

@Deprecated
protected void fireDropToolbar(int dx,
                                          int dy,
                                          int type)
Deprecated. There is no public support for toolbar drag and drop.

Parameters:
dx -
dy -
type -

getDisplayName

public String getDisplayName()
Returns:
Display name of this toolbar. Display name is localizable, on the contrary to the programmatic name

setDisplayName

public void setDisplayName(String displayName)
Sets new display name of this toolbar. Display name is localizable, on the contrary to the programmatic name


setUI

public void setUI(ToolBarUI ui)
Overrides:
setUI in class JToolBar

org.openide.loaders 7.10.1

Built on December 28 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.