java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.ToolBarUI javax.swing.plaf.basic.BasicToolBarUI
A Basic L&F implementation of ToolBarUI. This implementation is a "combined" view/controller.
Nested Class Summary | |
---|---|
class |
BasicToolBarUI.DockingListener
This |
protected class |
BasicToolBarUI.DragWindow
|
protected class |
BasicToolBarUI.FrameListener
|
protected class |
BasicToolBarUI.PropertyListener
|
protected class |
BasicToolBarUI.ToolBarContListener
|
protected class |
BasicToolBarUI.ToolBarFocusListener
|
Field Summary | |
---|---|
protected String |
constraintBeforeFloating
|
protected Color |
dockingBorderColor
|
protected Color |
dockingColor
|
protected MouseInputListener |
dockingListener
|
protected KeyStroke |
downKey
Deprecated. As of Java 2 platform v1.3. |
protected BasicToolBarUI.DragWindow |
dragWindow
|
protected Color |
floatingBorderColor
|
protected Color |
floatingColor
|
protected int |
focusedCompIndex
|
protected KeyStroke |
leftKey
Deprecated. As of Java 2 platform v1.3. |
protected PropertyChangeListener |
propertyListener
|
protected KeyStroke |
rightKey
Deprecated. As of Java 2 platform v1.3. |
protected JToolBar |
toolBar
|
protected ContainerListener |
toolBarContListener
|
protected FocusListener |
toolBarFocusListener
|
protected KeyStroke |
upKey
Deprecated. As of Java 2 platform v1.3. |
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 |
Constructor Summary | |
---|---|
BasicToolBarUI
() |
Method Summary | |
---|---|
boolean |
canDock
(
Component
c,
Point
p) |
protected MouseInputListener |
createDockingListener
() |
protected BasicToolBarUI.DragWindow |
createDragWindow
(
JToolBar
toolbar) |
protected JFrame |
createFloatingFrame
(
JToolBar
toolbar) No longer used, use BasicToolBarUI.createFloatingWindow(JToolBar) |
protected RootPaneContainer |
createFloatingWindow
(
JToolBar
toolbar) Creates a window which contains the toolbar after it has been dragged out from its container |
protected WindowListener |
createFrameListener
() |
protected Border |
createNonRolloverBorder
() Creates the non rollover border for toolbar components. |
protected PropertyChangeListener |
createPropertyListener
() |
protected Border |
createRolloverBorder
() Creates a rollover border for toolbar components. |
protected ContainerListener |
createToolBarContListener
() |
protected FocusListener |
createToolBarFocusListener
() |
static ComponentUI |
createUI
(
JComponent
c) |
protected void |
dragTo
(
Point
position,
Point
origin) |
protected void |
floatAt
(
Point
position,
Point
origin) |
Color |
getDockingColor
() Gets the color displayed when over a docking area |
Color |
getFloatingColor
() Gets the color displayed when over a floating area |
|
|
|
|
|
|
protected void |
installComponents
() |
protected void |
installDefaults
() |
protected void |
installKeyboardActions
() |
protected void |
installListeners
() |
protected void |
installNonRolloverBorders
(
JComponent
c) Installs non-rollover borders on all the child components of the JComponent. |
protected void |
installNormalBorders
(
JComponent
c) Installs normal borders on all the child components of the JComponent. |
protected void |
installRolloverBorders
(
JComponent
c) Installs rollover borders on all the child components of the JComponent. |
void |
installUI
(
JComponent
c) Configures the specified component appropriate for the look and feel. |
boolean |
isFloating
() |
boolean |
isRolloverBorders
() Returns a flag to determine whether rollover button borders are enabled. |
protected void |
navigateFocusedComp
(int direction) |
protected void |
paintDragWindow
(
Graphics
Paints the contents of the window used for dragging. |
protected void |
setBorderToNonRollover
(
Component
c) Sets the border of the component to have a non-rollover border which was created by createNonRolloverBorder. |
protected void |
setBorderToNormal
(
Component
c) Sets the border of the component to have a normal border. |
protected void |
setBorderToRollover
(
Component
c) Sets the border of the component to have a rollover border which was created by createRolloverBorder. |
void |
setDockingColor
(
Color
c) Sets the color displayed when over a docking area |
void |
setFloating
(boolean b,
Point
p) |
void |
setFloatingColor
(
Color
c) Sets the color displayed when over a floating area |
void |
setFloatingLocation
(int x, int y) |
void |
setOrientation
(int orientation) |
void |
setRolloverBorders
(boolean rollover) Sets the flag for enabling rollover borders on the toolbar and it will also install the apropriate border depending on the state of the flag. |
protected void |
uninstallComponents
() |
protected void |
uninstallDefaults
() |
protected void |
uninstallKeyboardActions
() |
protected void |
uninstallListeners
() |
void |
uninstallUI
(
JComponent
c) Reverses configuration which was done on the specified component during installUI. |
Methods inherited from class javax.swing.plaf. ComponentUI |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , getMaximumSize , getMinimumSize , getPreferredSize , paint , update |
Methods inherited from class java.lang. Object |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Field Detail |
---|
protected JToolBar toolBar
protected BasicToolBarUI.DragWindow dragWindow
protected int focusedCompIndex
protected Color dockingColor
protected Color floatingColor
protected Color dockingBorderColor
protected Color floatingBorderColor
protected MouseInputListener dockingListener
protected PropertyChangeListener propertyListener
protected ContainerListener toolBarContListener
protected FocusListener toolBarFocusListener
protected String constraintBeforeFloating
protected KeyStroke upKey
protected KeyStroke downKey
protected KeyStroke leftKey
protected KeyStroke rightKey
Constructor Detail |
---|
public BasicToolBarUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
public void uninstallUI(JComponent c)
protected void installDefaults()
protected void uninstallDefaults()
protected void installComponents()
protected void uninstallComponents()
protected void installListeners()
protected void uninstallListeners()
protected void installKeyboardActions()
protected void uninstallKeyboardActions()
protected void navigateFocusedComp(int direction)
protected Border createRolloverBorder()
Override this method to provide an alternate rollover border.
protected Border createNonRolloverBorder()
Override this method to provide an alternate rollover border.
protected JFrame createFloatingFrame(JToolBar toolbar)
protected RootPaneContainer createFloatingWindow(JToolBar toolbar)
protected BasicToolBarUI.DragWindow createDragWindow(JToolBar toolbar)
public boolean isRolloverBorders()
public void setRolloverBorders(boolean rollover)
protected void installRolloverBorders(JComponent c)
This is a convenience method to call setBorderToRollover for each child component.
protected void installNonRolloverBorders(JComponent c)
This is a convenience method to call setBorderToNonRollover for each child component.
protected void installNormalBorders(JComponent c)
This is a convenience method to call setBorderNormal for each child component.
protected void setBorderToRollover(Component c)
protected void setBorderToNonRollover(Component c)
protected void setBorderToNormal(Component c)
public voidpublicDimensionsetFloatingLocationgetMinimumSize(int x, int y)(JComponentc)
public booleanpublicDimensionisFloatinggetPreferredSize()(JComponentc)
publicDimensiongetMaximumSize(JComponentc)
public voidsetFloatingLocation(int x, int y)
public voidbooleansetFloatingisFloating(boolean b, Point p)()
public void setOrientationsetFloating(int orientation)(boolean b,Pointp)
public Colorpublic voidgetDockingColorsetOrientation()(int orientation)
public voidpublicColorsetDockingColorgetDockingColor( Color c)()
public Colorpublic voidgetFloatingColorsetDockingColor()(Colorc)
public voidpublicColorsetFloatingColorgetFloatingColor( Color c)()
public booleanvoidcanDocksetFloatingColor( ComponentColorc, Point p)c)
protected voidpublic booleandragTocanDock( PointComponentposition,c,Point origin)p)
protected void floatAtdragTo(Point position, Point origin)
protected ContainerListenerprotected voidcreateToolBarContListenerfloatAt()(Pointposition,Pointorigin)
protected FocusListenerContainerListenercreateToolBarFocusListenercreateToolBarContListener()
protected PropertyChangeListenerFocusListenercreatePropertyListenercreateToolBarFocusListener()
protected MouseInputListenerPropertyChangeListenercreateDockingListenercreatePropertyListener()
protected WindowListenerMouseInputListenercreateFrameListenercreateDockingListener()
protected voidprotectedWindowListenerpaintDragWindowcreateFrameListener( Graphics g)()