org.jhotdraw.gui.plaf.palette
Class PaletteToolBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ToolBarUI
-
- org.jhotdraw.gui.plaf.palette.PaletteToolBarUI
-
- All Implemented Interfaces:
- javax.swing.SwingConstants
public class PaletteToolBarUI extends javax.swing.plaf.ToolBarUI implements javax.swing.SwingConstantsToolBarUI for palette components.This UI differs from BasicToolBarUI, in that the component holding the toolbar is supposed to use BoxLayout instead of BorderLayout. This allows to have multiple toolbars in the same component. The toolbars can be reorderd in the component, but they are not allowed to float in their own floating window.
The JToolBar starts dragging only, if the drag starts over the insets of its border.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classPaletteToolBarUI.DockingListenerThis class should be treated as a "protected" inner class.
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringTOOLBAR_ICON_PROPERTYstatic java.lang.StringTOOLBAR_INSETS_OVERRIDE_PROPERTYstatic java.lang.StringTOOLBAR_TEXT_ICON_GAP_PROPERTY
-
Constructor Summary
Constructors Constructor and Description PaletteToolBarUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancanDock(java.awt.Component c, java.awt.Point p)static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)java.awt.ColorgetDockingColor()Gets the color displayed when over a docking areajava.awt.ColorgetFloatingColor()Gets the color displayed when over a floating areavoidinstallUI(javax.swing.JComponent c)booleanisFloating()booleanisRolloverBorders()Returns a flag to determine whether rollover button borders are enabled.voidsetDockingColor(java.awt.Color c)Sets the color displayed when over a docking areavoidsetFloating(boolean b, java.awt.Point p)voidsetFloatingColor(java.awt.Color c)Sets the color displayed when over a floating areavoidsetFloatingLocation(int x, int y)voidsetOrientation(int orientation)voidsetRolloverBorders(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.voiduninstallUI(javax.swing.JComponent c)
-
-
-
Field Detail
-
TOOLBAR_ICON_PROPERTY
public static final java.lang.String TOOLBAR_ICON_PROPERTY
- See Also:
- Constant Field Values
-
TOOLBAR_TEXT_ICON_GAP_PROPERTY
public static final java.lang.String TOOLBAR_TEXT_ICON_GAP_PROPERTY
- See Also:
- Constant Field Values
-
TOOLBAR_INSETS_OVERRIDE_PROPERTY
public static final java.lang.String TOOLBAR_INSETS_OVERRIDE_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.ComponentUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.ComponentUI
-
isRolloverBorders
public boolean isRolloverBorders()
Returns a flag to determine whether rollover button borders are enabled.- Returns:
- true if rollover borders are enabled; false otherwise
- Since:
- 1.4
- See Also:
setRolloverBorders(boolean)
-
setRolloverBorders
public 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.- Parameters:
rollover- if true, rollover borders are installed. Otherwise non-rollover borders are installed- Since:
- 1.4
- See Also:
isRolloverBorders()
-
setFloatingLocation
public void setFloatingLocation(int x, int y)
-
isFloating
public boolean isFloating()
-
setFloating
public void setFloating(boolean b, @Nullable java.awt.Point p)
-
setOrientation
public void setOrientation(int orientation)
-
getDockingColor
public java.awt.Color getDockingColor()
Gets the color displayed when over a docking area
-
setDockingColor
public void setDockingColor(java.awt.Color c)
Sets the color displayed when over a docking area
-
getFloatingColor
public java.awt.Color getFloatingColor()
Gets the color displayed when over a floating area
-
setFloatingColor
public void setFloatingColor(java.awt.Color c)
Sets the color displayed when over a floating area
-
canDock
public boolean canDock(java.awt.Component c, java.awt.Point p)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG