|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsimtools.shapes.AbstractShape
jsynoptic.builtin.Abstract1DShape
jsynoptic.builtin.ImageShape
public class ImageShape
An image shape will draw an image (how suprising!) It can also draw a dynamic colored frame, and change the image displayed dynamically according to data values.
| Nested Class Summary | |
|---|---|
static class |
ImageShape.ImageShapePropertiesNames
|
| Nested classes/interfaces inherited from class jsynoptic.builtin.Abstract1DShape |
|---|
Abstract1DShape.Abstract1DShapePropertiesNames |
| Nested classes/interfaces inherited from class simtools.shapes.AbstractShape |
|---|
AbstractShape.AbstractShapePropertiesNames |
| Field Summary | |
|---|---|
protected boolean |
autoFit
If the image should be scaled to fit the shape size (autoFit true), else the shape will be resized |
protected java.io.File |
currentFile
|
protected java.lang.String |
currentFileRelativePath
The relative path to the file is serialized |
protected boolean |
dirtyImage
|
protected java.awt.image.BufferedImage |
dynamicImage
|
protected java.awt.image.BufferedImage |
image
|
protected long |
index
|
protected ImageMapper |
mapper
|
static BasicMessageWriter |
messageWriter
|
static java.util.ResourceBundle |
resources
|
protected DataSource |
source
|
| Fields inherited from class jsynoptic.builtin.Abstract1DShape |
|---|
allowResize, bounds2D, delegateEndNotificationListener, dirty, dirtyDrawColor, dirtyRectangle, drawColor, drawDynamicColor, drawMapper, drawMapperIndex, drawMapperSource, fixedRatio, link, MIN_SIZE, ratio, stroke, strokeParams, transform |
| Fields inherited from class simtools.shapes.AbstractShape |
|---|
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD |
| Fields inherited from interface jsynoptic.base.ContextualActionProvider |
|---|
EDITOR_CONTEXT, MOUSE_OUT_CONTEXT, MOUSE_OVER_CONTEXT, MOUSE_PRESSED_CONTEXT, SHAPELIST_CONTEXT, SOURCELIST_CONTEXT |
| Constructor Summary | |
|---|---|
ImageShape(java.io.File f,
int ox,
int oy)
|
|
ImageShape(int ox,
int oy,
int width,
int height)
|
|
| Method Summary | |
|---|---|
protected AbstractShape |
cloneShape()
Performs a copy of the shape This method has to be overriden to deal with concrete shapes |
JPropertiesPanel |
createPanel()
|
void |
DataSourceIndexRangeChanged(DataSource ds,
long startIndex,
long lastIndex)
Called when the range of valid index changed |
void |
DataSourceReplaced(DataSource oldData,
DataSource newData)
Called when a data source is replaced by another one |
void |
DataSourceValueChanged(DataSource ds,
long minIndex,
long maxIndex)
Called when at least a value changed in the data source. |
protected void |
drawHook(java.awt.Graphics2D g,
boolean shapeDrawn)
For subclasses, called before restoring original graphics properties, after the delegate shape is drawn if shapeDrawn is true, or after saving the current context, before the delegate shape is drawn if shapeDrawn is false |
protected java.awt.Shape |
getDelegateShape()
|
protected java.awt.image.BufferedImage |
getDynamicImage()
|
java.lang.String[] |
getPropertyNames()
Get the list of property names |
java.lang.Object |
getPropertyValue(java.lang.String name)
Get the value of the property named name |
protected java.lang.Object |
getSourceValue()
|
boolean |
isAutoFit()
If the image should be scaled to fit the shape size (autoFit true), else the shape will be resized |
void |
notificationEnd(java.lang.Object referer)
This callback is called after all notifications were processed. |
protected void |
resheshImage()
Get current dynamic image and repaint shape when necessay |
void |
setAutoFit(boolean autoFit)
If the image should be scaled to fit the shape size (autoFit true), else the shape will be resized |
void |
setPropertyValue(java.lang.String name,
java.lang.Object value)
Assigns value to the property named name |
void |
wipeOff()
Wipe-off all all buffered resources in order to refresh shape. |
| Methods inherited from class jsynoptic.builtin.Abstract1DShape |
|---|
canDoAction, canResize, contains, contains, contains, contains, createPanel, DataSourceInfoChanged, DataSourceOrderChanged, DataSourceValueRangeChanged, doAction, doCollectiveAction, draw, getActions, getBounds, getBounds2D, getCollectiveActions, getDelegateEndNotificationListener, getDrawColor, getDx, getDy, getLink, getPathIterator, getPathIterator, intersects, intersects, resize, setAnchor, setDelegateEndNotificationListener, setLink, translate, updateBounds, updateTransform |
| Methods inherited from class simtools.shapes.AbstractShape |
|---|
addListener, getAnchor, getInnerProperties, getMax, getMaxTranslated, getMin, notifyChange, notifyChange, refresh, removeListener, setAnchor, setProperties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.util.ResourceBundle resources
public static BasicMessageWriter messageWriter
protected transient java.awt.image.BufferedImage image
protected transient java.awt.image.BufferedImage dynamicImage
protected ImageMapper mapper
protected transient DataSource source
protected transient long index
protected transient boolean dirtyImage
protected transient java.io.File currentFile
protected java.lang.String currentFileRelativePath
protected boolean autoFit
| Constructor Detail |
|---|
public ImageShape(java.io.File f,
int ox,
int oy)
public ImageShape(int ox,
int oy,
int width,
int height)
ox - oy - width - height - | Method Detail |
|---|
public boolean isAutoFit()
public void setAutoFit(boolean autoFit)
protected java.awt.Shape getDelegateShape()
getDelegateShape in class Abstract1DShapeprotected AbstractShape cloneShape()
Abstract1DShape
cloneShape in class Abstract1DShape
protected void drawHook(java.awt.Graphics2D g,
boolean shapeDrawn)
Abstract1DShape
drawHook in class Abstract1DShapepublic JPropertiesPanel createPanel()
createPanel in class Abstract1DShapeprotected void resheshImage()
protected java.lang.Object getSourceValue()
throws DataException
DataExceptionprotected java.awt.image.BufferedImage getDynamicImage()
public void notificationEnd(java.lang.Object referer)
EndNotificationListener
notificationEnd in interface EndNotificationListenernotificationEnd in class Abstract1DShape
public void DataSourceIndexRangeChanged(DataSource ds,
long startIndex,
long lastIndex)
DataSourceListener
DataSourceIndexRangeChanged in interface DataSourceListenerDataSourceIndexRangeChanged in class Abstract1DShapeds - The data source that changedstartIndex - The new start IndexlastIndex - The new last index
public void DataSourceValueChanged(DataSource ds,
long minIndex,
long maxIndex)
DataSourceListener
DataSourceValueChanged in interface DataSourceListenerDataSourceValueChanged in class Abstract1DShapeds - The data source that changedminIndex - Lower bound of the range where values changedmaxIndex - Higher bound of the range where values changed
public void DataSourceReplaced(DataSource oldData,
DataSource newData)
DataSourceListener
DataSourceReplaced in interface DataSourceListenerDataSourceReplaced in class Abstract1DShapepublic java.lang.Object getPropertyValue(java.lang.String name)
AbstractShapename
getPropertyValue in interface NamedPropertiesgetPropertyValue in class Abstract1DShapename - the name of the property to get
AbstractShape.getPropertyValue(String)
public void setPropertyValue(java.lang.String name,
java.lang.Object value)
AbstractShapevalue to the property named name
setPropertyValue in interface NamedPropertiessetPropertyValue in class Abstract1DShapename - the name of the property to getvalue - its new valueAbstractShape.setPropertyValue(String, Object)public java.lang.String[] getPropertyNames()
NamedProperties
getPropertyNames in interface NamedPropertiesgetPropertyNames in class Abstract1DShapepublic void wipeOff()
AbstractShape
wipeOff in class AbstractShape
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||