Class AbstractPVWidgetEditPart
java.lang.Object
org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.csstudio.opibuilder.editparts.AbstractBaseEditPart
org.csstudio.opibuilder.editparts.AbstractPVWidgetEditPart
- All Implemented Interfaces:
- IPVWidgetEditpart,- IAdaptable,- org.eclipse.gef.EditPart,- org.eclipse.gef.GraphicalEditPart,- org.eclipse.gef.NodeEditPart,- org.eclipse.gef.RequestConstants
- Direct Known Subclasses:
- AbstractBoolEditPart,- AbstractChoiceEditPart,- AbstractScaledWidgetEditPart,- AbstractShapeEditPart,- ActionButtonEditPart,- ByteMonitorEditPart,- CheckBoxEditPart,- ComboEditPart,- IntensityGraphEditPart,- MenuButtonEditPart,- NativeButtonEditPart,- ScrollbarEditPart,- SpinnerEditpart,- TextUpdateEditPart,- ThumbWheelEditPart,- XYGraphEditPart
public abstract class AbstractPVWidgetEditPart
extends AbstractBaseEditPart
implements IPVWidgetEditpart
The abstract edit part for all PV armed widgets. Widgets inheritate this class will have the CSS context menu on it.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPartAbstractBaseEditPart.BaseEditPartActionFilterNested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPartorg.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProviderNested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPartorg.eclipse.gef.editparts.AbstractEditPart.EditPolicyIteratorNested classes/interfaces inherited from interface org.csstudio.opibuilder.editparts.IPVWidgetEditpartIPVWidgetEditpart.ISetPVValueListener
- 
Field SummaryFieldsFields inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPartanchorMap, propertyListenerMapFields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPartfigure, sourceConnections, targetConnectionsFields inherited from class org.eclipse.gef.editparts.AbstractEditPartchildren, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAGFields inherited from interface org.eclipse.gef.EditPartSELECTED, SELECTED_NONE, SELECTED_PRIMARYFields inherited from interface org.eclipse.gef.RequestConstantsREQ_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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidactivate()voidorg.eclipse.draw2d.BorderCalculate the border for the widget with assume that the widget is connected.protected ConnectionHandlerprotected voidprotected voidSubclass should do the activate things in this method.protected voidSubclass should do the deActivate things in this method.getAdapter(Class key) String[]getPV()Get the PV corresponding to thePV Nameproperty.Get the pv by PV property id.getPVValue(String pvPropId) Get value from one of the attached PVs.protected voidinitFigure(org.eclipse.draw2d.IFigure figure) initialize the figurebooleanprotected voidmarkAsControlPV(String pvPropId, String pvValuePropId) For PV Control widgets, mark this PV as control PV.protected voidvoidsetControlEnabled(boolean enabled) Set whether the editpart is enabled for control.voidsetIgnoreOldPVValue(boolean ignoreOldValue) voidsetPVValue(String pvPropId, Object value) Set PV to given value.Methods inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPartaddToConnectionHandler, createFigure, deactivate, doCreateFigure, doRefreshVisuals, executeAction, fillAnchorMap, getAllPVs, getAnchorMap, getClosestAnchorAt, getConnectionHandler, getDisplayDisposeListener, getExecutionMode, getExternalObject, getHookedActions, getMacroValue, getModelSourceConnections, getModelTargetConnections, getName, getPropertyValue, getPVByName, getSite, getSourceConnectionAnchor, getSourceConnectionAnchor, getTargetConnectionAnchor, getTargetConnectionAnchor, getTerminalNameFromAnchor, getValue, getVar, getWidgetModel, hookMouseClickAction, isSelectable, refreshVisuals, registerPropertyChangeHandlers, removeAllPropertyChangeHandlers, removeFromConnectionHandler, setEnabled, setExecutionMode, setExternalObject, setFigureBorder, setHeight, setPropertyChangeHandler, setPropertyValue, setPropertyValue, setSelectable, setSite, setValue, setValueInUIThread, setVar, setVisible, setWidth, setX, setY, toStringMethods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPartaddChildVisual, 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, unregisterVisualsMethods inherited from class org.eclipse.gef.editparts.AbstractEditPartactivateEditPolicies, 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, performRequest, refreshChildren, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest, unregister, unregisterAccessibility, unregisterModelMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.gef.EditPartaddEditPartListener, addNotify, eraseSourceFeedback, eraseTargetFeedback, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequestMethods inherited from interface org.eclipse.gef.GraphicalEditPartaddNodeListener, getChildren, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
- 
Field Details- 
delegate
 
