Package org.csstudio.swt.widgets.symbol
Class AbstractSymbolImage
java.lang.Object
org.csstudio.swt.widgets.symbol.AbstractSymbolImage
- All Implemented Interfaces:
SymbolImage
- Direct Known Subclasses:
GIFSymbolImage,PNGSymbolImage,SVGSymbolImage
Main class for Symbol Image display.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected Colorprotected intprotected org.eclipse.draw2d.geometry.Rectangleprotected Colorprotected Colorprotected booleanprotected Imageprotected ImageDataprotected Stringprotected intprotected PermutationMatrixprotected ImageDataprotected PermutationMatrixprotected intprotected doubleprotected booleanprotected intprotected booleanFields inherited from interface org.csstudio.swt.widgets.symbol.SymbolImage
DISABLE_COLOR, DISABLED_ALPHA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose the resource used by this figureprotected voidprotected voidabstract org.eclipse.draw2d.geometry.DimensionGet the auto sized widget dimension according to the static image size.booleanbooleanbooleanisEmpty()protected voidrepaint()abstract voidvoidResizes the image.voidsetAbsoluteScale(double newScale) voidsetAlignedToNearestSecond(boolean aligned) voidsetAnimationDisabled(boolean stop) voidsetAutoSize(boolean autoSize) Automatically adjust the widget bounds to fit the size of the static imagevoidsetBackgroundColor(Color newColor) voidsetBottomCrop(int newval) Sets the amount of pixels, which are cropped from the bottom.voidsetBounds(org.eclipse.draw2d.geometry.Rectangle newBounds) voidsetColorToChange(Color newColor) voidsetCurrentColor(Color newColor) voidsetImagePath(String imagePath) voidsetLeftCrop(int newval) Sets the amount of pixels, which are cropped from the left.voidsetListener(SymbolImageListener listener) voidsetPermutationMatrix(PermutationMatrix permutationMatrix) voidsetRightCrop(int newval) Sets the amount of pixels, which are cropped from the right.voidsetStretch(boolean newval) Set the stretch state for the image.voidsetTopCrop(int newval) Sets the amount of pixels, which are cropped from the top.voidsetVisible(boolean visible) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.csstudio.swt.widgets.symbol.SymbolImage
asyncLoadImage, paintFigure, syncLoadImage
-
Field Details
-
scale
protected double scale -
bounds
protected org.eclipse.draw2d.geometry.Rectangle bounds -
imagePath
-
image
-
imageData
-
originalImageData
-
currentColor
-
colorToChange
-
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
-
permutationMatrix
-
animationDisabled
protected boolean animationDisabled -
alignedToNearestSecond
protected boolean alignedToNearestSecond -
visible
protected boolean visible -
disposed
protected boolean disposed
-
-
Constructor Details
-
AbstractSymbolImage
-
-
Method Details
-
getImagePath
- Specified by:
getImagePathin interfaceSymbolImage
-
setImagePath
- Specified by:
setImagePathin interfaceSymbolImage
-
getOriginalImageData
- Specified by:
getOriginalImageDatain interfaceSymbolImage
-
dispose
public void dispose()Description copied from interface:SymbolImageDispose the resource used by this figure- Specified by:
disposein interfaceSymbolImage
-
setVisible
public void setVisible(boolean visible) - Specified by:
setVisiblein interfaceSymbolImage
-
isDisposed
public boolean isDisposed()- Specified by:
isDisposedin interfaceSymbolImage
-
isEditMode
public boolean isEditMode()- Specified by:
isEditModein interfaceSymbolImage
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceSymbolImage
-
resetData
public abstract void resetData() -
setCurrentColor
- Specified by:
setCurrentColorin interfaceSymbolImage
-
setColorToChange
- Specified by:
setColorToChangein interfaceSymbolImage
-
setBackgroundColor
- Specified by:
setBackgroundColorin interfaceSymbolImage
-
getAutoSizedDimension
public abstract org.eclipse.draw2d.geometry.Dimension getAutoSizedDimension()Description copied from interface:SymbolImageGet the auto sized widget dimension according to the static image size.- Specified by:
getAutoSizedDimensionin interfaceSymbolImage- Returns:
- The auto sized widget dimension.
-
resizeImage
public void resizeImage()Description copied from interface:SymbolImageResizes the image.- Specified by:
resizeImagein interfaceSymbolImage
-
setBounds
public void setBounds(org.eclipse.draw2d.geometry.Rectangle newBounds) - Specified by:
setBoundsin interfaceSymbolImage
-
setAbsoluteScale
public void setAbsoluteScale(double newScale) - Specified by:
setAbsoluteScalein interfaceSymbolImage
-
setAutoSize
public void setAutoSize(boolean autoSize) Description copied from interface:SymbolImageAutomatically adjust the widget bounds to fit the size of the static image- Specified by:
setAutoSizein interfaceSymbolImage
-
setStretch
public void setStretch(boolean newval) Description copied from interface:SymbolImageSet the stretch state for the image.- Specified by:
setStretchin interfaceSymbolImage- Parameters:
newval- true, if it should be stretched, false otherwise)
-
setLeftCrop
public void setLeftCrop(int newval) Description copied from interface:SymbolImageSets the amount of pixels, which are cropped from the left.- Specified by:
setLeftCropin interfaceSymbolImage
-
setRightCrop
public void setRightCrop(int newval) Description copied from interface:SymbolImageSets the amount of pixels, which are cropped from the right.- Specified by:
setRightCropin interfaceSymbolImage
-
setBottomCrop
public void setBottomCrop(int newval) Description copied from interface:SymbolImageSets the amount of pixels, which are cropped from the bottom.- Specified by:
setBottomCropin interfaceSymbolImage
-
setTopCrop
public void setTopCrop(int newval) Description copied from interface:SymbolImageSets the amount of pixels, which are cropped from the top.- Specified by:
setTopCropin interfaceSymbolImage
-
setPermutationMatrix
- Specified by:
setPermutationMatrixin interfaceSymbolImage
-
getPermutationMatrix
- Specified by:
getPermutationMatrixin interfaceSymbolImage
-
setAnimationDisabled
public void setAnimationDisabled(boolean stop) - Specified by:
setAnimationDisabledin interfaceSymbolImage
-
setAlignedToNearestSecond
public void setAlignedToNearestSecond(boolean aligned) - Specified by:
setAlignedToNearestSecondin interfaceSymbolImage
-
setListener
- Specified by:
setListenerin interfaceSymbolImage
-
fireSymbolImageLoaded
protected void fireSymbolImageLoaded() -
fireSizeChanged
protected void fireSizeChanged() -
repaint
protected void repaint()
-