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
FieldsModifier and TypeFieldDescriptionstatic final StringUnique identifier.static final StringImage disposition (permutation matrix)static final StringTrue if the widget animation start should be aligned to the nearest second.static final StringTrue if the widget size is automatically adjusted to the size of the image.static final StringCrop part (in pixels) on bottom side of the image.static final StringDegree value of the image.static final StringHorizontal flip applied on the image.static final StringVertical flip applied on the image.static final StringFile path of the image.static final StringCrop part (in pixels) on left side of the image.static final StringTrue if the widget doesn't show animation even it is a animated image file.static final StringCrop part (in pixels) on right side of the image.static final StringTrue if the image should be stretched to the widget size.static final StringCrop 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidConfigure the properties of the widget.voidFlip the widget figure horizontally.voidFlip the widget figure vertically.intReturns the amount of pixels, which should be cropped from the bottom edge of the image.intgetDegree(int index) Returns the path to the specified file.intReturns the amount of pixels, which should be cropped from the left edge of the image.intReturns the amount of pixels, which should be cropped from the right edge of the image.booleanReturns if the image should be stretched.intReturns the amount of pixels, which should be cropped from the top edge of the image.booleanbooleanbooleanvoidrotate90(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:
getTypeIDin classAbstractWidgetModel- Returns:
- the unique typeID of the model.
-
configureProperties
protected void configureProperties()Description copied from class:AbstractWidgetModelConfigure the properties of the widget. Subclass should add new properties in this method.- Specified by:
configurePropertiesin 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:AbstractWidgetModelRotate the widget figure 90 degree.- Overrides:
rotate90in classAbstractWidgetModel- Parameters:
clockwise- true if rotate clockwise. false if counterclockwise.
-
flipHorizontally
public void flipHorizontally()Description copied from class:AbstractWidgetModelFlip the widget figure horizontally.- Overrides:
flipHorizontallyin classAbstractWidgetModel
-
flipVertically
public void flipVertically()Description copied from class:AbstractWidgetModelFlip the widget figure vertically.- Overrides:
flipVerticallyin classAbstractWidgetModel
-