Class RulerModel

java.lang.Object
org.csstudio.opibuilder.model.RulerModel
All Implemented Interfaces:
Serializable

public final class RulerModel extends Object implements Serializable
The model for a Ruler.
See Also:
  • Field Details

    • PROPERTY_CHILDREN_CHANGED

      public static final String PROPERTY_CHILDREN_CHANGED
      The ID for the children changed property.
      See Also:
  • Constructor Details

    • RulerModel

      public RulerModel(boolean isHorizontal)
      Constructor.
      Parameters:
      isHorizontal - The orientation of this ruler
  • Method Details

    • addGuide

      public void addGuide(GuideModel guide)
      Adds the given guide to this ruler. Notifies all registered listeners
      Parameters:
      guide - The guide to add
    • removeGuide

      public void removeGuide(GuideModel guide)
      Removes the given guide from this ruler. Notifies all registered listeners
      Parameters:
      guide - The guide to remove
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to this guide.
      Parameters:
      listener - The listener to add
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Removes the PropertyChangeListener from this guide.
      Parameters:
      listener - The listener to remove
    • getGuides

      public List<GuideModel> getGuides()
      Returns a List of all guides, contained by this ruler.
      Returns:
      List A List of GuideModels
    • isHorizontal

      public boolean isHorizontal()
      Returns if this guide has a horizontal orientation.
      Returns:
      boolean True, if this guide has a horizontal orientation, false otherwise