Overview
An implementation of a "push" button. Encapsulates javax.swing.JButton.
Attribute Summary
name | type | description |
---|---|---|
Public | ||
borderPainted | Boolean |
Sets whether (if this button has a border) the border is painted. |
contentAreaFilled | Boolean |
Sets whether this button will paint the content area. |
defaultButton | Boolean |
Determines whether this is the default button within a dialog. |
defaultCancelButton | Boolean |
Determines whether this is the default cancel button within a dialog. |
disabledIcon | Icon |
Sets this button's disabled icon. |
disabledSelectedIcon | Icon |
Sets this button's disabled selected icon. |
focusPainted | Boolean |
Sets whether the focus state is painted for this button. |
horizontalAlignment | HorizontalAlignment |
Sets the horizontal alignment of the the icon and text.
|
horizontalTextPosition | HorizontalAlignment |
Sets the horizontal position of the text relative to the icon.
|
icon | Icon |
Sets this button's default icon. |
iconTextGap | Number |
Sets the amount of space between the text and the icon displayed in this button. |
margin | Insets |
Sets space for margin between this button's border and the label. |
mnemonic | KeyStroke |
Sets this button's mnemonic. |
pressedIcon | Icon |
Sets this button's pressed icon. |
rolloverEnabled | Boolean |
Sets whether rollover effects are enabled for this button. |
rolloverIcon | Icon |
Sets this button's rollover icon. |
rolloverSelectedIcon | Icon |
Sets this button's selected rollover icon. |
selectedIcon | Icon |
Sets this button's selected icon. |
text | String |
Sets this button's text. |
verticalAlignment | VerticalAlignment |
Sets the vertical alignment of the icon and text.
|
verticalTextPosition | VerticalAlignment |
Sets the vertical position of the text relative to the icon.
|
Protected |
Inherited Attributes
javafx.ui.Widget
public | name | type |
---|---|---|
alignmentX | Number |
Returns the alignment along the x axis. |
alignmentY | Number |
Returns the alignment along the y axis. |
awtBackground | Color | |
awtFont | Font | |
awtForeground | Color | |
background | Color |
Sets the background color of this component. |
border | Border |
Sets the border of this component. |
component | JComponent | |
componentOrientation | ComponentOrientation |
Sets the language-sensitive orientation that is to be used to order the elements or text within this component. |
cursor | Cursor |
Sets the cursor image to the specified cursor. |
doubleBuffered | Boolean |
Sets whether the this component should use a buffer to paint. |
enabled | Boolean |
True when the object is enabled. |
focusable | Boolean |
Sets the focusable state of this Widget to the specified value. |
focused | Boolean | |
focusTraversalKeysEnabled | Boolean | |
font | Font |
Sets the |
foreground | Color |
Sets the foreground color of this component. |
height | Number |
Sets the height of this component. |
keyboardAction | KeyboardAction[] | |
keyListener | KeyListener | |
maximumSize | Dimension |
Sets the maximum size of this component to a constant value. |
minimumSize | Dimension |
Sets the minimum size of this component to a constant value. |
mouseListener | MouseListener | |
mouseMotionListener | MouseMotionListener | |
mouseWheelListener | MouseWheelListener | |
name | String | |
onKeyDown | function(:KeyEvent):Void |
|
onKeyTyped | function(:KeyEvent):Void |
|
onKeyUp | function(:KeyEvent):Void |
|
onMouseClicked | function(:MouseEvent):Void |
|
onMouseDragged | function(:MouseEvent):Void |
|
onMouseEntered | function(:MouseEvent):Void |
|
onMouseExited | function(:MouseEvent):Void |
|
onMouseMoved | function(:MouseEvent):Void |
|
onMousePressed | function(:MouseEvent):Void |
|
onMouseReleased | function(:MouseEvent):Void |
|
onMouseWheelMoved | function(:MouseWheelEvent):Void |
|
opaque | Boolean |
If true the component paints every pixel within its bounds. |
preferredSize | Dimension | |
size | Dimension |
Resizes this component to the specified dimensions. |
sizeToFitColumn | Boolean |
Hint to GroupLayout to make this component's width equal to others in the same column |
sizeToFitRow | Boolean |
Hint to GroupLayout to make this component's height equal to others in the same row |
toolTipText | String |
Registers the text to display in a tool tip. |
visible | Boolean |
True when the object is visible. |
width | Number |
Sets width of this component. |
x | Number |
Sets the x coordinate of this component within its parent. |
y | Number |
Sets the y coordinate of this component within its parent. |
javafx.ui.GroupElement
public | name | type |
---|---|---|
column | Column |
The column this element is contained in within a GroupLayout. |
horizontal | Spring |
Optional horizontal spring that determines the horizontal resizing behavior of this element when contained in a GroupLayout. |
row | Row |
The row this element is contained in within a GroupLayout. |
vertical | Spring |
Optional vertical spring that determines the vertical resizing behavior of this element when contained in a GroupLayout. |
javafx.ui.UIElement
public | name | type |
---|---|---|
context | UIContext | |
lookAndFeel | String |
javafx.ui.ActionWidget
public | name | type |
---|---|---|
action | function():Void |
Function which implements this widget's action. |
javafx.ui.Widget
public | name | type |
---|---|---|
alignmentX | Number |
Returns the alignment along the x axis. |
alignmentY | Number |
Returns the alignment along the y axis. |
awtBackground | Color | |
awtFont | Font | |
awtForeground | Color | |
background | Color |
Sets the background color of this component. |
border | Border |
Sets the border of this component. |
component | JComponent | |
componentOrientation | ComponentOrientation |
Sets the language-sensitive orientation that is to be used to order the elements or text within this component. |
cursor | Cursor |
Sets the cursor image to the specified cursor. |
doubleBuffered | Boolean |
Sets whether the this component should use a buffer to paint. |
enabled | Boolean |
True when the object is enabled. |
focusable | Boolean |
Sets the focusable state of this Widget to the specified value. |
focused | Boolean | |
focusTraversalKeysEnabled | Boolean | |
font | Font |
Sets the |
foreground | Color |
Sets the foreground color of this component. |
height | Number |
Sets the height of this component. |
keyboardAction | KeyboardAction[] | |
keyListener | KeyListener | |
maximumSize | Dimension |
Sets the maximum size of this component to a constant value. |
minimumSize | Dimension |
Sets the minimum size of this component to a constant value. |
mouseListener | MouseListener | |
mouseMotionListener | MouseMotionListener | |
mouseWheelListener | MouseWheelListener | |
name | String | |
onKeyDown | function(:KeyEvent):Void |
|
onKeyTyped | function(:KeyEvent):Void |
|
onKeyUp | function(:KeyEvent):Void |
|
onMouseClicked | function(:MouseEvent):Void |
|
onMouseDragged | function(:MouseEvent):Void |
|
onMouseEntered | function(:MouseEvent):Void |
|
onMouseExited | function(:MouseEvent):Void |
|
onMouseMoved | function(:MouseEvent):Void |
|
onMousePressed | function(:MouseEvent):Void |
|
onMouseReleased | function(:MouseEvent):Void |
|
onMouseWheelMoved | function(:MouseWheelEvent):Void |
|
opaque | Boolean |
If true the component paints every pixel within its bounds. |
preferredSize | Dimension | |
size | Dimension |
Resizes this component to the specified dimensions. |
sizeToFitColumn | Boolean |
Hint to GroupLayout to make this component's width equal to others in the same column |
sizeToFitRow | Boolean |
Hint to GroupLayout to make this component's height equal to others in the same row |
toolTipText | String |
Registers the text to display in a tool tip. |
visible | Boolean |
True when the object is visible. |
width | Number |
Sets width of this component. |
x | Number |
Sets the x coordinate of this component within its parent. |
y | Number |
Sets the y coordinate of this component within its parent. |
javafx.ui.GroupElement
public | name | type |
---|---|---|
column | Column |
The column this element is contained in within a GroupLayout. |
horizontal | Spring |
Optional horizontal spring that determines the horizontal resizing behavior of this element when contained in a GroupLayout. |
row | Row |
The row this element is contained in within a GroupLayout. |
vertical | Spring |
Optional vertical spring that determines the vertical resizing behavior of this element when contained in a GroupLayout. |
javafx.ui.UIElement
public | name | type |
---|---|---|
context | UIContext | |
lookAndFeel | String |
Function Summary
- public createComponent() : JComponent
Inherited Functions
javafx.ui.Widget
- protected abstract createComponent() : JComponent
-
factory method to create the underlying Swing component
- public getComponent() : JComponent
- public getJComponent() : JComponent
- public getMaximumSize() : Dimension
-
Returns the current maximum size of this component
- public getMinimumSize() : Dimension
-
Returns the current minimum size of this component
- public getNonScrollPaneComponent() : JComponent
- public getPreferredSize() : Dimension
-
Returns the current preferred size of this component
- public getSize() : Dimension
- public bound getWindow() : Window
- protected installMouseListener() : Void
- protected installMouseMotionListener() : Void
- protected installMouseWheelListener() : Void
- protected onSetOpaque(value: Boolean, ) : Void
- public requestFocus() : Void
javafx.ui.UIElement
- public static __EASE(a: Object, t: Number, f: Function1, interpolate: Function3, ) : Object
- public static __EASEBOTH(t: Number, ) : Number
- public static __EASEIN(t: Number, ) : Number
- public static __EASEOUT(t: Number, ) : Number
- public static __INTERPOLATE_NUM(value1: Number, value2: Number, t: Number, ) : Number
- public static cmToPixel(cm: Number, ) : Number
- public static DISCRETE(a: Number, t: Number, ) : Number
- public static EASEBOTH(a: Number, t: Number, ) : Number
- public static EASEIN(a: Number, t: Number, ) : Number
- public static EASEOUT(a: Number, t: Number, ) : Number
- public static getScreenResolution() : Integer
- public static getUIContext() : UIContext
- public bound getWindow() : Window
- public static inchToPixel(inch: Number, ) : Number
- public static LINEAR(a: Number, t: Number, ) : Number
- public static mmToPixel(mm: Number, ) : Number
- public static pointToPixel(pt: Integer, ) : Number
javafx.ui.Widget
- protected abstract createComponent() : JComponent
-
factory method to create the underlying Swing component
- public getComponent() : JComponent
- public getJComponent() : JComponent
- public getMaximumSize() : Dimension
-
Returns the current maximum size of this component
- public getMinimumSize() : Dimension
-
Returns the current minimum size of this component
- public getNonScrollPaneComponent() : JComponent
- public getPreferredSize() : Dimension
-
Returns the current preferred size of this component
- public getSize() : Dimension
- public bound getWindow() : Window
- protected installMouseListener() : Void
- protected installMouseMotionListener() : Void
- protected installMouseWheelListener() : Void
- protected onSetOpaque(value: Boolean, ) : Void
- public requestFocus() : Void
javafx.ui.UIElement
- public static __EASE(a: Object, t: Number, f: Function1, interpolate: Function3, ) : Object
- public static __EASEBOTH(t: Number, ) : Number
- public static __EASEIN(t: Number, ) : Number
- public static __EASEOUT(t: Number, ) : Number
- public static __INTERPOLATE_NUM(value1: Number, value2: Number, t: Number, ) : Number
- public static cmToPixel(cm: Number, ) : Number
- public static DISCRETE(a: Number, t: Number, ) : Number
- public static EASEBOTH(a: Number, t: Number, ) : Number
- public static EASEIN(a: Number, t: Number, ) : Number
- public static EASEOUT(a: Number, t: Number, ) : Number
- public static getScreenResolution() : Integer
- public static getUIContext() : UIContext
- public bound getWindow() : Window
- public static inchToPixel(inch: Number, ) : Number
- public static LINEAR(a: Number, t: Number, ) : Number
- public static mmToPixel(mm: Number, ) : Number
- public static pointToPixel(pt: Integer, ) : Number
Attributes
public borderPainted: Boolean
Sets whether (if this button has a border) the border is painted. Defaults to true.
public contentAreaFilled: Boolean
Sets whether this button will paint the content
area. If you wish to have a transparent button, such as
an icon-only button, for example, then you should set
this to false
. Defaults to true
.
public defaultButton: Boolean
Determines whether this is the default button within a dialog.
public defaultCancelButton: Boolean
Determines whether this is the default cancel button within a dialog.
public disabledIcon: Icon
Sets this button's disabled icon.
public disabledSelectedIcon: Icon
Sets this button's disabled selected icon.
public focusPainted: Boolean
Sets whether the focus state is painted for this button.
The default value for the focusPainted
attribute
is true
.
Some look and feels might not paint focus state;
they will ignore this property.
public horizontalAlignment: HorizontalAlignment
Sets the horizontal alignment of the the icon and text.
One of the following values:
- CENTER
- LEADING
- TRAILING (the default)
public horizontalTextPosition: HorizontalAlignment
Sets the horizontal position of the text relative to the icon.
One of the following values:
- CENTER
- LEADING
- TRAILING (the default)
public icon: Icon
Sets this button's default icon.
public iconTextGap: Number
Sets the amount of space between the text and the icon displayed in this button.
public margin: Insets
Sets space for margin between this button's border and
the label. Setting to null
will cause this button to
use the default margin. The button's default Border
object will use this value to create the proper margin.
However, if a non-default border is set on the button,
it is that Border
object's responsibility to create the
appropriate margin space (else this property will
effectively be ignored).
public mnemonic: KeyStroke
Sets this button's mnemonic.
public pressedIcon: Icon
Sets this button's pressed icon.
public rolloverEnabled: Boolean
Sets whether rollover effects are enabled for this button. Defaults to true.
public rolloverIcon: Icon
Sets this button's rollover icon.
public rolloverSelectedIcon: Icon
Sets this button's selected rollover icon.
public selectedIcon: Icon
Sets this button's selected icon.
public text: String
Sets this button's text.
public verticalAlignment: VerticalAlignment
Sets the vertical alignment of the icon and text.
One of the following values:
- CENTER (the default)
- TOP
- BOTTOM
public verticalTextPosition: VerticalAlignment
Sets the vertical position of the text relative to the icon.
One of the following values:
- CENTER (the default)
- TOP
- BOTTOM