Class AbstractSymbolImage

java.lang.Object
org.csstudio.swt.widgets.symbol.AbstractSymbolImage
All Implemented Interfaces:
SymbolImage
Direct Known Subclasses:
GIFSymbolImage, PNGSymbolImage, SVGSymbolImage

public abstract class AbstractSymbolImage extends Object implements SymbolImage
Main class for Symbol Image display.
  • Field Details

    • scale

      protected double scale
    • bounds

      protected org.eclipse.draw2d.geometry.Rectangle bounds
    • imagePath

      protected String imagePath
    • image

      protected Image image
    • imageData

      protected ImageData imageData
    • originalImageData

      protected ImageData originalImageData
    • currentColor

      protected Color currentColor
    • colorToChange

      protected Color colorToChange
    • backgroundColor

      protected Color backgroundColor
    • leftCrop

      protected int leftCrop
    • rightCrop

      protected int rightCrop
    • bottomCrop

      protected int bottomCrop
    • topCrop

      protected int topCrop
    • stretch

      protected boolean stretch
    • autoSize

      protected boolean autoSize
    • oldPermutationMatrix

      protected PermutationMatrix oldPermutationMatrix
    • permutationMatrix

      protected PermutationMatrix permutationMatrix
    • animationDisabled

      protected boolean animationDisabled
    • alignedToNearestSecond

      protected boolean alignedToNearestSecond
    • visible

      protected boolean visible
    • disposed

      protected boolean disposed
  • Constructor Details

  • Method Details

    • getImagePath

      public String getImagePath()
      Specified by:
      getImagePath in interface SymbolImage
    • setImagePath

      public void setImagePath(String imagePath)
      Specified by:
      setImagePath in interface SymbolImage
    • getOriginalImageData

      public ImageData getOriginalImageData()
      Specified by:
      getOriginalImageData in interface SymbolImage
    • dispose

      public void dispose()
      Description copied from interface: SymbolImage
      Dispose the resource used by this figure
      Specified by:
      dispose in interface SymbolImage
    • setVisible

      public void setVisible(boolean visible)
      Specified by:
      setVisible in interface SymbolImage
    • isDisposed

      public boolean isDisposed()
      Specified by:
      isDisposed in interface SymbolImage
    • isEditMode

      public boolean isEditMode()
      Specified by:
      isEditMode in interface SymbolImage
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface SymbolImage
    • resetData

      public abstract void resetData()
    • setCurrentColor

      public void setCurrentColor(Color newColor)
      Specified by:
      setCurrentColor in interface SymbolImage
    • setColorToChange

      public void setColorToChange(Color newColor)
      Specified by:
      setColorToChange in interface SymbolImage
    • setBackgroundColor

      public void setBackgroundColor(Color newColor)
      Specified by:
      setBackgroundColor in interface SymbolImage
    • getAutoSizedDimension

      public abstract org.eclipse.draw2d.geometry.Dimension getAutoSizedDimension()
      Description copied from interface: SymbolImage
      Get the auto sized widget dimension according to the static image size.
      Specified by:
      getAutoSizedDimension in interface SymbolImage
      Returns:
      The auto sized widget dimension.
    • resizeImage

      public void resizeImage()
      Description copied from interface: SymbolImage
      Resizes the image.
      Specified by:
      resizeImage in interface SymbolImage
    • setBounds

      public void setBounds(org.eclipse.draw2d.geometry.Rectangle newBounds)
      Specified by:
      setBounds in interface SymbolImage
    • setAbsoluteScale

      public void setAbsoluteScale(double newScale)
      Specified by:
      setAbsoluteScale in interface SymbolImage
    • setAutoSize

      public void setAutoSize(boolean autoSize)
      Description copied from interface: SymbolImage
      Automatically adjust the widget bounds to fit the size of the static image
      Specified by:
      setAutoSize in interface SymbolImage
    • setStretch

      public void setStretch(boolean newval)
      Description copied from interface: SymbolImage
      Set the stretch state for the image.
      Specified by:
      setStretch in interface SymbolImage
      Parameters:
      newval - true, if it should be stretched, false otherwise)
    • setLeftCrop

      public void setLeftCrop(int newval)
      Description copied from interface: SymbolImage
      Sets the amount of pixels, which are cropped from the left.
      Specified by:
      setLeftCrop in interface SymbolImage
    • setRightCrop

      public void setRightCrop(int newval)
      Description copied from interface: SymbolImage
      Sets the amount of pixels, which are cropped from the right.
      Specified by:
      setRightCrop in interface SymbolImage
    • setBottomCrop

      public void setBottomCrop(int newval)
      Description copied from interface: SymbolImage
      Sets the amount of pixels, which are cropped from the bottom.
      Specified by:
      setBottomCrop in interface SymbolImage
    • setTopCrop

      public void setTopCrop(int newval)
      Description copied from interface: SymbolImage
      Sets the amount of pixels, which are cropped from the top.
      Specified by:
      setTopCrop in interface SymbolImage
    • setPermutationMatrix

      public void setPermutationMatrix(PermutationMatrix permutationMatrix)
      Specified by:
      setPermutationMatrix in interface SymbolImage
    • getPermutationMatrix

      public PermutationMatrix getPermutationMatrix()
      Specified by:
      getPermutationMatrix in interface SymbolImage
    • setAnimationDisabled

      public void setAnimationDisabled(boolean stop)
      Specified by:
      setAnimationDisabled in interface SymbolImage
    • setAlignedToNearestSecond

      public void setAlignedToNearestSecond(boolean aligned)
      Specified by:
      setAlignedToNearestSecond in interface SymbolImage
    • setListener

      public void setListener(SymbolImageListener listener)
      Specified by:
      setListener in interface SymbolImage
    • fireSymbolImageLoaded

      protected void fireSymbolImageLoaded()
    • fireSizeChanged

      protected void fireSizeChanged()
    • repaint

      protected void repaint()