Class AbstractBoolWidgetModel
java.lang.Object
org.csstudio.opibuilder.model.AbstractWidgetModel
org.csstudio.opibuilder.model.AbstractPVWidgetModel
org.csstudio.opibuilder.widgets.model.AbstractBoolWidgetModel
- All Implemented Interfaces:
IPVWidgetModel
,IAdaptable
,IPropertySource
- Direct Known Subclasses:
AbstractBoolControlModel
,ImageBoolIndicatorModel
,LEDModel
This class defines a common widget model for all the boolean widgets.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Bit of the PV to be read and controlled.static final String
static final String
Data type to be operated by this widget, could be Bit or Enum.static final String
Widget color when boolean widget is off.static final String
Label text when boolean widget is off.static final String
If data type is Enum, it is the string value which will be written to the PV when widget is off.static final String
Widget color when boolean widget is on.static final String
Label text when boolean widget is on.static final String
If data type is Enum, it is the string value which will be written to the PV when widget is on.static final String
True if the boolean label should be visible.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.getBit()
int
boolean
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, getTypeID, getVersion, 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_BIT
Bit of the PV to be read and controlled. Set to -1 will write value 0/1 to the PV.- See Also:
-
PROP_ON_LABEL
Label text when boolean widget is on.- See Also:
-
PROP_OFF_LABEL
Label text when boolean widget is off.- See Also:
-
PROP_ON_COLOR
Widget color when boolean widget is on.- See Also:
-
PROP_OFF_COLOR
Widget color when boolean widget is off.- See Also:
-
PROP_SHOW_BOOL_LABEL
True if the boolean label should be visible.- See Also:
-
PROP_BOOL_LABEL_POS
- See Also:
-
PROP_DATA_TYPE
Data type to be operated by this widget, could be Bit or Enum. If it is Bit, the widget will write 0/1 to the corresponding bit of the PV. If it is ENUM, it will write On State/Off State property value to the PV.- See Also:
-
PROP_ON_STATE
If data type is Enum, it is the string value which will be written to the PV when widget is on.- See Also:
-
PROP_OFF_STATE
If data type is Enum, it is the string value which will be written to the PV when widget is off.- See Also:
-
-
Constructor Details
-
AbstractBoolWidgetModel
public AbstractBoolWidgetModel()
-
-
Method Details
-
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
-
getBit
- Returns:
- the bit. If bit is -1, the value channel must be enum, otherwise, it must be numeric value
-
getOnLabel
- Returns:
- the on label
-
getOffLabel
- Returns:
- the off label
-
getOnColor
- Returns:
- the on color
-
getOffColor
- Returns:
- the off color
-
isShowBoolLabel
public boolean isShowBoolLabel()- Returns:
- true if the boolean label should be shown, false otherwise
-
getDataType
public int getDataType() -
getOnState
-
getOffState
-
getBoolLabelPosition
-