com.alee.laf.toolbar
Class WebToolBar

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 com.alee.laf.toolbar.WebToolBar
All Implemented Interfaces:
LanguageContainerMethods, ShapeProvider, SizeMethods<WebToolBar>, SwingMethods, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants

public class WebToolBar
extends javax.swing.JToolBar
implements ShapeProvider, SizeMethods<WebToolBar>, LanguageContainerMethods

User: mgarin Date: 23.08.11 Time: 16:15

See Also:
Serialized Form

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
WebToolBar()
           
WebToolBar(int orientation)
           
WebToolBar(java.lang.String name)
           
WebToolBar(java.lang.String name, int orientation)
           
 
Method Summary
 void add(java.awt.Component... components)
           
 void add(int index, java.awt.Component... components)
           
 void add(java.util.List<? extends java.awt.Component> components)
           
 void add(java.util.List<? extends java.awt.Component> components, int index)
          Additional childs interaction methods
 void add(java.util.List<? extends java.awt.Component> components, java.lang.String constraints)
           
 void add(java.lang.String constraints, java.awt.Component... components)
           
 void addFill(java.awt.Component component)
           
 void addSeparator()
           
 WebSeparator addSeparator(int spacing)
           
 WebSeparator addSeparator(java.lang.String constrain)
           
 WebSeparator addSeparator(java.lang.String constrain, int spacing)
           
 WebSeparator addSeparatorToEnd()
           
 WebSeparator addSeparatorToEnd(int spacing)
           
 void addSpacing()
           
 void addSpacing(int spacing)
           
 void addSpacing(int spacing, java.lang.String constrain)
           
 void addSpacingToEnd()
           
 void addSpacingToEnd(int spacing)
           
 void addToEnd(java.awt.Component component)
           
 void addToMiddle(java.awt.Component component)
          Additional toolbar element methods
 java.awt.Color getBorderColor()
           
 java.awt.Color getBottomBgColor()
           
 java.awt.Component getFirstComponent()
           
 java.lang.String getLanguageContainerKey()
          Returns language container key for container which implements this interface.
 java.awt.Component getLastComponent()
           
 java.awt.Insets getMargin()
           
 int getMinimumHeight()
          Returns component minimum height.
 int getMinimumWidth()
          Returns component minimum width.
 Painter getPainter()
           
 int getPreferredHeight()
          Returns component preferred height.
 java.awt.Dimension getPreferredSize()
          Returns component preferred size.
 int getPreferredWidth()
          Returns component preferred width.
 int getRound()
           
 int getShadeWidth()
           
 int getSpacing()
           
 ToolbarLayout getToolbarLayout()
           
 ToolbarStyle getToolbarStyle()
           
 java.awt.Color getTopBgColor()
           
 WebToolBarUI getWebUI()
           
 boolean isFloating()
           
 boolean isUndecorated()
          UI methods
 java.awt.Shape provideShape()
          Returns component shape.
 void removeLanguageContainerKey()
          Removes language container key for container which implements this interface.
 void setBorderColor(java.awt.Color lowerBorderColor)
           
 void setBottomBgColor(java.awt.Color bottomBgColor)
           
 void setLanguageContainerKey(java.lang.String key)
          Sets language container key for container which implements this interface.
 void setMargin(java.awt.Insets margin)
           
 void setMargin(int spacing)
           
 void setMargin(int top, int left, int bottom, int right)
           
 WebToolBar setMinimumHeight(int minimumHeight)
          Sets component minimum height.
 WebToolBar setMinimumWidth(int minimumWidth)
          Sets component minimum width.
 void setPainter(Painter painter)
           
 WebToolBar setPreferredHeight(int preferredHeight)
          Sets component preferred height.
 WebToolBar setPreferredWidth(int preferredWidth)
          Sets component preferred width.
 void setRound(int round)
           
 void setShadeWidth(int shadeWidth)
           
 void setSpacing(int spacing)
           
 void setToolbarStyle(ToolbarStyle toolbarStyle)
           
 void setTopBgColor(java.awt.Color topBgColor)
           
 void setUndecorated(boolean undecorated)
           
 void updateUI()
           
 
Methods inherited from class javax.swing.JToolBar
add, addImpl, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setOrientation, setRollover, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, 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, 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, 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, remove, remove, removeAll, 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

WebToolBar

public WebToolBar()

WebToolBar

public WebToolBar(java.lang.String name)

WebToolBar

public WebToolBar(java.lang.String name,
                  int orientation)

WebToolBar

public WebToolBar(int orientation)
Method Detail

addToMiddle

public void addToMiddle(java.awt.Component component)
Additional toolbar element methods


addFill

public void addFill(java.awt.Component component)

addToEnd

public void addToEnd(java.awt.Component component)

addSeparator

public void addSeparator()
Overrides:
addSeparator in class javax.swing.JToolBar

addSeparatorToEnd

public WebSeparator addSeparatorToEnd()

addSeparator

public WebSeparator addSeparator(java.lang.String constrain)

addSeparator

public WebSeparator addSeparator(int spacing)

addSeparatorToEnd

public WebSeparator addSeparatorToEnd(int spacing)

addSeparator

public WebSeparator addSeparator(java.lang.String constrain,
                                 int spacing)

addSpacing

public void addSpacing()

addSpacing

public void addSpacing(int spacing)

addSpacingToEnd

public void addSpacingToEnd()

addSpacingToEnd

