jsynoptic.builtin
Class TimePlot
java.lang.Object
simtools.shapes.AbstractShape
simtools.shapes.PlotShape
jsynoptic.builtin.Plot
jsynoptic.builtin.TimePlot
- All Implemented Interfaces:
- java.awt.Shape, java.io.Serializable, java.lang.Cloneable, ContextualActionProvider, DataSourceConsumer, Linkable, SelectionContextualActionProvider, EndNotificationListener, DiagramComponent.ContextualDrawingProvider, Resizable, CurveShapeListener, ShapeListener, NamedProperties
- Direct Known Subclasses:
- TimePlot
public class TimePlot
- extends Plot
- See Also:
- Serialized Form
Fields inherited from class jsynoptic.builtin.Plot |
autopx, autopy, autosx, autosy, AXE_NUMBER, axesLimitsArray, AXIS_ID, DEFAULT_DISPLAY_DATA_SOURCE_ID, defaultPalette, isNotifying, isPrimaryBounded, isSecondaryBounded, link, nbXGraduation, nbYGraduation, paletteIndex, preferredXGraduation, preferredYGraduation, primaryCurves, primaryEndIndex, primaryStartIndex, primaryX, PX, pxlabel, pxmax, pxmin, pxstep, pxvaluesOK, PY, pylabel, pymax, pymin, pystep, pyvaluesOK, resources, secondaryCurves, secondaryEndIndex, secondaryStartIndex, secondaryX, SX, sxlabel, sxmax, sxmin, sxstep, sxvaluesOK, SY, sylabel, symax, symin, systep, syvaluesOK, translateDrawing, zoomDrawing |
Fields inherited from class simtools.shapes.PlotShape |
_asx1, _asx2, _asy1, _asy2, _color, _curves, _font, _limits, _magnetizedCurve, curveInformationFont, curveInformationLabel, dirty, displayCurveInformation, hasLegend, image, imageGraphics, legendBounds, logpx, logpy, logsx, logsy, optimize, optimizeMode, pyformat, syformat, title, titleFont |
Fields inherited from class simtools.shapes.AbstractShape |
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD |
Constructor Summary |
TimePlot(int ox,
int oy,
int width,
int height)
|
Method Summary |
java.text.SimpleDateFormat |
computeFormat(double min,
double max,
boolean secondary)
|
JPropertiesPanel |
createPanel()
|
void |
displayCursorLocation(double x,
double y)
|
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. |
protected java.awt.Rectangle |
drawLegendAndGetBounds(java.awt.Graphics2D g2,
java.awt.Rectangle reference)
|
protected void |
secondaryAxisBoundComputation(java.awt.Rectangle ret)
Take into account additional elements in bounds
computation for the secondary x axis |
void |
set(double min,
double max,
double step,
boolean onX,
boolean secondary)
Set axis coordinates |
void |
setDateTime(java.lang.String s,
boolean secondary)
Set date and time on the plot |
void |
setDateTimeFont(java.awt.Font f)
|
protected void |
setTimeFormat(double min,
double max,
double step,
boolean secondary)
|
Methods inherited from class jsynoptic.builtin.Plot |
addDataSource, addPrimaryY, addPrimaryYForSecondaryX, addSecondaryY, addSecondaryYForSecondaryX, addY, canAddDataSource, canDoAction, cloneShape, computeHorizontalAxeRange, computeStep, computeTranslationAxeRange, computeVerticalAxeRange, computeVerticalBoundAndStep, computeZoomWheelHorizontalAxeRange, computeZoomWheelVerticalAxeRange, doAddLimitAction, doAddYAction, doCollectiveAction, getActions, getAxesProperties, getAxeValue, getCollectiveActions, getContextualDrawing, getCurveParameters, getCurvesProperties, getLimitParameters, getLink, getPrimaryX, getPropertyNames, getPropertyValue, getSecondaryX, notificationEnd, notifyChange, refresh, removeCurve, repaintDiagram, setCurveParameters, setLimitParamters, setLink, setPrimaryX, setPropertyValue, setSecondaryX, setX, setX, shapeDataChanged, translate, zoom, zoomWheel |
Methods inherited from class simtools.shapes.PlotShape |
computeBounds, computeLegendBounds, draw, drawCurves, drawLegend, drawLimits, drawMagnetizedCurve, getCurve, getCurve, getCurveNumber, getCurvesInformation, getLimit, getLimit, getLimitNumber, getPrimaryXAxis, getSecondaryXAxis, getTitle, insertCurve, insertCurve, insertCurve, insertCurve, insertLimit, insertLimit, insertLimit, isCurveInformationVisible, isLegendVisible, isOptimize, isSecondaryAxis, removeLimit, resize, setAnchor, setAnchor, setColor, setCurveColor, setCurveInformationVisible, setCurveLabel, setFont, setFormat, setLabel, setLegendVisible, setLimitColor, setLimitLabel, setOptimize, setSecondaryAxis, setSecondaryX, setSecondaryY, setTitle, setTitleFont, setX, setXLabel, setXLabel, setY, setYLabel, setYLabel, shapeChanged, shapeChanged, translate, updateBounds, updateCurveInformation |
Methods inherited from class simtools.shapes.AbstractShape |
addListener, contains, contains, contains, contains, getAnchor, getBounds, getBounds2D, getInnerProperties, getMax, getMaxTranslated, getMin, getPathIterator, getPathIterator, intersects, intersects, notifyChange, removeListener, setProperties, wipeOff |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_dateTime
protected LabelShape _dateTime
_sdateTime
protected LabelShape _sdateTime
_dateTimeFont
protected java.awt.Font _dateTimeFont
datePart1
protected transient java.text.SimpleDateFormat datePart1
datePart2
protected transient java.text.SimpleDateFormat datePart2
TimePlot
public TimePlot(int ox,
int oy,
int width,
int height)
set
public void set(double min,
double max,
double step,
boolean onX,
boolean secondary)
- Description copied from class:
PlotShape
- Set axis coordinates
- Overrides:
set
in class PlotShape
setTimeFormat
protected void setTimeFormat(double min,
double max,
double step,
boolean secondary)
createPanel
public JPropertiesPanel createPanel()
- Overrides:
createPanel
in class Plot
secondaryAxisBoundComputation
protected void secondaryAxisBoundComputation(java.awt.Rectangle ret)
- Take into account additional elements in bounds
computation for the secondary x axis
- Parameters:
ret
- the rectangle with bounds to update
drawLegendAndGetBounds
protected java.awt.Rectangle drawLegendAndGetBounds(java.awt.Graphics2D g2,
java.awt.Rectangle reference)
- Overrides:
drawLegendAndGetBounds
in class PlotShape
doAction
public boolean doAction(double x,
double y,
java.lang.Object o,
java.lang.String action,
javax.swing.undo.CompoundEdit undoableEdit)
- Description copied from interface:
ContextualActionProvider
- Do one of the actions previously declared by getAction.
- Specified by:
doAction
in interface ContextualActionProvider
- Overrides:
doAction
in class Plot
- Parameters:
x
- 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.
- Returns:
- true if the action could be performed
setDateTime
public void setDateTime(java.lang.String s,
boolean secondary)
- Set date and time on the plot
- Parameters:
s
- : the string of the DateTimesecondary
- : true -> secondary date time
false-> primary date time
setDateTimeFont
public void setDateTimeFont(java.awt.Font f)
computeFormat
public java.text.SimpleDateFormat computeFormat(double min,
double max,
boolean secondary)
displayCursorLocation
public void displayCursorLocation(double x,
double y)
- Overrides:
displayCursorLocation
in class Plot