Class ActionButtonEditPart
java.lang.Object
org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.csstudio.opibuilder.editparts.AbstractBaseEditPart
org.csstudio.opibuilder.editparts.AbstractPVWidgetEditPart
org.csstudio.opibuilder.widgets.editparts.ActionButtonEditPart
- All Implemented Interfaces:
IPVWidgetEditpart
,IAdaptable
,org.eclipse.gef.EditPart
,org.eclipse.gef.GraphicalEditPart
,org.eclipse.gef.NodeEditPart
,org.eclipse.gef.RequestConstants
EditPart controller for the ActioButton widget. The controller mediates between
ActionButtonModel
and
ActionButtonFigure2.-
Nested Class Summary
Nested classes/interfaces inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPart
AbstractBaseEditPart.BaseEditPartActionFilter
Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider
Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractEditPart.EditPolicyIterator
Nested classes/interfaces inherited from interface org.csstudio.opibuilder.editparts.IPVWidgetEditpart
IPVWidgetEditpart.ISetPVValueListener
-
Field Summary
Fields inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPart
anchorMap, propertyListenerMap
Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
figure, sourceConnections, targetConnections
Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG
Fields inherited from interface org.eclipse.gef.EditPart
SELECTED, SELECTED_NONE, SELECTED_PRIMARY
Fields inherited from interface org.eclipse.gef.RequestConstants
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
protected org.eclipse.draw2d.IFigure
Create and initialize the widget figure with the property values in model.getAdapter
(Class key) static List<AbstractWidgetAction>
getHookedActionsForButton
(ActionButtonModel widgetModel, boolean isSelected) A shared static method for all button widgets.getValue()
The value of the widget that is in representing.protected void
Hook the default AbstractOpenOPIAction with mouse click.void
performRequest
(org.eclipse.gef.Request request) protected void
Register the property change handlers.void
Set the value of the widget.protected void
Methods inherited from class org.csstudio.opibuilder.editparts.AbstractPVWidgetEditPart
activate, addSetPVValueListener, calculateBorder, createConnectionHandler, doActivate, doDeActivate, getAllPVNames, getControlPV, getPV, getPV, getPVName, getPVValue, getPVWidgetEditpartDelegate, initFigure, isPVControlWidget, markAsControlPV, registerBasePropertyChangeHandlers, setControlEnabled, setIgnoreOldPVValue, setPVValue
Methods inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPart
addToConnectionHandler, createFigure, doRefreshVisuals, executeAction, fillAnchorMap, getAllPVs, getAnchorMap, getClosestAnchorAt, getConnectionHandler, getDisplayDisposeListener, getExecutionMode, getExternalObject, getMacroValue, getModelSourceConnections, getModelTargetConnections, getName, getPropertyValue, getPVByName, getSite, getSourceConnectionAnchor, getSourceConnectionAnchor, getTargetConnectionAnchor, getTargetConnectionAnchor, getTerminalNameFromAnchor, getVar, isSelectable, refreshVisuals, removeAllPropertyChangeHandlers, removeFromConnectionHandler, setEnabled, setExecutionMode, setExternalObject, setFigureBorder, setHeight, setPropertyChangeHandler, setPropertyValue, setPropertyValue, setSelectable, setSite, setValueInUIThread, setVar, setVisible, setWidth, setX, setY, toString
Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
addChildVisual, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getChildren, getContentPane, getDragTracker, getFigure, getLayer, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeNodeListener, removeNotify, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals
Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart
activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getCommand, getEditPolicy, getEditPolicyIterable, getEditPolicyIterator, getEventListeners, getEventListenersIterable, getFlag, getModel, getModelChildren, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, refreshChildren, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest, unregister, unregisterAccessibility, unregisterModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.gef.EditPart
addEditPartListener, addNotify, eraseSourceFeedback, eraseTargetFeedback, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
Methods inherited from interface org.eclipse.gef.GraphicalEditPart
addNodeListener, getChildren, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
-
Constructor Details
-
ActionButtonEditPart
public ActionButtonEditPart()
-
-
Method Details
-
doCreateFigure
protected org.eclipse.draw2d.IFigure doCreateFigure()Description copied from class:AbstractBaseEditPart
Create and initialize the widget figure with the property values in model.- Specified by:
doCreateFigure
in classAbstractBaseEditPart
- Returns:
- the widget figure
-
createEditPolicies
protected void createEditPolicies()- Overrides:
createEditPolicies
in classAbstractPVWidgetEditPart
-
performRequest
public void performRequest(org.eclipse.gef.Request request) - Specified by:
performRequest
in interfaceorg.eclipse.gef.EditPart
- Overrides:
performRequest
in classorg.eclipse.gef.editparts.AbstractEditPart
-
hookMouseClickAction
protected void hookMouseClickAction()Description copied from class:AbstractBaseEditPart
Hook the default AbstractOpenOPIAction with mouse click.- Overrides:
hookMouseClickAction
in classAbstractBaseEditPart
-
getHookedActions
- Overrides:
getHookedActions
in classAbstractBaseEditPart
- Returns:
- the default
AbstractWidgetAction
when mouse click this widget.
-
getHookedActionsForButton
public static List<AbstractWidgetAction> getHookedActionsForButton(ActionButtonModel widgetModel, boolean isSelected) A shared static method for all button widgets.- Parameters:
widgetModel
-isSelected
-- Returns:
-
getWidgetModel
- Overrides:
getWidgetModel
in classAbstractBaseEditPart
-
deactivate
public void deactivate()- Specified by:
deactivate
in interfaceorg.eclipse.gef.EditPart
- Overrides:
deactivate
in classAbstractBaseEditPart
-
registerPropertyChangeHandlers
protected void registerPropertyChangeHandlers()Description copied from class:AbstractBaseEditPart
Register the property change handlers. Subclass should register its property change handlers in this method.- Specified by:
registerPropertyChangeHandlers
in classAbstractBaseEditPart
-
updatePropSheet
protected void updatePropSheet() -
setValue
Description copied from class:AbstractBaseEditPart
Set the value of the widget. This only takes effect on the visual presentation of the widget and will not write the value to the PV attached to this widget. Since setting value to a widget usually results in figure repaint, this method should be called in UI thread. To call it in non-UI thread, seeAbstractBaseEditPart.setValueInUIThread(Object)
.- Overrides:
setValue
in classAbstractBaseEditPart
- Parameters:
value
- the value to be set. It must be the compatible type for the widget. For example, a boolean widget only accept boolean or number.
-
getValue
Description copied from class:AbstractBaseEditPart
The value of the widget that is in representing. It is not the value of the attached PV even though they are equals in most cases. The value type is specified by the widget, for example, boolean for boolean widget, double for meter and gauge.- Overrides:
getValue
in classAbstractBaseEditPart
- Returns:
- The value of the widget.
-
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
- Overrides:
getAdapter
in classAbstractPVWidgetEditPart
-