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
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected Color
protected int
protected org.eclipse.draw2d.geometry.Rectangle
protected Color
protected Color
protected boolean
protected Image
protected ImageData
protected String
protected int
protected PermutationMatrix
protected ImageData
protected PermutationMatrix
protected int
protected double
protected boolean
protected int
protected boolean
Fields inherited from interface org.csstudio.swt.widgets.symbol.SymbolImage
DISABLE_COLOR, DISABLED_ALPHA
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose the resource used by this figureprotected void
protected void
abstract org.eclipse.draw2d.geometry.Dimension
Get the auto sized widget dimension according to the static image size.boolean
boolean
boolean
isEmpty()
protected void
repaint()
abstract void
void
Resizes the image.void
setAbsoluteScale
(double newScale) void
setAlignedToNearestSecond
(boolean aligned) void
setAnimationDisabled
(boolean stop) void
setAutoSize
(boolean autoSize) Automatically adjust the widget bounds to fit the size of the static imagevoid
setBackgroundColor
(Color newColor) void
setBottomCrop
(int newval) Sets the amount of pixels, which are cropped from the bottom.void
setBounds
(org.eclipse.draw2d.geometry.Rectangle newBounds) void
setColorToChange
(Color newColor) void
setCurrentColor
(Color newColor) void
setImagePath
(String imagePath) void
setLeftCrop
(int newval) Sets the amount of pixels, which are cropped from the left.void
setListener
(SymbolImageListener listener) void
setPermutationMatrix
(PermutationMatrix permutationMatrix) void
setRightCrop
(int newval) Sets the amount of pixels, which are cropped from the right.void
setStretch
(boolean newval) Set the stretch state for the image.void
setTopCrop
(int newval) Sets the amount of pixels, which are cropped from the top.void
setVisible
(boolean visible) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getImagePath
in interfaceSymbolImage
-
setImagePath
- Specified by:
setImagePath
in interfaceSymbolImage
-
getOriginalImageData
- Specified by:
getOriginalImageData
in interfaceSymbolImage
-
dispose
public void dispose()Description copied from interface:SymbolImage
Dispose the resource used by this figure- Specified by:
dispose
in interfaceSymbolImage
-
setVisible
public void setVisible(boolean visible) - Specified by:
setVisible
in interfaceSymbolImage
-
isDisposed
public boolean isDisposed()- Specified by:
isDisposed
in interfaceSymbolImage
-
isEditMode
public boolean isEditMode()- Specified by:
isEditMode
in interfaceSymbolImage
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceSymbolImage
-
resetData
public abstract void resetData() -
setCurrentColor
- Specified by:
setCurrentColor
in interfaceSymbolImage
-
setColorToChange
- Specified by:
setColorToChange
in interfaceSymbolImage
-
setBackgroundColor
- Specified by:
setBackgroundColor
in interfaceSymbolImage
-
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 interfaceSymbolImage
- Returns:
- The auto sized widget dimension.
-
resizeImage
public void resizeImage()Description copied from interface:SymbolImage
Resizes the image.- Specified by:
resizeImage
in interfaceSymbolImage
-
setBounds
public void setBounds(org.eclipse.draw2d.geometry.Rectangle newBounds) - Specified by:
setBounds
in interfaceSymbolImage
-
setAbsoluteScale
public void setAbsoluteScale(double newScale) - Specified by:
setAbsoluteScale
in interfaceSymbolImage
-
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 interfaceSymbolImage
-
setStretch
public void setStretch(boolean newval) Description copied from interface:SymbolImage
Set the stretch state for the image.- Specified by:
setStretch
in interfaceSymbolImage
- 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 interfaceSymbolImage
-
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 interfaceSymbolImage
-
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 interfaceSymbolImage
-
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 interfaceSymbolImage
-
setPermutationMatrix
- Specified by:
setPermutationMatrix
in interfaceSymbolImage
-
getPermutationMatrix
- Specified by:
getPermutationMatrix
in interfaceSymbolImage
-
setAnimationDisabled
public void setAnimationDisabled(boolean stop) - Specified by:
setAnimationDisabled
in interfaceSymbolImage
-
setAlignedToNearestSecond
public void setAlignedToNearestSecond(boolean aligned) - Specified by:
setAlignedToNearestSecond
in interfaceSymbolImage
-
setListener
- Specified by:
setListener
in interfaceSymbolImage
-
fireSymbolImageLoaded
protected void fireSymbolImageLoaded() -
fireSizeChanged
protected void fireSizeChanged() -
repaint
protected void repaint()
-