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.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
-
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 TypeMethodDescriptionvoid
addChild
(AbstractWidgetModel widgetModel) Add a child widget to the container.void
addChildToBottom
(AbstractWidgetModel widgetModel) Add a child widget to the bottom of the container.void
addChildToRight
(AbstractWidgetModel widgetModel) Add a child widget to the right of the container.protected void
void
getAdapter
(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.EditPart
Get the widget which is a descendant of the container by name.void
layout()
void
Automatically set the container size according its children's geography size.protected void
protected void
void
void
removeChild
(int index) void
removeChild
(AbstractBaseEditPart child) void
removeChildByName
(String widgetName) Remove a child widget by its name.void
void
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.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, 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, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, performRequest, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, 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, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
Methods 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:
createEditPolicies
in 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:
setModel
in interfaceorg.eclipse.gef.EditPart
- Overrides:
setModel
in classorg.eclipse.gef.editparts.AbstractEditPart
-
registerBasePropertyChangeHandlers
protected void registerBasePropertyChangeHandlers()- Overrides:
registerBasePropertyChangeHandlers
in classAbstractBaseEditPart
-
deactivate
public void deactivate()- Specified by:
deactivate
in interfaceorg.eclipse.gef.EditPart
- Overrides:
deactivate
in classAbstractBaseEditPart
-
getModelChildren
- Overrides:
getModelChildren
in classorg.eclipse.gef.editparts.AbstractEditPart
-
getWidgetModel
- Overrides:
getWidgetModel
in classAbstractBaseEditPart
-
getLayoutWidget
-
refreshChildren
protected void refreshChildren()- Overrides:
refreshChildren
in 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:
getValue
in 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:
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.
-
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
- Overrides:
getAdapter
in classAbstractBaseEditPart
-