public static class DefToolItemRenderer.ToolItemImpl extends WWidgetImpl<javafx.scene.control.ButtonBase,org.eclipse.e4.ui.model.application.ui.menu.MToolItem> implements WToolItem<javafx.scene.Node>
WWidget.WidgetState
state
TAG_CHECKBOX
Constructor and Description |
---|
ToolItemImpl(org.eclipse.e4.ui.model.application.ui.menu.MToolItem domElement)
Create an instance of a tool item
|
Modifier and Type | Method and Description |
---|---|
void |
addStyleClasses(java.util.List<java.lang.String> classnames)
Add a list of style class names used for a CSS class-Selector in your css
|
void |
addStyleClasses(java.lang.String... classnames)
A styleclass names used for a CSS class-Selector in your css
|
protected void |
bindProperties(javafx.scene.control.ButtonBase widget)
Setup property bindings
|
protected javafx.scene.control.ButtonBase |
createWidget() |
protected void |
doCleanup()
Cleanup code to run
|
void |
removeStyleClasses(java.util.List<java.lang.String> classnames)
Add a list of style class names used for a CSS class-Selector in your css
|
void |
removeStyleClasses(java.lang.String... classnames)
A styleclass names used for a CSS class-Selector in your css
|
void |
setEnabled(boolean enabled)
Update the enabled state
|
void |
setHandled(boolean handled)
Inform the widget that it is backed by a handler
|
void |
setIconURI(java.lang.String uri)
Update the icon uri
|
void |
setLabel(java.lang.String label)
Update the label
|
void |
setOnActionCallback(java.lang.Runnable onActionCallback)
The callback invoked when the item is clicked
|
void |
setSelected(boolean selected)
Update the selection state
|
void |
setStyleId(java.lang.String id)
Set a style id used for an CSS ID-Selector in your css
|
void |
setTooltip(java.lang.String tooltip)
Update the tooltip
|
protected void |
setUserData(WWidgetImpl<javafx.scene.control.ButtonBase,org.eclipse.e4.ui.model.application.ui.menu.MToolItem> widget)
Associate user data with the widget
|
activate, bindProperty, deactivate, fireChange, getDomElement, getWidget, getWidgetState, init, isActive, registerActivationCallback, setDomElement, setPropertyChangeHandler, setWidgetState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, deactivate, getDomElement, getWidget, getWidgetState, isActive, registerActivationCallback, setDomElement, setPropertyChangeHandler, setWidgetState
@Inject public ToolItemImpl(@Named(value="fx.rendering.domElement") org.eclipse.e4.ui.model.application.ui.menu.MToolItem domElement)
domElement
- the model elementprotected void bindProperties(javafx.scene.control.ButtonBase widget)
WWidgetImpl
bindProperties
in class WWidgetImpl<javafx.scene.control.ButtonBase,org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
widget
- the widgetpublic void setHandled(boolean handled)
WToolItem
setHandled
in interface WToolItem<javafx.scene.Node>
handled
- true
if handled@Inject public void setLabel(@Named(value="localizedLabel") java.lang.String label)
label
- the label@Inject public void setTooltip(@Named(value="localizedTooltip") java.lang.String tooltip)
tooltip
- the tooltip@Inject public void setEnabled(@Named(value="enabled") boolean enabled)
enabled
- the enabled state@Inject public void setIconURI(@Named(value="iconURI") java.lang.String uri)
uri
- the icon uri@Inject public void setSelected(@Named(value="selected") boolean selected)
selected
- the new statepublic void setOnActionCallback(java.lang.Runnable onActionCallback)
WToolItem
setOnActionCallback
in interface WToolItem<javafx.scene.Node>
onActionCallback
- the callbackprotected void doCleanup()
WWidgetImpl
doCleanup
in class WWidgetImpl<javafx.scene.control.ButtonBase,org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
protected javafx.scene.control.ButtonBase createWidget()
createWidget
in class WWidgetImpl<javafx.scene.control.ButtonBase,org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
public void addStyleClasses(java.util.List<java.lang.String> classnames)
WWidget
addStyleClasses
in interface WWidget<org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
classnames
- list of classnamespublic void addStyleClasses(java.lang.String... classnames)
WWidget
addStyleClasses
in interface WWidget<org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
classnames
- the classnames to addpublic void removeStyleClasses(java.util.List<java.lang.String> classnames)
WWidget
removeStyleClasses
in interface WWidget<org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
classnames
- list of classnamespublic void removeStyleClasses(java.lang.String... classnames)
WWidget
removeStyleClasses
in interface WWidget<org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
classnames
- the classnames to addpublic void setStyleId(java.lang.String id)
WWidget
setStyleId
in interface WWidget<org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
protected void setUserData(WWidgetImpl<javafx.scene.control.ButtonBase,org.eclipse.e4.ui.model.application.ui.menu.MToolItem> widget)
WWidgetImpl
setUserData
in class WWidgetImpl<javafx.scene.control.ButtonBase,org.eclipse.e4.ui.model.application.ui.menu.MToolItem>
widget
- the widget