public final class ToolBarButtonBuilder extends Object
You should not use this class directly. Instead use ToolBarBuilder.
| Modifier and Type | Field and Description |
|---|---|
private JButton |
button
The built button.
|
private ToolBarBuilder |
parent
The tool bar builder which creates the tool bar to which button will belong.
|
| Constructor and Description |
|---|
ToolBarButtonBuilder(Icon image,
ToolBarBuilder parent)
Package private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ToolBarButtonBuilder |
addListener(ActionListener listener)
Add a listener to the button.
|
ToolBarBuilder |
end()
Call if ready with building the button.
|
(package private) JButton |
getButton()
Get the built button.
|
ToolBarButtonBuilder |
toolTipText(String text)
Set tool tip text of the button.
|
private final JButton button
private final ToolBarBuilder parent
ToolBarButtonBuilder(Icon image, ToolBarBuilder parent)
ToolBarBuilder.image - Image of the button.parent - Constructing tool bar builder.JButton getButton()
public ToolBarButtonBuilder toolTipText(String text)
text - Tool tip text.public ToolBarButtonBuilder addListener(ActionListener listener)
listener - Action listener to handle events.public ToolBarBuilder end()
Copyright © 2012 Sven Strittmatter. All Rights Reserved.