Class AbstractContainerEditpart
java.lang.Object
org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.csstudio.opibuilder.editparts.AbstractBaseEditPart
org.csstudio.opibuilder.editparts.AbstractContainerEditpart
- All Implemented Interfaces:
IAdaptable,org.eclipse.gef.EditPart,org.eclipse.gef.GraphicalEditPart,org.eclipse.gef.NodeEditPart,org.eclipse.gef.RequestConstants
- Direct Known Subclasses:
AbstractScrollableEditpart,ArrayEditPart,DisplayEditpart,GroupingContainerEditPart,SashContainerEditPart,TabEditPart
The editpart for
AbstractContainerModel-
Nested Class Summary
Nested classes/interfaces inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPart
AbstractBaseEditPart.BaseEditPartActionFilterNested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProviderNested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractEditPart.EditPolicyIterator -
Field Summary
Fields inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPart
anchorMap, propertyListenerMapFields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
figure, sourceConnections, targetConnectionsFields inherited from class org.eclipse.gef.editparts.AbstractEditPart
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAGFields inherited from interface org.eclipse.gef.EditPart
SELECTED, SELECTED_NONE, SELECTED_PRIMARYFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(AbstractWidgetModel widgetModel) Add a child widget to the container.voidaddChildToBottom(AbstractWidgetModel widgetModel) Add a child widget to the bottom of the container.voidaddChildToRight(AbstractWidgetModel widgetModel) Add a child widget to the right of the container.protected voidvoidgetAdapter(Class adapter) Get a child of this container by name.protected List<AbstractWidgetModel>getValue()By default, it returns an Object Array of its children's value.org.eclipse.gef.EditPartGet the widget which is a descendant of the container by name.voidlayout()voidAutomatically set the container size according its children's geography size.protected voidprotected voidvoidvoidremoveChild(int index) voidremoveChild(AbstractBaseEditPart child) voidremoveChildByName(String widgetName) Remove a child widget by its name.voidvoidIf input value is instance of Object[] and its length is equal or larger than children size, it will write each element of value to each child according children's order.Methods inherited from class org.csstudio.opibuilder.editparts.AbstractBaseEditPart
activate, addToConnectionHandler, calculateBorder, createConnectionHandler, createFigure, doActivate, doCreateFigure, doDeActivate, doRefreshVisuals, executeAction, fillAnchorMap, getAllPVs, getAnchorMap, getClosestAnchorAt, getConnectionHandler, getDisplayDisposeListener, getExecutionMode, getExternalObject, getHookedActions, getMacroValue, getModelSourceConnections, getModelTargetConnections, getName, getPropertyValue, getPVByName, getSite, getSourceConnectionAnchor, getSourceConnectionAnchor, getTargetConnectionAnchor, getTargetConnectionAnchor, getTerminalNameFromAnchor, getVar, hookMouseClickAction, initFigure, isSelectable, refreshVisuals, registerPropertyChangeHandlers, removeAllPropertyChangeHandlers, removeFromConnectionHandler, setEnabled, setExecutionMode, setExternalObject, setFigureBorder, setHeight, setPropertyChangeHandler, setPropertyValue, setPropertyValue, setSelectable, setSite, setValueInUIThread, setVar, setVisible, setWidth, setX, setY, toStringMethods 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, unregisterVisualsMethods 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, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, performRequest, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest, unregister, unregisterAccessibility, unregisterModelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.gef.EditPart
addEditPartListener, addNotify, eraseSourceFeedback, eraseTargetFeedback, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequestMethods inherited from interface org.eclipse.gef.GraphicalEditPart
addNodeListener, getChildren, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
-
Constructor Details
-
AbstractContainerEditpart
public AbstractContainerEditpart()
-
-
Method Details
-
createEditPolicies
protected void createEditPolicies()- Overrides:
createEditPoliciesin classAbstractBaseEditPart
-
getChild
Get a child of this container by name.- Parameters:
name- the name of the child widget- Returns:
- the widgetController of the child. null if the child doesn't exist.
-
getWidget
Get the widget which is a descendant of the container by name.- Parameters:
name- the name of the widget.- Returns:
- the widget controller.
- Throws:
Exception- If widget with this name doesn't exist
-
getAllRuntimePVNames
- Returns:
- all pv names attached to this container and its children at runtime.
-
addChild
Add a child widget to the container. -
addChildToRight
Add a child widget to the right of the container. -
addChildToBottom
Add a child widget to the bottom of the container. -
removeChildByName
Remove a child widget by its name.- Throws:
RuntimeException- if the widget name does not exist.
-
removeChild
-
removeChild
public void removeChild(int index) -
removeAllChildren
public void removeAllChildren() -
setModel
- Specified by:
setModelin interfaceorg.eclipse.gef.EditPart- Overrides:
setModelin classorg.eclipse.gef.editparts.AbstractEditPart
-
registerBasePropertyChangeHandlers
protected void registerBasePropertyChangeHandlers()- Overrides:
registerBasePropertyChangeHandlersin classAbstractBaseEditPart
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceorg.eclipse.gef.EditPart- Overrides:
deactivatein classAbstractBaseEditPart
-
getModelChildren
- Overrides:
getModelChildrenin classorg.eclipse.gef.editparts.AbstractEditPart
-
getWidgetModel
- Overrides:
getWidgetModelin classAbstractBaseEditPart
-
getLayoutWidget
-
refreshChildren
protected void refreshChildren()- Overrides:
refreshChildrenin classorg.eclipse.gef.editparts.AbstractEditPart
-
layout
public void layout() -
performAutosize
public void performAutosize()Automatically set the container size according its children's geography size. -
getValue
By default, it returns an Object Array of its children's value. IfsetValue(Object)was called with a non Object[] input value, it will return the value of its first child.- Overrides:
getValuein classAbstractBaseEditPart- Returns:
- The value of the widget.
-
setValue
If input value is instance of Object[] and its length is equal or larger than children size, it will write each element of value to each child according children's order. Otherwise, it will write the input value as an whole Object to every child.- Overrides:
setValuein 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.
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable- Overrides:
getAdapterin classAbstractBaseEditPart
-