Package com.explodingpixels.macwidgets
Class UnifiedToolBar
- java.lang.Object
-
- com.explodingpixels.macwidgets.UnifiedToolBar
-
public class UnifiedToolBar extends java.lang.ObjectA Mac style Unified Tool Bar. For a full description of what a Unified Tool Bar is, see the Toolbars section of Apple's Human Interface Guidelines. Here's an example of the what this method creates:
Here's a simple example that creates a Unified Tool Bar with a single button:UnifiedToolBar toolBar = new UnifiedToolBar(); JButton button = new JButton("My Button"); button.putClientProperty("JButton.buttonType", "textured"); toolBar.addComponentToLeft(button);
-
-
Constructor Summary
Constructors Constructor Description UnifiedToolBar()Creates aUnifiedToolBarwith balanced ends.UnifiedToolBar(boolean forceSameWidth)Creates aUnifiedToolBar.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddComponentToCenter(javax.swing.JComponent toolToAdd)Adds the given component to the side of thisUnifiedToolbar.voidaddComponentToLeft(javax.swing.JComponent toolToAdd)Adds the given component to the left side of thisUnifiedToolbar.voidaddComponentToRight(javax.swing.JComponent toolToAdd)Adds the given component to the right side of thisUnifiedToolBar.voiddisableBackgroundPainter()Disables any custom background painter that may be installed.javax.swing.JComponentgetComponent()Gets the user interface component representing thisUnifiedToolBar.voidinstallWindowDraggerOnWindow(java.awt.Window window)Installs a drag listener on thisUnifiedToolBarsuch that if it is dragged, it will move the givenWindow.
-
-
-
Method Detail
-
addComponentToLeft
public void addComponentToLeft(javax.swing.JComponent toolToAdd)
Adds the given component to the left side of thisUnifiedToolbar.- Parameters:
toolToAdd- the tool to add to thisUnifiedToolbar.
-
addComponentToCenter
public void addComponentToCenter(javax.swing.JComponent toolToAdd)
Adds the given component to the side of thisUnifiedToolbar.- Parameters:
toolToAdd- the tool to add to thisUnifiedToolbar.
-
addComponentToRight
public void addComponentToRight(javax.swing.JComponent toolToAdd)
Adds the given component to the right side of thisUnifiedToolBar.- Parameters:
toolToAdd- the tool to add to thisUnifiedToolBar.
-
installWindowDraggerOnWindow
public void installWindowDraggerOnWindow(java.awt.Window window)
Installs a drag listener on thisUnifiedToolBarsuch that if it is dragged, it will move the givenWindow.- Parameters:
window- theWindowto move when the thisUnifiedToolbaris dragged.
-
getComponent
public javax.swing.JComponent getComponent()
Gets the user interface component representing thisUnifiedToolBar. The returnedJComponentshould be added to a container that will be displayed.- Returns:
- the user interface component representing this
UnifiedToolBar.
-
disableBackgroundPainter
public void disableBackgroundPainter()
Disables any custom background painter that may be installed.
-
-