uic.themes
Class UICToolBarUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ToolBarUI
javax.swing.plaf.basic.BasicToolBarUI
javax.swing.plaf.metal.MetalToolBarUI
uic.themes.UICToolBarUI
- All Implemented Interfaces:
- SwingConstants
public class UICToolBarUI
- extends MetalToolBarUI
Fields inherited from class javax.swing.plaf.basic.BasicToolBarUI |
constraintBeforeFloating, dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKey |
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 |
Methods inherited from class javax.swing.plaf.metal.MetalToolBarUI |
createContainerListener, createNonRolloverBorder, createRolloverBorder, createRolloverListener, installListeners, installUI, setBorderToNonRollover, setDragOffset, uninstallListeners, uninstallUI, update |
Methods inherited from class javax.swing.plaf.basic.BasicToolBarUI |
canDock, createDragWindow, createFloatingFrame, createFloatingWindow, createFrameListener, createPropertyListener, createToolBarContListener, createToolBarFocusListener, getDockingColor, getFloatingColor, installComponents, installKeyboardActions, installNonRolloverBorders, installNormalBorders, installRolloverBorders, isFloating, isRolloverBorders, navigateFocusedComp, paintDragWindow, setBorderToNormal, setBorderToRollover, setDockingColor, setFloating, setFloatingColor, setFloatingLocation, setOrientation, setRolloverBorders, uninstallComponents, uninstallKeyboardActions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toolBarContainer
protected ToolBarContainer toolBarContainer
windowRepresenter
protected WindowRepresenter windowRepresenter
dockedLength
protected static final int dockedLength
- See Also:
- Constant Field Values
dockedWidth
protected static final int dockedWidth
- See Also:
- Constant Field Values
ancestorListener
protected AncestorListener ancestorListener
windowMovedListener
protected WindowDroppedListener windowMovedListener
UICToolBarUI
public UICToolBarUI()
createUI
public static ComponentUI createUI(JComponent c)
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in class BasicToolBarUI
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in class BasicToolBarUI
dragTo
protected void dragTo(Point position,
Point origin)
- Called to move the window and update possible feedback.
This method will move the 'preview' version of the toolbar.
- Overrides:
dragTo
in class BasicToolBarUI
- Parameters:
position
- offset from originorigin
- the origin of the current position of the toolbar.
floatAt
protected void floatAt(Point position,
Point origin)
- Called when the toolbar is moved to a certain location.
This method will move the toolbar itself, and decide where to dock; if possible.
- Overrides:
floatAt
in class BasicToolBarUI
getDragWindowLocation
protected Point getDragWindowLocation(ToolBarContainer tbc,
Point screenPoint)
- Check if toolbar can be docked.
Given a toolbarContainer and a point on screen; will the toolbar at that
point dock? If so then return a preview location.
- Parameters:
tbc
- the toolbar container where the toolbar might dock.screenPoint
- a point relative to the screen where the mouse is.
- Returns:
- a location for the preview screen, or null when the screenpoint is outside the tbc
createDockingListener
protected MouseInputListener createDockingListener()
- Overrides:
createDockingListener
in class MetalToolBarUI
floatedWindowSlot
protected void floatedWindowSlot()
- Called when the toolbar was 'floated'.
What is done here is that the toolbar, in an ExtraWindow, gets a listener
that fires at every move. The code calls tryToDropFloatingToolbar which
checks if the ExtraWindow is moved into a position where it can be dropped onto
an open container.
tryToDropFloatingToolbar
protected void tryToDropFloatingToolbar(WindowDroppedEvent e)
- Try to drop the floating toolbar in an existing ToolBarContainer.
Copyright © 2002-2004 Thomas Zander Available under the Free Apache licence