| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class BasicToolBarUI extends ToolBarUI implements SwingConstants
A Basic L&F implementation of ToolBarUI. This implementation is a "combined" view/controller.
Nested Class Summary | |
---|---|
class |
This class should be treated as a "protected" inner class. |
protected class |
|
protected class |
|
protected class |
|
protected class |
|
protected class |
|
Field Summary | |
---|---|
protected String |
constraintBeforeFloating
|
protected Color |
dockingBorderColor
|
protected Color |
dockingColor
|
protected MouseInputListener |
dockingListener
|
protected KeyStroke |
downKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. |
protected BasicToolBarUI.DragWindow |
dragWindow
|
protected Color |
floatingBorderColor
|
protected Color |
floatingColor
|
protected int |
focusedCompIndex
|
protected KeyStroke |
leftKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. |
protected PropertyChangeListener |
propertyListener
|
protected KeyStroke |
rightKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. |
protected JToolBar |
toolBar
|
protected ContainerListener |
toolBarContListener
|
protected FocusListener |
toolBarFocusListener
|
protected KeyStroke |
upKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. |
Constructor Summary | |
---|---|
|
Method Summary | |
---|---|
boolean |
|
protected MouseInputListener |
|
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 |
|
protected Border |
Creates the non rollover border for toolbar components. |
protected PropertyChangeListener |
|
protected Border |
Creates a rollover border for toolbar components. |
protected ContainerListener |
|
protected FocusListener |
|
static ComponentUI |
|
protected void |
|
protected void |
|
Color |
Gets the color displayed when over a docking area |
Color |
Gets the color displayed when over a floating area |
protected Border |
Returns a non-rollover border for the button. |
protected Border |
Returns a rollover border for the button. |
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
Installs non-rollover borders on all the child components of the JComponent. |
protected void |
Installs normal borders on all the child components of the JComponent. |
protected void |
Installs rollover borders on all the child components of the JComponent. |
void |
Configures the specified component appropriate for the look and feel. |
boolean |
|
boolean |
Returns a flag to determine whether rollover button borders are enabled. |
protected void |
navigateFocusedComp(int direction) |
protected void |
Paints the contents of the window used for dragging. |
protected void |
Sets the border of the component to have a non-rollover border which was created by createNonRolloverBorder .
|
protected void |
Sets the border of the component to have a normal border. |
protected void |
Sets the border of the component to have a rollover border which was created by createRolloverBorder .
|
void |
Sets the color displayed when over a docking area |
void |
setFloating(boolean b, Point p) |
void |
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 |
|
protected void |
|
protected void |
|
protected void |
|
void |
Reverses configuration which was done on the specified component during installUI .
|
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String constraintBeforeFloating
protected Color dockingBorderColor
protected Color dockingColor
protected MouseInputListener dockingListener
protected KeyStroke downKey
protected BasicToolBarUI.DragWindow dragWindow
protected Color floatingBorderColor
protected Color floatingColor
protected int focusedCompIndex
protected KeyStroke leftKey
protected PropertyChangeListener propertyListener
protected KeyStroke rightKey
protected JToolBar toolBar
protected ContainerListener toolBarContListener
protected FocusListener toolBarFocusListener
protected KeyStroke upKey
Constructor Detail |
---|
public BasicToolBarUI()
Method Detail |
---|
public boolean canDock(Component c, Point p)
c
p
protected MouseInputListener createDockingListener()
protected BasicToolBarUI.DragWindow createDragWindow(JToolBar toolbar)
toolbar
protected JFrame createFloatingFrame(JToolBar toolbar)
toolbar
protected RootPaneContainer createFloatingWindow(JToolBar toolbar)
toolbar
RootPaneContainer
object, containing the toolbar.protected WindowListener createFrameListener()
protected Border createNonRolloverBorder()
Override this method to provide an alternate rollover border.
protected PropertyChangeListener createPropertyListener()
protected Border createRolloverBorder()
Override this method to provide an alternate rollover border.
protected ContainerListener createToolBarContListener()
protected FocusListener createToolBarFocusListener()
public static ComponentUI createUI(JComponent c)
c
protected void dragTo(Point position, Point origin)
position
origin
protected void floatAt(Point position, Point origin)
position
origin
public Color getDockingColor()
public Color getFloatingColor()
protected Border getNonRolloverBorder(AbstractButton b)
b
- the button to calculate the non-rollover border forprotected Border getRolloverBorder(AbstractButton b)
b
- the button to calculate the rollover border forprotected void installComponents()
protected void installDefaults()
protected void installKeyboardActions()
protected void installListeners()
protected void installNonRolloverBorders(JComponent c)
This is a convenience method to call setBorderToNonRollover
for each child component.
c
- container which holds the child components (usally a JToolBar)protected void installNormalBorders(JComponent c)
This is a convenience method to call setBorderNormal
for each child component.
c
- container which holds the child components (usally a JToolBar)protected void installRolloverBorders(JComponent c)
This is a convenience method to call setBorderToRollover
for each child component.
c
- container which holds the child components (usally a JToolBar)public void installUI(JComponent c)
installUI
in class ComponentUI
c
public boolean isFloating()
public boolean isRolloverBorders()
protected void navigateFocusedComp(int direction)
direction
protected void paintDragWindow(Graphics g)
g
- Graphics to paint to.protected void setBorderToNonRollover(Component c)
createNonRolloverBorder
.
c
- component which will have a non-rollover border installedprotected void setBorderToNormal(Component c)
c
- component which will have a normal border re-installedprotected void setBorderToRollover(Component c)
createRolloverBorder
.
c
- component which will have a rollover border installedpublic void setDockingColor(Color c)
c
public void setFloating(boolean b, Point p)
b
p
public void setFloatingColor(Color c)
c
public void setFloatingLocation(int x, int y)
x
y
public void setOrientation(int orientation)
orientation
public void setRolloverBorders(boolean rollover)
rollover
- if true, rollover borders are installed.
Otherwise non-rollover borders are installedprotected void uninstallComponents()
protected void uninstallDefaults()
protected void uninstallKeyboardActions()
protected void uninstallListeners()
public void uninstallUI(JComponent c)
uninstallUI
in class ComponentUI
c
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |