ToolbarControls of WorkbenchFX.
Depending on the parameters defined in the constructor, the ToolbarItem changes its
visual appearance to either a Label, a Button or a MenuButton.
Using setGraphic(Node) offers additionally the possibility to add custom content.
But doing this might require additional custom styling.
| Modifier and Type | Field and Description |
|---|---|
| private static final double | ICON_RESIZING_FACTOR
Used to bind the fit size dimensions of an |
| private static final double | ICON_SIZE
According to the material design standards, a desktop icon should have a size of 16x16px. |
| private static final Logger | |
| private final ObjectProperty | |
| private static final String | TOOLBAR_BUTTON
The style class which is used to style the ToolbarItem as a Button. |
| private static final String | TOOLBAR_LABEL
The style class which is used to style the ToolbarItem as a Label. |
| private static final String | TOOLBAR_MENU_BUTTON
The style class which is used to style the ToolbarItem as a MenuButton. |
| private static final double | TOOLBAR_PADDING
The WorkbenchFX styles define a toolbar height of 40px with a padding of 3px on top and bottom. |
| private static final double | TOTAL_ICON_SIZE
The icon should be placed in a square of 40x40px as clearance. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ToolbarItem(String
to be displayed on the text)ToolbarItemCreates a new |
| public | ToolbarItem(Node
to be displayed on the graphic)ToolbarItemCreates a new |
| public | ToolbarItem(String
to be displayed on the text, Node ToolbarItemto be displayed on the graphic)ToolbarItemCreates a new |
| public | ToolbarItem(String
to be displayed on the text, EventHandler<? super MouseEvent> ToolbarItemthe function to be called when a mouse button has been clicked
(pressed and released) on this Control onClick)Creates a new |
| public | ToolbarItem(Node
the graphic to be displayed on the graphic, EventHandler<? super MouseEvent> ToolbarItemthe function to be called when a mouse button has been clicked
(pressed and released) on this Control onClick)Creates a new |
| public | ToolbarItem(String
the text to be displayed on the text, Node ToolbarItemthe graphic to be displayed on the graphic, EventHandler<? super MouseEvent> ToolbarItemthe function to be called when a mouse button has been clicked
(pressed and released) on this Control onClick)Creates a new |
| public | ToolbarItem(String
the text to be displayed on the text, MenuItem... ToolbarItemthe items to be displayed in the context-menu of the items)ToolbarItemCreates a new |
| public | ToolbarItem(Node
the graphic to be displayed on the graphic, MenuItem... ToolbarItemthe items to be displayed in the context-menu of the items)ToolbarItemCreates a new |
| public | ToolbarItem(String
the text to be displayed on the text, Node ToolbarItemthe graphic to be displayed on the graphic, MenuItem... ToolbarItemthe items to be displayed in the context-menu of the items)ToolbarItemCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public final EventHandler | |
| public final ObjectProperty | |
| public final void | |
| private void | |
| private void |
| ICON_RESIZING_FACTOR | back to summary |
|---|---|
| private static final double ICON_RESIZING_FACTOR Used to bind the fit size dimensions of an | |
| ICON_SIZE | back to summary |
|---|---|
| private static final double ICON_SIZE According to the material design standards, a desktop icon should have a size of 16x16px.
| |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| onClick | back to summary |
|---|---|
| private final ObjectProperty<EventHandler<? super MouseEvent>> onClick | |
| TOOLBAR_BUTTON | back to summary |
|---|---|
| private static final String TOOLBAR_BUTTON The style class which is used to style the ToolbarItem as a Button. | |
| TOOLBAR_LABEL | back to summary |
|---|---|
| private static final String TOOLBAR_LABEL The style class which is used to style the ToolbarItem as a Label. | |
| TOOLBAR_MENU_BUTTON | back to summary |
|---|---|
| private static final String TOOLBAR_MENU_BUTTON The style class which is used to style the ToolbarItem as a MenuButton. | |
| TOOLBAR_PADDING | back to summary |
|---|---|
| private static final double TOOLBAR_PADDING The WorkbenchFX styles define a toolbar height of 40px with a padding of 3px on top and bottom. | |
| TOTAL_ICON_SIZE | back to summary |
|---|---|
| private static final double TOTAL_ICON_SIZE The icon should be placed in a square of 40x40px as clearance. | |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem() Creates a new empty | |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(String text) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(Node graphic) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(String text, Node graphic) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(String text, EventHandler<? super MouseEvent> onClick) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(Node graphic, EventHandler<? super MouseEvent> onClick) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(String text, Node graphic, EventHandler<? super MouseEvent> onClick) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(String text, MenuItem... items) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(Node graphic, MenuItem... items) Creates a new
| |
| ToolbarItem | back to summary |
|---|---|
| public ToolbarItem(String text, Node graphic, MenuItem... items) Creates a new
| |
| getOnClick | back to summary |
|---|---|
| public final EventHandler | |
| onClickProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| setOnClick | back to summary |
|---|---|
| public final void setOnClick(EventHandler<? super MouseEvent> onClick) | |
| setupListeners | back to summary |
|---|---|
| private void setupListeners() | |
| updateStyleClasses | back to summary |
|---|---|
| private void updateStyleClasses() | |