jsynoptic.builtin
Class HistoryShape

java.lang.Object
  extended by simtools.shapes.AbstractShape
      extended by jsynoptic.builtin.TextArrayShape
          extended by jsynoptic.builtin.HistoryShape
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable, ContextualActionProvider, DataSourceConsumer, Linkable, EndNotificationListener, Resizable, NamedProperties

Deprecated. Use HistoryTextShape instead

public class HistoryShape
extends TextArrayShape

History shapes keep the previous values of a data source and display them in a text array

See Also:
Serialized Form

Nested Class Summary
static class HistoryShape.HistoryShapePropertiesNames
          Deprecated.  
static class HistoryShape.HookedTextShape
          Deprecated. Override methods called when data source change. => the first cell listens to data source Changes are propagated.
 
Nested classes/interfaces inherited from class jsynoptic.builtin.TextArrayShape
TextArrayShape.TextArrayShapePropertiesNames
 
Nested classes/interfaces inherited from class simtools.shapes.AbstractShape
AbstractShape.AbstractShapePropertiesNames
 
Field Summary
static java.util.ResourceBundle resources
          Deprecated.  
 
Fields inherited from class jsynoptic.builtin.TextArrayShape
cells, forceSameFont, link
 
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
HistoryShape(int histSize, int width, int cellHeight)
          Deprecated. Build an History shape with the given history size (number of time values to retain).
 
Method Summary
 boolean addDataSource(DataSource d)
          Deprecated.  
 boolean canDoAction(double x, double y, java.lang.Object o, java.lang.String action, int context)
          Deprecated. Returns true if, and only if, it is possible to do the action right now
protected  AbstractShape cloneShape()
          Deprecated. Performs a copy of the shape This method has to be overriden to deal with concrete shapes
protected  HistoryShape.HookedTextShape createHookedTextShape(java.lang.String text, int width, int height)
          Deprecated. By overwriting this method, it is possible to create different kind of history cells
 JPropertiesPanel createPanel()
          Deprecated.  
 boolean doAction(double x, double y, java.lang.Object o, java.lang.String action, javax.swing.undo.CompoundEdit undoableEdit)
          Deprecated. Do one of the actions previously declared by getAction.
 java.lang.String[] getActions(double x, double y, java.lang.Object o, int context)
          Deprecated. Return list of possible actions the contect information may be used, or not.
 java.lang.String[] getPropertyNames()
          Deprecated. Get the list of property names
 java.lang.Object getPropertyValue(java.lang.String name)
          Deprecated. Get the value of the property named name
protected  void initWithLastDataSourceValues()
          Deprecated.  
 void notificationEnd(java.lang.Object referer)
          Deprecated. This callback is called after all notifications were processed.
 void setCells(java.util.Vector cellsProperties)
          Deprecated.  
 void setPropertyValue(java.lang.String name, java.lang.Object value)
          Deprecated. Assigns value to the property named name
 
Methods inherited from class jsynoptic.builtin.TextArrayShape
canAddDataSource, createTextShape, draw, getCells, getLink, positionCells, resize, setAnchor, setLink, translate, unifyFonts
 
Methods inherited from class simtools.shapes.AbstractShape
addListener, contains, contains, contains, contains, getAnchor, getBounds, getBounds2D, getInnerProperties, getMax, getMaxTranslated, getMin, getPathIterator, getPathIterator, intersects, intersects, notifyChange, notifyChange, refresh, removeListener, setAnchor, setProperties, wipeOff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

public static java.util.ResourceBundle resources
Deprecated. 
Constructor Detail

HistoryShape

public HistoryShape(int histSize,
                    int width,
                    int cellHeight)
Deprecated. 
Build an History shape with the given history size (number of time values to retain). The width argument is the array width, the height one is the height of one cell.

Parameters:
histSize - The number of time values to retain
width - The array width @ param height The height of one cell in the array
Method Detail

createHookedTextShape

protected HistoryShape.HookedTextShape createHookedTextShape(java.lang.String text,
                                                             int width,
                                                             int height)
Deprecated. 
By overwriting this method, it is possible to create different kind of history cells

Parameters:
name -
width -
height -
Returns:
a text shape belonging to history

getActions

public java.lang.String[] getActions(double x,
                                     double y,
                                     java.lang.Object o,
                                     int context)
Deprecated. 
Description copied from interface: ContextualActionProvider
Return list of possible actions the contect information may be used, or not.

Specified by:
getActions in interface ContextualActionProvider
Overrides:
getActions in class TextArrayShape
Parameters:
x - Coordinate, mouse position in the same unit as contains(x,y)
y - Coordinate, mouse position in the same unit as contains(x,y)
o - Object the actions should work on. Possibly null => default or all actions
context - one of the context defined in the ContextualActionProvider class
Returns:
The list of possible actions, possibly null or an empty array

createPanel

public JPropertiesPanel createPanel()
Deprecated. 
Overrides:
createPanel in class TextArrayShape

doAction

public boolean doAction(double x,
                        double y,
                        java.lang.Object o,
                        java.lang.String action,
                        javax.swing.undo.CompoundEdit undoableEdit)
Deprecated. 
Description copied from interface: ContextualActionProvider
Do one of the actions previously declared by getAction.

Specified by:
doAction in interface ContextualActionProvider
Overrides:
doAction in class TextArrayShape
Parameters:
x - Coordinate, for example mouse position
y - Coordinate, for example mouse position
o - Object the action should work on.
action - An action returned by a previous getActions call with the same x, y, o parameters It may be null, in which case the default action is requested for this x,y,o.
undoableEdit - current edit for undo/redo operation If not null, this action is undoable.
Returns:
true if the action could be performed

canDoAction

public boolean canDoAction(double x,
                           double y,
                           java.lang.Object o,
                           java.lang.String action,
                           int context)
Deprecated. 
Description copied from interface: ContextualActionProvider
Returns true if, and only if, it is possible to do the action right now

Specified by:
canDoAction in interface ContextualActionProvider
Overrides:
canDoAction in class TextArrayShape
Parameters:
x - Coordinate, for example mouse position
y - Coordinate, for example mouse position
o - Object the action should work on.
action - An action returned by a previous getActions call with the same x, y, o parameters It may be null, in which case the default action is requested for this x,y,o.
context - one of the context defined in the ContextualActionProvider class
Returns:
true if the action can be performed

initWithLastDataSourceValues

protected void initWithLastDataSourceValues()
Deprecated. 

setCells

public void setCells(java.util.Vector cellsProperties)
Deprecated. 
Overrides:
setCells in class TextArrayShape

notificationEnd

public void notificationEnd(java.lang.Object referer)
Deprecated. 
Description copied from interface: EndNotificationListener
This callback is called after all notifications were processed. The referer object is the one to decide what the end means. For example, it may be a single data source notifying both a range change and a value change. Or it could be a collection notifying all its sources.

Specified by:
notificationEnd in interface EndNotificationListener
Overrides:
notificationEnd in class TextArrayShape

cloneShape

protected AbstractShape cloneShape()
Deprecated. 
Description copied from class: AbstractShape
Performs a copy of the shape This method has to be overriden to deal with concrete shapes

Overrides:
cloneShape in class TextArrayShape
Returns:
a copy of the shape

addDataSource

public boolean addDataSource(DataSource d)
Deprecated. 
Specified by:
addDataSource in interface DataSourceConsumer
Overrides:
addDataSource in class TextArrayShape
Parameters:
d - the data source to be added
Returns:
true if operation succeeds

setPropertyValue

public void setPropertyValue(java.lang.String name,
                             java.lang.Object value)
Deprecated. 
Description copied from class: AbstractShape
Assigns value to the property named name

Specified by:
setPropertyValue in interface NamedProperties
Overrides:
setPropertyValue in class TextArrayShape
Parameters:
name - the name of the property to get
value - its new value
See Also:
AbstractShape.setPropertyValue(String, Object)

getPropertyNames

public java.lang.String[] getPropertyNames()
Deprecated. 
Description copied from interface: NamedProperties
Get the list of property names

Specified by:
getPropertyNames in interface NamedProperties
Overrides:
getPropertyNames in class TextArrayShape

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)
Deprecated. 
Description copied from class: AbstractShape
Get the value of the property named name

Specified by:
getPropertyValue in interface NamedProperties
Overrides:
getPropertyValue in class TextArrayShape
Parameters:
name - the name of the property to get
Returns:
the property value
See Also:
AbstractShape.getPropertyValue(String)