Class ImageModel
java.lang.Object
org.csstudio.opibuilder.model.AbstractWidgetModel
org.csstudio.opibuilder.widgets.model.ImageModel
- All Implemented Interfaces:
IAdaptable
,IPropertySource
An image widget model.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Unique identifier.static final String
Image disposition (permutation matrix)static final String
True if the widget animation start should be aligned to the nearest second.static final String
True if the widget size is automatically adjusted to the size of the image.static final String
Crop part (in pixels) on bottom side of the image.static final String
Degree value of the image.static final String
Horizontal flip applied on the image.static final String
Vertical flip applied on the image.static final String
File path of the image.static final String
Crop part (in pixels) on left side of the image.static final String
True if the widget doesn't show animation even it is a animated image file.static final String
Crop part (in pixels) on right side of the image.static final String
True if the image should be stretched to the widget size.static final String
Crop part (in pixels) on top side of the image.Fields inherited from class org.csstudio.opibuilder.model.AbstractWidgetModel
PROP_ACTIONS, PROP_BORDER_COLOR, PROP_BORDER_STYLE, PROP_BORDER_WIDTH, PROP_COLOR_BACKGROUND, PROP_COLOR_FOREGROUND, PROP_ENABLED, PROP_FONT, PROP_HEIGHT, PROP_NAME, PROP_RULES, PROP_SCALE_OPTIONS, PROP_SCRIPTS, PROP_SRC_CONNECTIONS, PROP_TGT_CONNECTIONS, PROP_TOOLTIP, PROP_VISIBLE, PROP_WIDGET_TYPE, PROP_WIDGET_UID, PROP_WIDTH, PROP_XPOS, PROP_YPOS, VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Configure the properties of the widget.void
Flip the widget figure horizontally.void
Flip the widget figure vertically.int
Returns the amount of pixels, which should be cropped from the bottom edge of the image.int
getDegree
(int index) Returns the path to the specified file.int
Returns the amount of pixels, which should be cropped from the left edge of the image.int
Returns the amount of pixels, which should be cropped from the right edge of the image.boolean
Returns if the image should be stretched.int
Returns the amount of pixels, which should be cropped from the top edge of the image.boolean
boolean
boolean
void
rotate90
(boolean clockwise) Rotate the widget figure 90 degree.Methods inherited from class org.csstudio.opibuilder.model.AbstractWidgetModel
addConnection, addProperty, addProperty, addPVProperty, configureBaseProperties, doScale, flipHorizontally, flipVertically, generateNewWUID, getActionsInput, getAdapter, getAllPropertyIDs, getBackgroundColor, getBorderColor, getBorderStyle, getBorderWidth, getBounds, getCastedPropertyValue, getEditableValue, getExecutionMode, getFont, getForegroundColor, getHeight, getIndex, getLocation, getName, getNestedDepth, getOriginLocation, getOriginSize, getParent, getProperty, getPropertyDescriptors, getPropertyValue, getPVMap, getRawPropertyValue, getRawTooltip, getRGBFromColorProperty, getRootDisplayModel, getRootDisplayModel, getRulesInput, getRuntimePropertyList, getScaledSize, getScaleOptions, getScriptsInput, getSize, getSourceConnections, getSWTColorFromColorProperty, getTargetConnections, getTooltip, getType, getVersion, getVersionOnFile, getWidgetType, getWidth, getWUID, getX, getY, isEnabled, isPropertySet, isVisible, processVersionDifference, removeProperty, removePVProperty, resetPropertyValue, rotate90, scale, scaleConnections, setBackgroundColor, setBorderColor, setBorderStyle, setBorderWidth, setBounds, setBounds, setEnabled, setExecutionMode, setForegroundColor, setHeight, setLocation, setLocation, setName, setParent, setPropertyDescription, setPropertyValue, setPropertyValue, setPropertyVisible, setPropertyVisibleAndSavable, setScaleOptions, setSize, setSize, setTooltip, setVersionOnFile, setWidth, setX, setY
-
Field Details
-
ID
Unique identifier.- See Also:
-
PROP_IMAGE_FILE
File path of the image.- See Also:
-
PROP_TOPCROP
Crop part (in pixels) on top side of the image.- See Also:
-
PROP_BOTTOMCROP
Crop part (in pixels) on bottom side of the image.- See Also:
-
PROP_LEFTCROP
Crop part (in pixels) on left side of the image.- See Also:
-
PROP_RIGHTCROP
Crop part (in pixels) on right side of the image.- See Also:
-
PROP_STRETCH
True if the image should be stretched to the widget size.- See Also:
-
PROP_AUTOSIZE
True if the widget size is automatically adjusted to the size of the image.- See Also:
-
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
True if the widget animation start should be aligned to the nearest second.- See Also:
-
PROP_DEGREE
Degree value of the image.- See Also:
-
PROP_FLIP_HORIZONTAL
Horizontal flip applied on the image.- See Also:
-
PROP_FLIP_VERTICAL
Vertical flip applied on the image.- See Also:
-
PERMUTATION_MATRIX
Image disposition (permutation matrix)- See Also:
-
-
Constructor Details
-
ImageModel
public ImageModel()
-
-
Method Details
-
getTypeID
- Specified by:
getTypeID
in classAbstractWidgetModel
- 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 classAbstractWidgetModel
-
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
- 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 classAbstractWidgetModel
- 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 classAbstractWidgetModel
-
flipVertically
public void flipVertically()Description copied from class:AbstractWidgetModel
Flip the widget figure vertically.- Overrides:
flipVertically
in classAbstractWidgetModel
-