- 
- 
Constructor Details- 
AbstractPVWidgetEditPartpublic AbstractPVWidgetEditPart()
 
- 
- 
Method Details- 
doActivateprotected void doActivate()Description copied from class:AbstractBaseEditPartSubclass should do the activate things in this method. This method is last called fromAbstractBaseEditPart.activate(). If there is code to be called as the first thing inAbstractBaseEditPart.activate(), it can be put inAbstractBaseEditPart.doCreateFigure().- Overrides:
- doActivatein class- AbstractBaseEditPart
 
- 
activatepublic void activate()- Specified by:
- activatein interface- org.eclipse.gef.EditPart
- Overrides:
- activatein class- AbstractBaseEditPart
 
- 
addSetPVValueListener- Specified by:
- addSetPVValueListenerin interface- IPVWidgetEditpart
 
- 
calculateBorderpublic org.eclipse.draw2d.Border calculateBorder()Description copied from class:AbstractBaseEditPartCalculate the border for the widget with assume that the widget is connected.- Overrides:
- calculateBorderin class- AbstractBaseEditPart
- Returns:
- the border.
 
- 
createConnectionHandler- Overrides:
- createConnectionHandlerin class- AbstractBaseEditPart
 
- 
createEditPoliciesprotected void createEditPolicies()- Overrides:
- createEditPoliciesin class- AbstractBaseEditPart
 
- 
doDeActivateprotected void doDeActivate()Description copied from class:AbstractBaseEditPartSubclass should do the deActivate things in this method. This is the first called inAbstractBaseEditPart.deactivate().- Overrides:
- doDeActivatein class- AbstractBaseEditPart
 
- 
getAdapter- Specified by:
- getAdapterin interface- IAdaptable
- Overrides:
- getAdapterin class- AbstractBaseEditPart
 
- 
getAllPVNames- Specified by:
- getAllPVNamesin interface- IPVWidgetEditpart
- Returns:
- A String array with all PV names from PV properties.
 
- 
getControlPV- Specified by:
- getControlPVin interface- IPVWidgetEditpart
- Returns:
- the control PV. null if no control PV on this widget.
 
- 
getPVGet the PV corresponding to thePV Nameproperty. It is same as callinggetPV("pv_name").- Specified by:
- getPVin interface- IPVWidgetEditpart
- Returns:
- the PV corresponding to the PV Nameproperty. null if PV Name is not configured for this widget.
 
- 
getPVGet the pv by PV property id.- Specified by:
- getPVin interface- IPVWidgetEditpart
- Parameters:
- pvPropId- the PV property id.
- Returns:
- the corresponding pv for the pvPropId. null if the pv doesn't exist.
 
- 
getPVWidgetEditpartDelegate
- 
getPVName- Specified by:
- getPVNamein interface- IPVWidgetEditpart
- Returns:
- the first PV name.
 
- 
getPVValueGet value from one of the attached PVs.- Specified by:
- getPVValuein interface- IPVWidgetEditpart
- Parameters:
- pvPropId- the property id of the PV. It is "pv_name" for the main PV.
- Returns:
- the IValue of the PV.
 
- 
initFigureprotected void initFigure(org.eclipse.draw2d.IFigure figure) Description copied from class:AbstractBaseEditPartinitialize the figure- Overrides:
- initFigurein class- AbstractBaseEditPart
 
- 
markAsControlPVFor PV Control widgets, mark this PV as control PV.- Parameters:
- pvPropId- the propId of the PV.
 
- 
registerBasePropertyChangeHandlersprotected void registerBasePropertyChangeHandlers()- Overrides:
- registerBasePropertyChangeHandlersin class- AbstractBaseEditPart
 
- 
setIgnoreOldPVValuepublic void setIgnoreOldPVValue(boolean ignoreOldValue) 
- 
setPVValueSet PV to given value. Should accept Double, Double[], Integer, String, maybe more.- Specified by:
- setPVValuein interface- IPVWidgetEditpart
- Parameters:
- pvPropId-
- value-
 
- 
isPVControlWidgetpublic boolean isPVControlWidget()- Specified by:
- isPVControlWidgetin interface- IPVWidgetEditpart
 
- 
setControlEnabledpublic void setControlEnabled(boolean enabled) Set whether the editpart is enabled for control.- Specified by:
- setControlEnabledin interface- IPVWidgetEditpart
 
 
-