T
- the value typeC
- the button typeB
- the builder typepublic interface ButtonBuilder<T,C extends AbstractButton,B extends ButtonBuilder<T,C,B>> extends ComponentBuilder<T,C,B>
TRANSFER_FOCUS_ON_ENTER
Modifier and Type | Method and Description |
---|---|
B |
action(Action action) |
B |
actionListener(ActionListener actionListener) |
static <B extends ButtonBuilder<Void,JButton,B>> |
builder() |
static <B extends ButtonBuilder<Void,JButton,B>> |
builder(Action action) |
B |
caption(String caption) |
B |
horizontalAlignment(int horizontalAlignment) |
B |
icon(Icon icon) |
B |
includeCaption(boolean includeCaption)
Note that setting this to false overrides caption from the action, if one is specified.
|
B |
margin(Insets insets) |
B |
mnemonic(int mnemonic) |
background, border, build, build, buildComponentValue, clear, clientProperty, componentListener, componentOrientation, enabled, enabledState, focusable, focusListener, font, foreground, initialValue, keyEvent, keyListener, label, linkedValue, linkedValueObserver, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator
B caption(String caption)
caption
- the captionAbstractButton.setText(String)
B mnemonic(int mnemonic)
mnemonic
- the mnemonicAbstractButton.setMnemonic(int)
B includeCaption(boolean includeCaption)
includeCaption
- specifies whether a caption should be includedB horizontalAlignment(int horizontalAlignment)
horizontalAlignment
- the horizontal alignmentB icon(Icon icon)
icon
- the iconAbstractButton.setIcon(Icon)
B margin(Insets insets)
insets
- the margin insetsAbstractButton.setMargin(Insets)
B action(Action action)
action
- the button actionAbstractButton.setAction(Action)
B actionListener(ActionListener actionListener)
actionListener
- the action listenerAbstractButton.addActionListener(ActionListener)
static <B extends ButtonBuilder<Void,JButton,B>> ButtonBuilder<Void,JButton,B> builder()
B
- the builder typestatic <B extends ButtonBuilder<Void,JButton,B>> ButtonBuilder<Void,JButton,B> builder(Action action)
B
- the builder typeaction
- the button action