public void addSpacingToEnd(int spacing)

addSpacing

public void addSpacing(int spacing,
                       java.lang.String constrain)

add

public void add(java.util.List<? extends java.awt.Component> components,
                int index)
Additional childs interaction methods


add

public void add(java.util.List<? extends java.awt.Component> components,
                java.lang.String constraints)

add

public void add(java.util.List<? extends java.awt.Component> components)

add

public void add(int index,
                java.awt.Component... components)

add

public void add(java.lang.String constraints,
                java.awt.Component... components)

add

public void add(java.awt.Component... components)

getFirstComponent

public java.awt.Component getFirstComponent()

getLastComponent

public java.awt.Component getLastComponent()

isUndecorated

public boolean isUndecorated()
UI methods


setUndecorated

public void setUndecorated(boolean undecorated)

getPainter

public Painter getPainter()

setPainter

public void setPainter(Painter painter)

getRound

public int getRound()

setRound

public void setRound(int round)

getShadeWidth

public int getShadeWidth()

setShadeWidth

public void setShadeWidth(int shadeWidth)

getMargin

public java.awt.Insets getMargin()
Overrides:
getMargin in class javax.swing.JToolBar

setMargin

public void setMargin(java.awt.Insets margin)
Overrides:
setMargin in class javax.swing.JToolBar

setMargin

public void setMargin(int top,
                      int left,
                      int bottom,
                      int right)

setMargin

public void setMargin(int spacing)

getToolbarStyle

public ToolbarStyle getToolbarStyle()

setToolbarStyle

public void setToolbarStyle(ToolbarStyle toolbarStyle)

getSpacing

public int getSpacing()

setSpacing

public void setSpacing(int spacing)

getTopBgColor

public java.awt.Color getTopBgColor()

setTopBgColor

public void setTopBgColor(java.awt.Color topBgColor)

getBottomBgColor

public java.awt.Color getBottomBgColor()

setBottomBgColor

public void setBottomBgColor(java.awt.Color bottomBgColor)

getBorderColor

public java.awt.Color getBorderColor()

setBorderColor

public void setBorderColor(java.awt.Color lowerBorderColor)

getToolbarLayout

public ToolbarLayout getToolbarLayout()

isFloating

public boolean isFloating()

provideShape

public java.awt.Shape provideShape()
Description copied from interface: ShapeProvider
Returns component shape.

Specified by:
provideShape in interface ShapeProvider
Returns:
component shape

getWebUI

public WebToolBarUI getWebUI()

updateUI

public void updateUI()
Overrides:
updateUI in class javax.swing.JToolBar

getPreferredWidth

public int getPreferredWidth()
Returns component preferred width.

Specified by:
getPreferredWidth in interface SizeMethods<WebToolBar>
Returns:
component preferred width

setPreferredWidth

public WebToolBar setPreferredWidth(int preferredWidth)
Sets component preferred width. Pass -1 to let component choose preferred width on its own.

Specified by:
setPreferredWidth in interface SizeMethods<WebToolBar>
Parameters:
preferredWidth - new component preferred width
Returns:
modified component

getPreferredHeight

public int getPreferredHeight()
Returns component preferred height.

Specified by:
getPreferredHeight in interface SizeMethods<WebToolBar>
Returns:
component preferred height

setPreferredHeight

public WebToolBar setPreferredHeight(int preferredHeight)
Sets component preferred height. Pass -1 to let component choose preferred height on its own.

Specified by:
setPreferredHeight in interface SizeMethods<WebToolBar>
Parameters:
preferredHeight - new component preferred height
Returns:
modified component

getMinimumWidth

public int getMinimumWidth()
Returns component minimum width.

Specified by:
getMinimumWidth in interface SizeMethods<WebToolBar>
Returns:
component minimum width

setMinimumWidth

public WebToolBar setMinimumWidth(int minimumWidth)
Sets component minimum width. Pass -1 to let component choose minimum width on its own.

Specified by:
setMinimumWidth in interface SizeMethods<WebToolBar>
Parameters:
minimumWidth - new component minimum width
Returns:
modified component

getMinimumHeight

public int getMinimumHeight()
Returns component minimum height.

Specified by:
getMinimumHeight in interface SizeMethods<WebToolBar>
Returns:
component minimum height

setMinimumHeight

public WebToolBar setMinimumHeight(int minimumHeight)
Sets component minimum height. Pass -1 to let component choose minimum height on its own.

Specified by:
setMinimumHeight in interface SizeMethods<WebToolBar>
Parameters:
minimumHeight - new component minimum height
Returns:
modified component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns component preferred size.

Specified by:
getPreferredSize in interface SizeMethods<WebToolBar>
Overrides:
getPreferredSize in class javax.swing.JComponent
Returns:
component preferred size

setLanguageContainerKey

public void setLanguageContainerKey(java.lang.String key)
Sets language container key for container which implements this interface.

Specified by:
setLanguageContainerKey in interface LanguageContainerMethods
Parameters:
key - language container key

removeLanguageContainerKey

public void removeLanguageContainerKey()
Removes language container key for container which implements this interface.

Specified by:
removeLanguageContainerKey in interface LanguageContainerMethods

getLanguageContainerKey

public java.lang.String getLanguageContainerKey()
Returns language container key for container which implements this interface.

Specified by:
getLanguageContainerKey in interface LanguageContainerMethods
Returns:
language container key for container which implements this interface