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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringMacros of the container, which will be available to its children.static final StringFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(int index, AbstractWidgetModel child) voidaddChild(AbstractWidgetModel child) voidaddChild(AbstractWidgetModel child, boolean changeParent) add child to the end of the children list.voidaddChildren(List<AbstractWidgetModel> children, boolean changeParent) voidAdd a macro to the container.voidchangeChildOrder(AbstractWidgetModel child, int newIndex) Change the order of the child.protected voidgetChildByName(String name) final intgetIndexOf(AbstractWidgetModel widget) booleanThis is a flag to show if children operation edit policies should be installed.voidvoidremoveChild(AbstractWidgetModel child) voidscale(double widthRatio, double heightRatio) Scale location and size of the widget.voidvoidselectWidget(AbstractWidgetModel newWidget, boolean append) voidselectWidgets(List<AbstractWidgetModel> widgets, boolean append) voidsetMacroMap(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:
configureBasePropertiesin 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:AbstractWidgetModelScale 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:
scalein classAbstractWidgetModel- Parameters:
widthRatio- Ratio of width change.heightRatio- Ratio of height change.
-
scaleChildren
public void scaleChildren() -
getEditPart
-