public class BasicToolBarUI extends ToolBarUIimplements SwingConstants
| Modifier and Type | Class and Description |
|---|---|
class |
BasicToolBarUI
This class should be treated as a "protected" inner class.
|
protected class |
BasicToolBarUI
|
protected class |
BasicToolBarUI
|
protected class |
BasicToolBarUI
|
protected class |
BasicToolBarUI
|
protected class |
BasicToolBarUI
|
| Modifier and Type | Field and Description |
|---|---|
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
|
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.
|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description |
|---|
BasicToolBarUI()
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDock(Component
|
protected MouseInputListener |
createDockingListener()
|
protected BasicToolBarUI |
createDragWindow(JToolBar
|
protected JFrame |
createFloatingFrame(JToolBar
No longer used, use BasicToolBarUI.createFloatingWindow(JToolBar)
|
protected RootPaneContainer |
createFloatingWindow(JToolBar
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
|
protected void |
dragTo(Point
|
protected void |
floatAt(Point
|
Color |
getDockingColor()
Gets the color displayed when over a docking area
|
Color |
getFloatingColor()
Gets the color displayed when over a floating area
|
protected Border |
getNonRolloverBorder(AbstractButton
Returns a non-rollover border for the button.
|
protected Border |
getRolloverBorder(AbstractButton
Returns a rollover border for the button.
|
protected void |
installComponents()
|
protected void |
installDefaults()
|
protected void |
installKeyboardActions()
|
protected void |
installListeners()
|
protected void |
installNonRolloverBorders(JComponent
Installs non-rollover borders on all the child components of the JComponent.
|
protected void |
installNormalBorders(JComponent
Installs normal borders on all the child components of the JComponent.
|
protected void |
installRolloverBorders(JComponent
Installs rollover borders on all the child components of the JComponent.
|
void |
installUI(JComponent
Configures the specified component appropriately 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
Sets the border of the component to have a non-rollover border which was created by the
createNonRolloverBorder() method.
|
protected void |
setBorderToNormal(Component
Sets the border of the component to have a normal border.
|
protected void |
setBorderToRollover(Component
Sets the border of the component to have a rollover border which was created by the
createRolloverBorder() method.
|
void |
setDockingColor(Color
Sets the color displayed when over a docking area
|
void |
setFloating(boolean b, Point
|
void |
setFloatingColor(Color
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 appropriate border depending on the state of the flag.
|
protected void |
uninstallComponents()
|
protected void |
uninstallDefaults()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(JComponent
Reverses configuration which was done on the specified component during
installUI.
|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, updateprotected JToolBartoolBar
protected BasicToolBarUI.DragWindow dragWindow
protected int focusedCompIndex
protected ColordockingColor
protected ColorfloatingColor
protected ColordockingBorderColor
protected ColorfloatingBorderColor
protected MouseInputListenerdockingListener
protected PropertyChangeListenerpropertyListener
protected ContainerListenertoolBarContListener
protected FocusListenertoolBarFocusListener
protected StringconstraintBeforeFloating
@Deprecated protected KeyStrokeupKey
@Deprecated protected KeyStrokedownKey
@Deprecated protected KeyStrokeleftKey
@Deprecated protected KeyStrokerightKey
public static ComponentUIcreateUI(JComponent c)
public void installUI(JComponentc)
ComponentUI
ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
LayoutManager on the component if necessary. PropertyChangeListener on the component in order to detect and respond to component property changes appropriately. installUI in class
ComponentUI
c - the component where this UI delegate is being installed
ComponentUI.uninstallUI(javax.swing.JComponent) ,
JComponent.setUI(javax.swing.plaf.ComponentUI) ,
JComponent.updateUI()
public void uninstallUI(JComponentc)
ComponentUI
installUI. This method is invoked when this
UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in
installUI, being careful to leave the
JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
uninstallUI in class
ComponentUI
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
ComponentUI.installUI(javax.swing.JComponent) ,
JComponent.updateUI()
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 BordercreateRolloverBorder()
Override this method to provide an alternate rollover border.
protected BordercreateNonRolloverBorder()
Override this method to provide an alternate rollover border.
protected JFramecreateFloatingFrame(JToolBar toolbar)
protected RootPaneContainercreateFloatingWindow(JToolBar toolbar)
RootPaneContainer object, containing the toolbar.
protected BasicToolBarUI.DragWindow createDragWindow(JToolBar toolbar)
public boolean isRolloverBorders()
setRolloverBorders(boolean)
public void setRolloverBorders(boolean rollover)
rollover - if true, rollover borders are installed. Otherwise non-rollover borders are installed
isRolloverBorders()
protected void installRolloverBorders(JComponentc)
This is a convenience method to call setBorderToRollover for each child component.
c - container which holds the child components (usually a JToolBar)
setBorderToRollover(java.awt.Component)
protected void installNonRolloverBorders(JComponentc)
This is a convenience method to call setBorderToNonRollover for each child component.
c - container which holds the child components (usually a JToolBar)
setBorderToNonRollover(java.awt.Component)
protected void installNormalBorders(JComponentc)
This is a convenience method to call setBorderNormal for each child component.
c - container which holds the child components (usually a JToolBar)
setBorderToNonRollover(java.awt.Component)
protected void setBorderToRollover(Componentc)
createRolloverBorder() method.
c - component which will have a rollover border installed
createRolloverBorder()
protected BordergetRolloverBorder(AbstractButton b)
b - the button to calculate the rollover border for
setBorderToRollover(java.awt.Component)
protected void setBorderToNonRollover(Componentc)
createNonRolloverBorder() method.
c - component which will have a non-rollover border installed
createNonRolloverBorder()
protected BordergetNonRolloverBorder(AbstractButton b)
b - the button to calculate the non-rollover border for
setBorderToNonRollover(java.awt.Component)
protected void setBorderToNormal(Componentc)
c - component which will have a normal border re-installed
createNonRolloverBorder()
public void setFloatingLocation(int x,
int y)public boolean isFloating()
public void setFloating(boolean b,
Point p) public void setOrientation(int orientation)
public ColorgetDockingColor()
public void setDockingColor(Colorc)
public ColorgetFloatingColor()
public void setFloatingColor(Colorc)
protected ContainerListenercreateToolBarContListener()
protected FocusListenercreateToolBarFocusListener()
protected PropertyChangeListenercreatePropertyListener()
protected MouseInputListenercreateDockingListener()
protected WindowListenercreateFrameListener()
protected void paintDragWindow(Graphicsg)
g - Graphics to paint to.
NullPointerException - is
g is null