|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pietschy.command.DefaultToolbarFactory
public class DefaultToolbarFactory
Provides the default implementation of ToolbarFactory
. In its default configuration
this factory creates toolbars for which JToolBar.isFloatable()
is false and
buttons for which AbstractButton.isRolloverEnabled()
is true. All buttons are created
with a margin of 1 pixel.
setFloatable(boolean)
,
setRolloverEnabled(boolean)
,
setInsets(java.awt.Insets)
Constructor Summary | |
---|---|
DefaultToolbarFactory()
Creates a new factory that creates non-floatable toolbars and rollover enabled buttons. |
|
DefaultToolbarFactory(java.awt.Insets insets,
boolean floatable,
boolean rolloverEnabled)
Creates a new factory. |
Method Summary | |
---|---|
javax.swing.JButton |
createButton()
Creates a new JButton . |
javax.swing.JCheckBox |
createCheckBox()
Creates a new JCheckBox . |
javax.swing.JRadioButton |
createRadioButton()
Creates a new JRadioButton . |
javax.swing.AbstractButton |
createToggleButton()
Creates a new JToggleButton . |
javax.swing.JToolBar |
createToolbar()
Creates a new JToolBar . |
java.awt.Insets |
getInsets()
Gets the Insets this factory is applying to the buttons it creates. |
boolean |
isFloatable()
Checks if this factory is creating floatable toolbars. |
boolean |
isFocusable()
Checks if the factory is building focusable toolbars. |
boolean |
isRolloverEnabled()
Checks if this factory is creating rollover enabled buttons. |
void |
setFloatable(boolean floatable)
Configures if this factory is creating floatable toolbars. |
void |
setFocusable(boolean focusable)
Configure the factory to create focusable toolbars. |
void |
setInsets(java.awt.Insets insets)
Sets the Insets this factory will apply to the buttons it creates. |
void |
setRolloverEnabled(boolean rolloverEnabled)
Configures if this factory is creating rollover enabled buttons. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultToolbarFactory()
public DefaultToolbarFactory(java.awt.Insets insets, boolean floatable, boolean rolloverEnabled)
insets
- the insets to use for all buttons.floatable
- true if the toolbars created are to be
floatable, false otherwise.rolloverEnabled
- true if buttons created are to be rollover enabled,
false otherwise.Method Detail |
---|
public javax.swing.JButton createButton()
JButton
.
createButton
in interface ButtonFactory
JButton
.public javax.swing.JCheckBox createCheckBox()
JCheckBox
.
createCheckBox
in interface ButtonFactory
JCheckBox
.public javax.swing.JRadioButton createRadioButton()
JRadioButton
.
createRadioButton
in interface ButtonFactory
JRadioButton
.public javax.swing.AbstractButton createToggleButton()
JToggleButton
.
createToggleButton
in interface ButtonFactory
JToggleButton
.public javax.swing.JToolBar createToolbar()
JToolBar
.
createToolbar
in interface ToolbarFactory
JToolBar
.public java.awt.Insets getInsets()
Insets
this factory is applying to the buttons it creates.
Insets
this factory is applying to the buttons it creates.public void setInsets(java.awt.Insets insets)
Insets
this factory will apply to the buttons it creates.
insets
- the Insets
to use.public boolean isFloatable()
floatable
to true, false otherwise.public void setFloatable(boolean floatable)
floatable
- true to make this factory set floateable
to true, false otherwise.public boolean isRolloverEnabled()
rollover enabled
to true, false otherwise.public void setRolloverEnabled(boolean rolloverEnabled)
rolloverEnabled
- true to make this factory set rollover enabled
to true, false otherwise.public boolean isFocusable()
false
.
true
if the factory is building focusable toolbars, false
otherwise.public void setFocusable(boolean focusable)
false
.
focusable
- true
to create focusable toolbars, false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |