|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsimtools.shapes.AbstractShape
jsynoptic.builtin.HistoryTextShape
public class HistoryTextShape
| Nested Class Summary | |
|---|---|
static class |
HistoryTextShape.HistoryTextShapePropertiesNames
|
| Nested classes/interfaces inherited from class simtools.shapes.AbstractShape |
|---|
AbstractShape.AbstractShapePropertiesNames |
| Field Summary | |
|---|---|
protected java.util.ArrayList |
cells
The array cells are of type HistoryTextShape |
protected java.lang.String |
link
Linkable shape |
static java.util.ResourceBundle |
resources
|
| 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 | |
|---|---|
HistoryTextShape(int histSize,
int width,
int cellHeight)
|
|
HistoryTextShape(int ox,
int oy,
int histSize,
int width,
int cellHeight)
Build an History shape with the given history size (number of time values to retain). |
|
| Method Summary | |
|---|---|
boolean |
addDataSource(DataSource d)
|
boolean |
canAddDataSource(DataSource d)
|
boolean |
canDoAction(double x,
double y,
java.lang.Object o,
java.lang.String action,
int context)
Returns true if, and only if, it is possible to do the action right now |
protected AbstractShape |
cloneShape()
Performs a copy of the shape This method has to be overriden to deal with concrete shapes |
JPropertiesPanel |
createPanel()
|
protected TextShape |
createTextShape(java.lang.String name,
int width,
int height)
By overwriting this method, it is possible to create different kind of text cells |
boolean |
doAction(double x,
double y,
java.lang.Object o,
java.lang.String action,
javax.swing.undo.CompoundEdit undoableEdit)
Do one of the actions previously declared by getAction. |
void |
draw(java.awt.Graphics2D g)
Draws the shape |
java.lang.String[] |
getActions(double x,
double y,
java.lang.Object o,
int context)
Return list of possible actions the contect information may be used, or not. |
java.util.ArrayList |
getCells()
|
java.lang.String |
getLink()
|
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 |
void |
notificationEnd(java.lang.Object referer)
This callback is called after all notifications were processed. |
protected void |
positionCells()
This function supposes dimensions are correct, it will not check that Also, it does not notify changes. |
protected void |
propagate()
Propagate cells color and text values. |
void |
resize(int dx,
int dy)
Resize the component |
void |
setAnchor(int ox,
int oy)
|
void |
setCells(java.util.ArrayList cellProperties)
- Set first cell properties - Propagate static attributes to other cells |
protected void |
setCellsTextValues()
|
void |
setLink(java.lang.String link)
|
void |
setPropertyValue(java.lang.String name,
java.lang.Object value)
Assigns value to the property named name |
void |
translate(int dx,
int dy)
Translates the shape |
| 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 |
|---|
public static java.util.ResourceBundle resources
protected java.util.ArrayList cells
protected java.lang.String link
| Constructor Detail |
|---|
public HistoryTextShape(int ox,
int oy,
int histSize,
int width,
int cellHeight)
histSize - The number of time values to retainwidth - The array width @ param height The height of one cell in the array
public HistoryTextShape(int histSize,
int width,
int cellHeight)
histSize - width - cellHeight - | Method Detail |
|---|
public java.lang.String getLink()
getLink in interface Linkablepublic void setLink(java.lang.String link)
setLink in interface Linkablepublic java.util.ArrayList getCells()
public void translate(int dx,
int dy)
AbstractShape
translate in class AbstractShape
public void setAnchor(int ox,
int oy)
setAnchor in class AbstractShapepublic void draw(java.awt.Graphics2D g)
AbstractShape
draw in class AbstractShapeg - the graphics contextpublic boolean addDataSource(DataSource d)
addDataSource in interface DataSourceConsumerd - the data source to be added
protected void propagate()
protected void setCellsTextValues()
protected void positionCells()
public void resize(int dx,
int dy)
Resizable
resize in interface Resizabledx - value on x axisdy - value on y axis
public java.lang.String[] getActions(double x,
double y,
java.lang.Object o,
int context)
ContextualActionProvider
getActions in interface ContextualActionProviderx - 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 actionscontext - one of the context defined in the ContextualActionProvider class
public boolean doAction(double x,
double y,
java.lang.Object o,
java.lang.String action,
javax.swing.undo.CompoundEdit undoableEdit)
ContextualActionProvider
doAction in interface ContextualActionProviderx - Coordinate, for example mouse positiony - Coordinate, for example mouse positiono - 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.
public JPropertiesPanel createPanel()
public boolean canDoAction(double x,
double y,
java.lang.Object o,
java.lang.String action,
int context)
ContextualActionProvider
canDoAction in interface ContextualActionProviderx - Coordinate, for example mouse positiony - Coordinate, for example mouse positiono - 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
protected TextShape createTextShape(java.lang.String name,
int width,
int height)
name - width - height -
public void setCells(java.util.ArrayList cellProperties)
cellProperties - public boolean canAddDataSource(DataSource d)
canAddDataSource in interface DataSourceConsumerd - the data source to be added
protected AbstractShape cloneShape()
AbstractShape
cloneShape in class AbstractShapepublic void notificationEnd(java.lang.Object referer)
EndNotificationListener
notificationEnd in interface EndNotificationListenerpublic java.lang.Object getPropertyValue(java.lang.String name)
AbstractShapename
getPropertyValue in interface NamedPropertiesgetPropertyValue in class AbstractShapename - 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 AbstractShapename - 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 AbstractShape
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||