Class ActionButtonModel
java.lang.Object
org.csstudio.opibuilder.model.AbstractWidgetModel
org.csstudio.opibuilder.model.AbstractPVWidgetModel
org.csstudio.opibuilder.widgets.model.ActionButtonModel
- All Implemented Interfaces:
IPVWidgetModel
,ITextModel
,IAdaptable
,IPropertySource
- Direct Known Subclasses:
NativeButtonModel
An action button widget model.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The ID of this widget model.static final String
The index of the action to be executed when button is pushed.static final String
Image on the button.static final String
The index of the action to be executed when released.static final String
Button Stylestatic final String
Text on the button.static final String
If yes, the button will not bounce up when clicked.Fields inherited from class org.csstudio.opibuilder.model.AbstractWidgetModel
PROP_ACTIONS, PROP_BORDER_COLOR, PROP_BORDER_STYLE, PROP_BORDER_WIDTH, PROP_COLOR_BACKGROUND, PROP_COLOR_FOREGROUND, PROP_ENABLED, PROP_FONT, PROP_HEIGHT, PROP_NAME, PROP_RULES, PROP_SCALE_OPTIONS, PROP_SCRIPTS, PROP_SRC_CONNECTIONS, PROP_TGT_CONNECTIONS, PROP_TOOLTIP, PROP_VISIBLE, PROP_WIDGET_TYPE, PROP_WIDGET_UID, PROP_WIDTH, PROP_XPOS, PROP_YPOS, VERSION
Fields inherited from interface org.csstudio.opibuilder.model.IPVWidgetModel
PROP_ALARM_PULSING, PROP_BACKCOLOR_ALARMSENSITIVE, PROP_BORDER_ALARMSENSITIVE, PROP_FORECOLOR_ALARMSENSITIVE, PROP_PVNAME, PROP_PVVALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Configure the properties of the widget.int
Return the index of the selected WidgetAction from the ActionData.int
Return the index of the selected WidgetAction from the ActionData.getStyle()
getText()
Return the label text.org.osgi.framework.Version
boolean
Returns whether the button is a toggle button.void
setStyle
(ActionButtonModel.Style style) void
Methods inherited from class org.csstudio.opibuilder.model.AbstractPVWidgetModel
configureBaseProperties, getDelegate, getPVName, getTooltip, isAlarmPulsing, isBackColorAlarmSensitve, isBorderAlarmSensitve, isForeColorAlarmSensitve, processVersionDifference
Methods inherited from class org.csstudio.opibuilder.model.AbstractWidgetModel
addConnection, addProperty, addProperty, addPVProperty, doScale, flipHorizontally, flipHorizontally, flipVertically, flipVertically, generateNewWUID, getActionsInput, getAdapter, getAllPropertyIDs, getBackgroundColor, getBorderColor, getBorderStyle, getBorderWidth, getBounds, getCastedPropertyValue, getEditableValue, getExecutionMode, getFont, getForegroundColor, getHeight, getIndex, getLocation, getName, getNestedDepth, getOriginLocation, getOriginSize, getParent, getProperty, getPropertyDescriptors, getPropertyValue, getPVMap, getRawPropertyValue, getRawTooltip, getRGBFromColorProperty, getRootDisplayModel, getRootDisplayModel, getRulesInput, getRuntimePropertyList, getScaledSize, getScaleOptions, getScriptsInput, getSize, getSourceConnections, getSWTColorFromColorProperty, getTargetConnections, getType, getVersionOnFile, getWidgetType, getWidth, getWUID, getX, getY, isEnabled, isPropertySet, isVisible, removeProperty, removePVProperty, resetPropertyValue, rotate90, rotate90, scale, scaleConnections, setBackgroundColor, setBorderColor, setBorderStyle, setBorderWidth, setBounds, setBounds, setEnabled, setExecutionMode, setForegroundColor, setHeight, setLocation, setLocation, setName, setParent, setPropertyDescription, setPropertyValue, setPropertyValue, setPropertyVisible, setPropertyVisibleAndSavable, setScaleOptions, setSize, setSize, setTooltip, setVersionOnFile, setWidth, setX, setY
-
Field Details
-
PROP_STYLE
Button Style- See Also:
-
PROP_TEXT
Text on the button.- See Also:
-
PROP_IMAGE
Image on the button.- See Also:
-
PROP_ACTION_INDEX
The index of the action to be executed when button is pushed. It is corresponding to the action sort index in actions property.- See Also:
-
PROP_RELEASED_ACTION_INDEX
The index of the action to be executed when released. It is corresponding to the action sort index in actions property.- See Also:
-
PROP_TOGGLE_BUTTON
If yes, the button will not bounce up when clicked.- See Also:
-
ID
The ID of this widget model.- See Also:
-
-
Constructor Details
-
ActionButtonModel
public ActionButtonModel()
-
-
Method Details
-
getTypeID
- Specified by:
getTypeID
in classAbstractWidgetModel
- Returns:
- the unique typeID of the model.
-
configureProperties
protected void configureProperties()Description copied from class:AbstractWidgetModel
Configure the properties of the widget. Subclass should add new properties in this method.- Specified by:
configureProperties
in classAbstractWidgetModel
-
getActionIndex
public int getActionIndex()Return the index of the selected WidgetAction from the ActionData. The Action is running when the button is released. -
getReleasedActionIndex
public int getReleasedActionIndex()Return the index of the selected WidgetAction from the ActionData. The Action is running when the button is released. -
getText
Return the label text.- Specified by:
getText
in interfaceITextModel
-
setText
- Specified by:
setText
in interfaceITextModel
-
getImagePath
-
isToggleButton
public boolean isToggleButton()Returns whether the button is a toggle button. -
getStyle
-
getVersion
public org.osgi.framework.Version getVersion()- Overrides:
getVersion
in classAbstractWidgetModel
- Returns:
- version of this widget model.
-
setStyle
-