Class NodeImage
java.lang.Object
com.orchestranetworks.addon.dmdv.template.bean.NodeElement
com.orchestranetworks.addon.dmdv.template.bean.NodeImage
Represents an image element.
The image source can be a fixed URL, or a media field's path.
- Since:
- 1.2.0
-
Constructor Summary
ConstructorDescriptionConstructs a newNodeImage
that by default auto stretches to fit the given bounds. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the opacity of this image.boolean
Returnstrue
if the image is stretched within its bounding box;false
otherwise.void
setBindingSource
(NodeValueRenderer action) Sets the source for this image usingNodeValueRenderer
.void
setBindingSource
(String source) Sets the source for this image.void
setImageStretch
(boolean imageStretch) Sets whether the image must stretch within its bounding box.void
setOpacity
(double opacity) Sets the opacity for this image.Methods inherited from class com.orchestranetworks.addon.dmdv.template.bean.NodeElement
getAlignment, getBackgroundColor, getBindingValuesPublic, getElementType, getHeight, getMargin, getMargin, getName, getWidth, setAlignment, setBackgroundColor, setHeight, setMargin, setName, setWidth
-
Constructor Details
-
NodeImage
public NodeImage()Constructs a newNodeImage
that by default auto stretches to fit the given bounds.
-
-
Method Details
-
setBindingSource
Sets the source for this image. It can be a fixed URL, or a media field's path. A media field is used by the TIBCO EBX Digital Asset Manager Add-on to attach an asset to a table field. The media field path must follow the following pattern: ${fieldPath} not including the table path. Examples: - A fixed URL: "/www/common/images/icons/avatar.png". - A DAM field path: "${/picture/attachment}".- Parameters:
source
- the fixed URL, or the path of media field.
-
setBindingSource
Sets the source for this image usingNodeValueRenderer
.- Parameters:
action
- an implementation ofNodeValueRenderer
.
-
getOpacity
public double getOpacity()Returns the opacity of this image. -
setOpacity
public void setOpacity(double opacity) Sets the opacity for this image. The value must be between 0.0 (fully transparent) and 1.0 (no additional transparency).- Parameters:
opacity
- the multiplicative opacity for this image.
-
isImageStretch
public boolean isImageStretch()Returnstrue
if the image is stretched within its bounding box;false
otherwise. -
setImageStretch
public void setImageStretch(boolean imageStretch) Sets whether the image must stretch within its bounding box.- Parameters:
imageStretch
- a boolean value
-