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

public abstract class AbstractContainerModel extends AbstractWidgetModel
The model which could contain children.
  • Field Details

  • Constructor Details

    • AbstractContainerModel

      public AbstractContainerModel()
  • Method Details

    • addChild

      public void addChild(AbstractWidgetModel child, boolean changeParent)
      add child to the end of the children list.
      Parameters:
      child - the widget to be added
      changeParent - true if the widget's parent should be changed.
    • addChildren

      public void addChildren(List<AbstractWidgetModel> children, boolean changeParent)
    • addChild

      public void addChild(AbstractWidgetModel child)
    • addChild

      public void addChild(int index, AbstractWidgetModel child)
    • getLayoutWidget

      public AbstractLayoutModel getLayoutWidget()
    • removeChild

      public void removeChild(AbstractWidgetModel child)
    • removeAllChildren

      public void removeAllChildren()
    • configureBaseProperties

      protected void configureBaseProperties()
      Overrides:
      configureBaseProperties in class AbstractWidgetModel
    • getChildren

      public List<AbstractWidgetModel> getChildren()
    • getAllDescendants

      public List<AbstractWidgetModel> getAllDescendants()
      Returns:
      all descendants of this container.
    • getChildByName

      public AbstractWidgetModel getChildByName(String name)
    • getIndexOf

      public final int getIndexOf(AbstractWidgetModel widget)
      Parameters:
      widget -
      Returns:
      the index of the widget in the children list, which is also the order of the widget in the display.
    • getChildrenProperty

      public AbstractWidgetProperty getChildrenProperty()
    • changeChildOrder

      public void changeChildOrder(AbstractWidgetModel child, int newIndex)
      Change the order of the child.
      Parameters:
      child -
      newIndex -
    • getSelectionProperty

      public AbstractWidgetProperty getSelectionProperty()
    • selectWidgets

      public void selectWidgets(List<AbstractWidgetModel> widgets, boolean append)
    • selectWidget

      public void selectWidget(AbstractWidgetModel newWidget, boolean append)
    • setMacroMap

      public void setMacroMap(LinkedHashMap<String,String> macroMap)
      Set macro map of macro. Container keeps reference to the map, no copy.
      Parameters:
      macroMap - Map of macro name/value entries
    • getMacroMap

      public LinkedHashMap<String,String> getMacroMap()
      Returns:
      Map of macro name/value entries
    • getMacrosInput

      public MacrosInput getMacrosInput()
    • addMacro

      public void addMacro(String macroName, String macroValue)
      Add a macro to the container. This method must be called before this widget is activated.
      Parameters:
      macroName - name of the macro
      macroValue - value of the macro
    • getParentMacroMap

      public LinkedHashMap<String,String> 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 override AbstractWidgetModel.doScale(double, double) instead of this method.
      Overrides:
      scale in class AbstractWidgetModel
      Parameters:
      widthRatio - Ratio of width change.
      heightRatio - Ratio of height change.
    • scaleChildren

      public void scaleChildren()
    • getEditPart

      public AbstractContainerEditpart getEditPart()