Home about services products contact login
   com.smardec.asc

Advanced Swing Components

  animatepanel
  autocomplete
  dropdown
  filechooser
  fontchooser
  gradient
  hyperlink
  outlookpanel
  outlookpanel.renderers
  quick
  rotate
  sliderpanel
  spantable
  splashscreen
  statusbar
  table
  table.renderers
  table.wrappers
  tree
  treetable
  util
  xmlbars
  xmlbars.menubar
  xmlbars.toolbar
  xmlbars.toolbar.layouts
com.smardec.asc.xmlbars.toolbar
Class JAscToolBar

java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JToolBar
|
+--com.smardec.asc.xmlbars.toolbar.JAscToolBar
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.SwingConstants

public class JAscToolBar
extends javax.swing.JToolBar

JAscToolBar is a Swing component based on JToolBar that provides advanced layouting. Controls that cannot be placed on the toolbar due to lack of available space are put into dropdown menu.


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
JAscToolBar()
Creates a new tool bar.
JAscToolBar(int orientation)
Creates a new tool bar with the specified orientation.
JAscToolBar(java.lang.String name)
Creates a new tool bar with the specified name.
JAscToolBar(java.lang.String name, int orientation)
Creates a new tool bar with a specified name and orientation.
Method Summary
java.lang.String getId()
Returns toolbar id that is used by MenuToolBarManager.
boolean isToolBarFloating()
Indicates whether toolbar is floating now.
void setFloating(boolean floating)
Sets toolbar floating.
void setFloating(int x, int y, boolean floating)
Sets toolbar floating.
void setId(java.lang.String id)
Specifies toolbar id which is used by MenuToolBarManager.
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 javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
JAscToolBar
public JAscToolBar()

Creates a new tool bar. The default orientation is HORIZONTAL .


JAscToolBar
public JAscToolBar(java.lang.String name)
Creates a new tool bar with the specified name. The name is used as the title of the undocked tool bar. The default orientation is HORIZONTAL.

Parameters:
name -

JAscToolBar
public JAscToolBar(java.lang.String name, int orientation)
Creates a new tool bar with a specified name and orientation. All other constructors call this constructor. If orientation is an invalid value, an exception will be thrown.

Parameters:
name - the name of the tool bar
orientation - the initial orientation -- it must be either HORIZONTAL or VERTICAL
Throws:
java.lang.IllegalArgumentException - if orientation is neither HORIZONTAL nor VERTICAL

JAscToolBar
public JAscToolBar(int orientation)
Creates a new tool bar with the specified orientation. The orientation must be either HORIZONTAL or VERTICAL.

Parameters:
orientation - the orientation desired
Method Detail
getId
public java.lang.String getId()
Returns toolbar id that is used by MenuToolBarManager.

Returns:
toolbar id.
See Also:
setId(String)

setId
public void setId(java.lang.String id)
Specifies toolbar id which is used by MenuToolBarManager.

Parameters:
id - toolbar id
See Also:
getId()

setFloating
public void setFloating(int x, int y, boolean floating) throws java.lang.Exception
Sets toolbar floating. If floating is true sets this JAscToolBar floating with coordinates (x, y). If floating is false docks this JAscToolBar to its container.

Parameters:
x - x-coordinate of floating location
y - y-coordinate of floating location
floating - true to set floating, flase to dock the container
Throws:
java.lang.Exception - if ToolBarUI is not derive from BasicToolBarUI
See Also:
setFloating(boolean), JToolBar.setFloatable(boolean)

setFloating
public void setFloating(boolean floating) throws java.lang.Exception
Sets toolbar floating. If floating is true sets this JAscToolBar floating with default coordinates (0, 0). If floating is false docks this JAscToolBar to its container.

Parameters:
floating - true to set floating, flase to dock the container
Throws:
java.lang.Exception - if ToolBarUI is not derive from BasicToolBarUI
See Also:
setFloating(int, int, boolean), JToolBar.setFloatable(boolean)

isToolBarFloating
public boolean isToolBarFloating() throws java.lang.Exception
Indicates whether toolbar is floating now.

Returns:
true if this JAscToolBar is floating now, false otherwise.
Throws:
java.lang.Exception - if ToolBarUI is not derive from BasicToolBarUI
See Also:
JToolBar.setFloatable(boolean)
Home about services products contact login