Package org.csstudio.opibuilder.model
Class AbstractContainerModel
java.lang.Object
org.csstudio.opibuilder.model.AbstractWidgetModel
org.csstudio.opibuilder.model.AbstractContainerModel
- All Implemented Interfaces:
IAdaptable
,IPropertySource
- Direct Known Subclasses:
AbstractLinkingContainerModel
,ArrayModel
,DisplayModel
,GroupingContainerModel
,SashContainerModel
,TabModel
The model which could contain children.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
Macros of the container, which will be available to its children.static final String
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(int index, AbstractWidgetModel child) void
addChild
(AbstractWidgetModel child) void
addChild
(AbstractWidgetModel child, boolean changeParent) add child to the end of the children list.void
addChildren
(List<AbstractWidgetModel> children, boolean changeParent) void
Add a macro to the container.void
changeChildOrder
(AbstractWidgetModel child, int newIndex) Change the order of the child.protected void
getChildByName
(String name) final int
getIndexOf
(AbstractWidgetModel widget) boolean
This is a flag to show if children operation edit policies should be installed.void
void
removeChild
(AbstractWidgetModel child) void
scale
(double widthRatio, double heightRatio) Scale location and size of the widget.void
void
selectWidget
(AbstractWidgetModel newWidget, boolean append) void
selectWidgets
(List<AbstractWidgetModel> widgets, boolean append) void
setMacroMap
(LinkedHashMap<String, String> macroMap) Set macro map of macro.Methods inherited from class org.csstudio.opibuilder.model.AbstractWidgetModel
addConnection, addProperty, addProperty, addPVProperty, configureProperties, 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, getTooltip, getType, getTypeID, getVersion, getVersionOnFile, getWidgetType, getWidth, getWUID, getX, getY, isEnabled, isPropertySet, isVisible, processVersionDifference, removeProperty, removePVProperty, resetPropertyValue, rotate90, rotate90, 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_CHILDREN
- See Also:
-
PROP_SELECTION
- See Also:
-
PROP_MACROS
Macros of the container, which will be available to its children.- See Also:
-
-
Constructor Details
-
AbstractContainerModel
public AbstractContainerModel()
-
-
Method Details
-
addChild
add child to the end of the children list.- Parameters:
child
- the widget to be addedchangeParent
- true if the widget's parent should be changed.
-
addChildren
-
addChild
-
addChild
-
getLayoutWidget
-
removeChild
-
removeAllChildren
public void removeAllChildren() -
configureBaseProperties
protected void configureBaseProperties()- Overrides:
configureBaseProperties
in classAbstractWidgetModel
-
getChildren
-
getAllDescendants
- Returns:
- all descendants of this container.
-
getChildByName
-
getIndexOf
- Parameters:
widget
-- Returns:
- the index of the widget in the children list, which is also the order of the widget in the display.
-
getChildrenProperty
-
changeChildOrder
Change the order of the child.- Parameters:
child
-newIndex
-
-
getSelectionProperty
-
selectWidgets
-
selectWidget
-
setMacroMap
Set macro map of macro. Container keeps reference to the map, no copy.- Parameters:
macroMap
- Map of macro name/value entries
-
getMacroMap
- Returns:
- Map of macro name/value entries
-
getMacrosInput
-
addMacro
Add a macro to the container. This method must be called before this widget is activated.- Parameters:
macroName
- name of the macromacroValue
- value of the macro
-
getParentMacroMap
- Returns:
- the macros of its parent.
-
isChildrenOperationAllowable
public boolean isChildrenOperationAllowable()This is a flag to show if children operation edit policies should be installed.- Returns:
- true if children operation allowable.
-
scale
public void scale(double widthRatio, double heightRatio) Description copied from class:AbstractWidgetModel
Scale location and size of the widget. If the widget needs to change its scale behavior, it should overrideAbstractWidgetModel.doScale(double, double)
instead of this method.- Overrides:
scale
in classAbstractWidgetModel
- Parameters:
widthRatio
- Ratio of width change.heightRatio
- Ratio of height change.
-
scaleChildren
public void scaleChildren() -
getEditPart
-