Class ImageModel

java.lang.Object
org.csstudio.opibuilder.model.AbstractWidgetModel
org.csstudio.opibuilder.widgets.model.ImageModel
All Implemented Interfaces:
IAdaptable, IPropertySource

public final class ImageModel extends AbstractWidgetModel
An image widget model.
  • Field Details

    • ID

      public static final String ID
      Unique identifier.
      See Also:
    • PROP_IMAGE_FILE

      public static final String PROP_IMAGE_FILE
      File path of the image.
      See Also:
    • PROP_TOPCROP

      public static final String PROP_TOPCROP
      Crop part (in pixels) on top side of the image.
      See Also:
    • PROP_BOTTOMCROP

      public static final String PROP_BOTTOMCROP
      Crop part (in pixels) on bottom side of the image.
      See Also:
    • PROP_LEFTCROP

      public static final String PROP_LEFTCROP
      Crop part (in pixels) on left side of the image.
      See Also:
    • PROP_RIGHTCROP

      public static final String PROP_RIGHTCROP
      Crop part (in pixels) on right side of the image.
      See Also:
    • PROP_STRETCH

      public static final String PROP_STRETCH
      True if the image should be stretched to the widget size.
      See Also:
    • PROP_AUTOSIZE

      public static final String PROP_AUTOSIZE
      True if the widget size is automatically adjusted to the size of the image.
      See Also:
    • PROP_NO_ANIMATION

      public static final String PROP_NO_ANIMATION
      True if the widget doesn't show animation even it is a animated image file.
      See Also:
    • PROP_ALIGN_TO_NEAREST_SECOND

      public static final String PROP_ALIGN_TO_NEAREST_SECOND
      True if the widget animation start should be aligned to the nearest second.
      See Also:
    • PROP_DEGREE

      public static final String PROP_DEGREE
      Degree value of the image.
      See Also:
    • PROP_FLIP_HORIZONTAL

      public static final String PROP_FLIP_HORIZONTAL
      Horizontal flip applied on the image.
      See Also:
    • PROP_FLIP_VERTICAL

      public static final String PROP_FLIP_VERTICAL
      Vertical flip applied on the image.
      See Also:
    • PERMUTATION_MATRIX

      public static final String PERMUTATION_MATRIX
      Image disposition (permutation matrix)
      See Also:
  • Constructor Details

    • ImageModel

      public ImageModel()
  • Method Details

    • getTypeID

      public String getTypeID()
      Specified by:
      getTypeID in class AbstractWidgetModel
      Returns:
      the unique typeID of the model.
    • configureProperties

      protected void configureProperties()
      Description copied from class: AbstractWidgetModel
      Configure the properties of the widget. Subclass should add new properties in this method.
      Specified by:
      configureProperties in class AbstractWidgetModel
    • getFilename

      public String getFilename()
      Returns the path to the specified file.
    • getTopCrop

      public int getTopCrop()
      Returns the amount of pixels, which should be cropped from the top edge of the image.
    • getBottomCrop

      public int getBottomCrop()
      Returns the amount of pixels, which should be cropped from the bottom edge of the image.
    • getLeftCrop

      public int getLeftCrop()
      Returns the amount of pixels, which should be cropped from the left edge of the image.
    • getRightCrop

      public int getRightCrop()
      Returns the amount of pixels, which should be cropped from the right edge of the image.
    • getStretch

      public boolean getStretch()
      Returns if the image should be stretched.
    • isAutoSize

      public boolean isAutoSize()
      Returns:
      True if the widget should be auto sized according the image size.
    • isStopAnimation

      public boolean isStopAnimation()
      Returns:
      True if the animation is stopped.
    • isAlignedToNearestSecond

      public boolean isAlignedToNearestSecond()
    • getPermutationMatrix

      public PermutationMatrix getPermutationMatrix()
      Returns:
      The permutation matrix
    • getDegree

      public int getDegree(int index)
    • rotate90

      public void rotate90(boolean clockwise)
      Description copied from class: AbstractWidgetModel
      Rotate the widget figure 90 degree.
      Overrides:
      rotate90 in class AbstractWidgetModel
      Parameters:
      clockwise - true if rotate clockwise. false if counterclockwise.
    • flipHorizontally

      public void flipHorizontally()
      Description copied from class: AbstractWidgetModel
      Flip the widget figure horizontally.
      Overrides:
      flipHorizontally in class AbstractWidgetModel
    • flipVertically

      public void flipVertically()
      Description copied from class: AbstractWidgetModel
      Flip the widget figure vertically.
      Overrides:
      flipVertically in class AbstractWidgetModel