|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
jview.JNormalizedCanvas
jview.JViewportCanvas
jview.JFrameCanvas
jview.JBoxedCanvas
jview.JDataCanvas
public class JDataCanvas
A class that makes the content of a List of VectorGs
visible. It is
arranged in a way that incomming values are displayed on the canvas until
the window is filled. Then only the newer numbers are shown.
| Nested Class Summary | |
|---|---|
static class |
JDataCanvas.AnimTest
|
static class |
JDataCanvas.Highlight
|
static class |
JDataCanvas.Histogram
A class that shows a histogram of a FITS image. |
static class |
JDataCanvas.Test
|
protected static class |
JDataCanvas.TestCanvas
A test class for testing the layout |
| Nested classes/interfaces inherited from class jview.JBoxedCanvas |
|---|
JBoxedCanvas.Datum |
| Nested classes/interfaces inherited from class jview.JViewportCanvas |
|---|
JViewportCanvas.ViewportKey |
| Nested classes/interfaces inherited from class jview.JNormalizedCanvas |
|---|
JNormalizedCanvas.ShowImage |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private Map<String,List<ShapeDraw>> |
datadraw
We do not want to remove fixed objects, thus we have another table. |
static String |
DATALOSSPROPERTY
The name of the data-lost property. |
private static boolean |
DEFCONNECT
The default connecting behaviour. |
private static boolean |
DEFDATALAST
The default keep-size-constant. |
private static boolean |
DEFEQUALSCALE
The default keep-scale-constant. |
private static boolean |
DEFEQUALSTART
The default keep-scale-constant. |
private static boolean |
DEFERRORALWAYSRED
The default draw-error-in-my-color behaviour. |
private static DrawingInfo |
DEFERRORCOLOR
The default error color |
private static boolean |
DEFERRORHAT
Default we show the little error bars on top/bottom of the raiser. |
private static double |
DEFERRORHATLENGTH
Default length of the tiny 'hats' on top/b/r/l of the error raiser. |
private static boolean |
DEFERRORINCLUDE
The default error inclusion behaviour on size determination. |
private static boolean |
DEFERRORSHOW
The default error showing behaviour. |
private static boolean |
DEFFLIPXAXIS
The default flipping of the x-axis. |
private static boolean |
DEFFLIPYAXIS
The default flipping of the y-axis. |
private static Shape |
DEFHIGHLIGHTSHAPE
The default highlight shape. |
private static double |
DEFLEGENDGAP
Spacing of legend in x . |
private static double |
DEFLEGENDLENGTH
Spacing of legend in x . |
private static double |
DEFLEGENDY
Spacing of legend in y . |
private static int |
DEFPOINTS
The default maximum number of points, zero for all points. |
private static double |
DEFPRINTFONTSCALE
Default printer scaling for font. |
private static boolean |
DEFRETAINSIZE
The default keep-size-constant. |
private static ShapeDraw |
DEFSHAPE
The default data shape, a circle of diameter 0.01. |
private static double |
DEFSHAPESIZE
The default zooming factors for data shapes. |
private static int |
DEFXERRORINDEX
The default error in x index, -1 for unspecified. |
private static Shape |
DEFXERRORSHAPE
The default error shape in x, a horizontal line length 1. |
private static int |
DEFXINDEX
The default x index. |
private static double |
DEFXSHRINK
The default x inset in normalized space. |
static double |
DEFXUSERSPACEMIN
A minimum plotting size in user space. |
private static int |
DEFYERRORINDEX
The default error in y index, -1 for unspecified. |
private static Shape |
DEFYERRORSHAPE
The default error shape in y, a vertical line length 1. |
private static int |
DEFYINDEX
The default y index. |
private static double |
DEFYSHRINK
The default y inset in normalized space. |
static double |
DEFYUSERSPACEMIN
A minimum plotting size in user space. |
private static boolean |
DEFZEROXAXIS
The default zeroing x-axis. |
private static boolean |
DEFZEROYAXIS
The default zeroing y-axis. |
private Map<String,List<ShapeDraw>> |
errordraw
We do not want to remove fixed objects, thus we have another table. |
private Map<String,List<PointDraw>> |
errorhats
The error bars for nice viewing. |
private List<String> |
joints
The list of sets that create joined points. |
static String |
KEY_CONNECT
The key to showing connection lines between data points. |
static String |
KEY_DATALAST
If true, data is drawn after normalized objects.. |
static String |
KEY_EQUALSCALE
If true, x and y are scaled with same factor in normalized space. |
static String |
KEY_EQUALSTART
If true, x and y start from the same minimum. |
static String |
KEY_ERRORALWAYSRED
If true, error shows up always in my error color. |
static String |
KEY_ERRORCOLOR
The error color. |
static String |
KEY_ERRORHAT
If true, error shows a little line on top/bootm of raiser. |
static String |
KEY_ERRORHATLENGTH
Normalized length of the error raiser top/bottom ridge. |
static String |
KEY_ERRORINCLUDE
If true, errors are included in width calculation. |
static String |
KEY_ERRORSHOW
If true, errors are shown if available. |
static String |
KEY_FLIPXAXIS
The key to flipping x-coordinates. |
static String |
KEY_FLIPYAXIS
The key to flipping x-coordinates. |
static String |
KEY_HIGHLIGHTSHAPE
The shape for highlighted (active) data cards. |
static String |
KEY_JOINDATA
Only sets with this name create connected points. |
static String |
KEY_LABELFONT
If given, use this font for the axis label, otherwise use default. |
static String |
KEY_LEGEND
If given, the upper left corner of a legend box. |
static String |
KEY_LEGENDGAP
Defines the length of the gap between the legend line and string. |
static String |
KEY_LEGENDLENGTH
Defines the length of the legend line. |
static String |
KEY_LEGENDLIST
If given, the order of the legend entries. |
static String |
KEY_LEGENDMAP
If given, translates set names to legend displays. |
static String |
KEY_LEGENDY
Defines the spacing between legend entries. |
static String |
KEY_POINTS
The maximum number of data points displayed, zero for all points. |
static String |
KEY_POLYGONSHAPE
The mapping of set names to shape from ShapeFactory. |
static String |
KEY_RETAINSIZE
If true, size of data symbols is constant under user zooms. |
static String |
KEY_SAVESETS
A mapping of set names to descriptions used at data save. |
static String |
KEY_SHAPESIZE
An adjustable scaling factor for the data point shapes. |
static String |
KEY_XAXISDISTANCE
A distance from the lower box width to the x-axis label. |
static String |
KEY_XAXISLABEL
If given, a label drawn on the x-axis. |
static String |
KEY_XERRORINDEX
The index of the x-error, zero means absent. |
static String |
KEY_XERRORSHAPE
The String used to construct an error shape with ShapeFactory. |
static String |
KEY_XINDEX
The index of the x-component. |
static String |
KEY_XSHRINK
The x-span added to the display, normalized coordinates. |
static String |
KEY_XUSERSPACEMIN
A minimum plotting size in user space x axis. |
static String |
KEY_YAXISDISTANCE
A distance from the lower box width to the x-axis label. |
static String |
KEY_YAXISLABEL
If given, a label drawn on the y-axis. |
static String |
KEY_YERRORINDEX
The index of the y-error, zero means absent. |
static String |
KEY_YERRORSHAPE
The String used to construct an error shape with ShapeFactory. |
static String |
KEY_YINDEX
The index of the y-component |
static String |
KEY_YSHRINK
The y-span added to the display, normalized coordinates. |
static String |
KEY_YUSERSPACEMIN
A minimum plotting size in user space x axis. |
static String |
KEY_ZEROXAXIS
If true, x has x=0 in the center of plot. |
static String |
KEY_ZEROYAXIS
If true, y has y=0 in the center of plot. |
private static String |
LEGEND
The name of legend lines. |
private static String |
LINE
The name of legend lines. |
private Map<String,List<ShapeDraw>> |
linedraw
We do not want to remove fixed objects, thus we have another table. |
private Map<String,List<DataObserver>> |
ogle
The mapping of set names to data observers. |
private Map<String,List<PointDraw>> |
pointdraw
We do not want to remove fixed objects, thus we have another table. |
static String |
RESCALEPROPERTY
The name of the rescale property. |
static String |
SAVEDATA
The label one the action that save the plot data |
private Map<String,ShapeDraw> |
setshapes
The set names mapped to their generic shapes. |
private Map<String,List<DataCard>> |
userdata
The mapping of set names to data points in user space. |
private Map<String,VectorG> |
xminmax
For each color the current min/max of the x-coordinate. |
private VectorG |
xspan
From all coordinates, the current span in x plus error. |
private Map<String,VectorG> |
yminmax
For each color the current min/max of the y-coordinate. |
private VectorG |
yspan
From all coordinates, the current span in y plus error. |
| Fields inherited from class jview.JViewportCanvas |
|---|
MAXVIEW, VIEWPORTIMAGEPROPERTY, VIEWPORTPROPERTY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JDataCanvas(PropertyBearing prop)
Constructs a new shelf canvas. |
|
| Method Summary | ||
|---|---|---|
void |
addDataObserver(DataObserver eye,
String setname)
Adds a new data observer for the given set name. |
|
static void |
addDelete(JDataCanvas jtf)
Add a delete cursor to the data canvas. |
|
private int |
addDrawData(String color,
ShapeDraw shape)
Adds a shape to the errorbar list of objects. |
|
Object |
addDrawingInfo(String stylename,
DrawingInfo color)
We allow adding of a new drawing style anf add the line set |
|
private int |
addErrorData(String color,
ShapeDraw shape)
Adds a shape to the errorbar list of objects. |
|
private int |
addErrorHat(String color,
PointDraw shape)
Adds a shape to the errorbar list of objects. |
|
void |
addJoint(String setname)
Adds this set to our allowed joints list. |
|
private int |
addLineData(String color,
ShapeDraw shape)
Adds a shape to the drawable list of objects. |
|
int |
addMeasure(String setname,
VectorG onepoint,
Object key)
Add a point specifying the set name instead of the set color. |
|
int |
addMeasure(VectorG point)
Whenever we add a data point, we recalculate the drawable list and the user transform. |
|
private int |
addPointData(String color,
PointDraw shape)
Adds a shape to the errorbar list of objects. |
|
static void |
addZoom(JDataCanvas jtf)
Add a zoom cursor to the data canvas. |
|
boolean |
clearData()
Clears all accumulated data. |
|
private ShapeDraw |
createLine(CoordinateTransforming xy,
DataCard p1,
DataCard p2)
Creates a line that connects the two data points. |
|
private PointDraw |
createNormalPoint(CoordinateTransforming xy,
DataCard point,
double scalex,
double scaley,
Shape generic,
boolean filled)
Creates a shape from a generic shape that is centered on (0,0). |
|
private ShapeDraw |
createNormalShape(CoordinateTransforming xy,
DataCard point,
double scalex,
double scaley,
Shape generic,
boolean filled)
Creates a shape from a generic shape that is centered on (0,0). |
|
DataTransfer |
deleteClosest(Point2D norm,
String setname)
Deletes the data point on the set closest to the normalized screen coordinates. |
|
List<DataTransfer> |
deleteInside(Rectangle2D norm,
String setname)
Deletes all data points within the normalized rectangle. |
|
protected void |
drawShapes(Graphics2D g2d,
AffineTransform af)
This is the only entry point where I can savely draw my userdata and do not have to care about graphics paint attributes, as they are reset in the calling method. |
|
private boolean |
extract(Object cardkey,
String setname,
List<DataTransfer> sink)
Extracts a specific data card from a set by means of its key. |
|
protected List<DataTransfer> |
extractKeys(List<Object> keys,
String setname)
If somehow we know the list of keys we want to delete from a set, We extract them into data transfer lists here. |
|
protected List<DataTransfer> |
extractKeys(List<Object> keys,
String setname,
boolean notify)
If somehow we know the list of keys we want to delete from a set, We extract them into data transfer lists here. |
|
Map<String,Action> |
getActions()
Adds an action that can be used for saving the data in a file. |
|
Collection<DrawingInfo> |
getAnimationInfo(String stylename)
Adds the line set and the legend set, if they exist. |
|
DataCard |
getClosestData(Point2D norm,
String setname)
Returns the data card that is closest to the point in question for the given set name. |
|
DataCard |
getClosestData(Point2D norm,
String setname,
double maxnorm)
Returns the data card that is closest to the point in question for the given set name. |
|
Centerable |
getClosestDataShape(Point2D norm,
String setname,
double maxnorm)
Looks in the specified data set and returns the the closest Centerable there. |
|
|
getClosestShape(Point2D norm,
Class<T> oftype)
Overrides for searching in my special point maps, too. |
|
Collection<JDataCanvas> |
getComposingCanvases()
Returns a collection containing only this. |
|
static Map<String,String> |
getDefaultProperties()
Returns a default mapping for applications that only want to override specific settings. |
|
Collection<DataCard> |
getInsideData(Rectangle2D norm,
String setname)
Returns all data cards inside the normalized rectangle for the given set name. |
|
|
getInsideShapes(Rectangle2D norm,
Class<T> oftype)
Adds my points, if requested. |
|
JDataCanvas |
getMainCanvas()
Returns this. |
|
int |
getMaximumPoints()
Returns the number of points in the canvas. |
|
List<DataCard> |
getMeasuredData(String setname)
Returns all measures belonging to the given set name. |
|
private static VectorG |
getMinMax(List<DataCard> nvector,
boolean ad,
int index,
int erridx)
Takes a list of VectorGs and returns the maximum and minimum
found at the specified index as index 0/1. |
|
ShapeDraw |
getShapeForSet(String setname)
Returns the generic shape to a setname. |
|
private static VectorG |
getSpan(Collection<VectorG> vec2d,
boolean ad)
Takes a collection of 2d vectors and gets the minimum of x and y. |
|
Vector2D |
getSpanX()
Returns the current span of x coordinates. |
|
Vector2D |
getSpanY()
Returns the current span of y coordinates. |
|
Map<String,List<DataCard>> |
getUserData()
Returns all user data as a mapping of set names to VectorG,key-lists. |
|
void |
init()
On init, clear the data. |
|
private
|
insertInto(Map<String,List<T>> setdata,
String color,
T shape)
Adds a shape to the drawable list of objects. |
|
boolean |
isEmpty()
Returns true if all drawable objects have no entries. |
|
private
|
nearest(T one,
T two,
Point2D p)
Returns the centerable that is closer to the point. |
|
protected void |
notifyClear(Collection<String> sets)
Notifies all listeners to the set names of cleared data. |
|
private void |
notifyListeners(String setname,
DataChangeEvent dce)
Notifies all listeners to the given set name that the data has changed |
|
protected void |
notifyNew(Collection<String> sets)
Notifies all listeners to the set names of new data. |
|
protected void |
notifyOnAdd(String setname,
List<DataCard> removed)
Notifies all registered listeners of a remove of data. |
|
protected void |
notifyOnRemove(String setname,
List<DataCard> removed)
Notifies all registered listeners of a remove of data. |
|
protected void |
prepareCanvas(Graphics g)
Adds the axis labels, if given. |
|
int |
putMeasuredSet(List<? extends VectorG> points)
Sets a new list of data in the default color. |
|
int |
putMeasuredSet(String setname,
List<? extends VectorG> points,
List<Object> keys)
Sets a new list of data into the specified set. |
|
int |
putMeasuredSets(Map<String,List<? extends VectorG>> pointmap,
Map<String,List<Object>> keymap)
This methods allows setting of a bunch of user data, rescaling is only done at the very end if necessary. |
|
private boolean |
putMeasurements(String setname,
List<? extends VectorG> points,
List<Object> keys,
boolean scale)
Sets a new list of data into the specified set. |
|
private void |
putOneDataSet(String setname,
List<DataCard> all)
Puts a single data set with the given color into the drawable or fillabale map of the parent. |
|
private void |
putSinglePoint(String setname,
DataCard current,
DataCard old)
Adds a single data point to the drawable/fillable maps. |
|
void |
rebuildOneDataSet(String setname)
|
|
private boolean |
redeem(DataTransfer undel,
String setname)
Redeems a previously extracted point. |
|
protected boolean |
redeemList(List<DataTransfer> redeem,
String setname)
Reenters a list of data into the canvas without notification. |
|
void |
removeDataObserver(DataObserver eye,
String setname)
Removes the data observer from the list. |
|
void |
removeJoint(String setname)
Removes this set to our allowed joints list. |
|
private void |
rescale()
Rescales the entire data. |
|
boolean |
revertDeleted(List<DataTransfer> redeem,
String setname)
Reverts deleted data points. |
|
private static
|
scanRemove(List<T> scan,
Object key)
Scans a list of either ShapeDraws or PointDraws for the first occurence of a given key. |
|
void |
setComposedProperties(PropertyBearing prop)
Adds additional default mappings. |
|
ShapeDraw |
setShapeForSet(String setname,
ShapeDraw sd)
Replaces a generic shape, returns the old setting or null if currently unset. |
|
int |
setUserData(Map<String,List<DataCard>> apply)
Sets the entire mapping of user data to this canvas. |
|
| Methods inherited from class jview.JBoxedCanvas |
|---|
getBestDateFormat, getDefaultFormatX, getDefaultFormatY, getUserTransformation, printComponent, setUserTransformation, silentlySelectViewport, xIsDate, yIsDate |
| Methods inherited from class jview.JFrameCanvas |
|---|
calculateActiveCanvas, calculateShapeTransform, getArea, isScreenInNormalized, paintObjects, wasReshaped |
| Methods inherited from class jview.JViewportCanvas |
|---|
addAttachedViewport, addZoom, getViewport, getViewportImage, isMaximalViewport, isNormalizedOnScreen, removeAttachedViewport, resetViewport, selectArea, selectViewport, setViewportImage, transferView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jview.NormalizedCoordinates |
|---|
getArea, getNormalized, getNormalizedRect, getScreen, getScreenRect, getViewport, isNormalizedOnScreen, isScreenInNormalized |
| Field Detail |
|---|
public static final String RESCALEPROPERTY
public static final String DATALOSSPROPERTY
public static final String KEY_POLYGONSHAPE
ShapeFactory.
public static final String KEY_XERRORSHAPE
ShapeFactory.
public static final String KEY_YERRORSHAPE
ShapeFactory.
public static final String KEY_HIGHLIGHTSHAPE
public static final String KEY_YINDEX
public static final String KEY_XINDEX
public static final String KEY_YERRORINDEX
public static final String KEY_XERRORINDEX
public static final String KEY_CONNECT
public static final String KEY_JOINDATA
public static final String KEY_POINTS
public static final String KEY_YSHRINK
public static final String KEY_XSHRINK
public static final String KEY_FLIPXAXIS
public static final String KEY_FLIPYAXIS
public static final String KEY_DATALAST
public static final String KEY_SHAPESIZE
public static final String KEY_RETAINSIZE
public static final String KEY_ZEROXAXIS
public static final String KEY_ZEROYAXIS
public static final String KEY_EQUALSCALE
public static final String KEY_EQUALSTART
public static final String KEY_ERRORSHOW
public static final String KEY_ERRORINCLUDE
public static final String KEY_ERRORALWAYSRED
public static final String KEY_ERRORHAT
public static final String KEY_ERRORHATLENGTH
public static final String KEY_ERRORCOLOR
public static final String KEY_LEGEND
public static final String KEY_LEGENDMAP
public static final String KEY_LEGENDLIST
public static final String KEY_LEGENDY
public static final String KEY_LEGENDLENGTH
public static final String KEY_LEGENDGAP
public static final String KEY_LABELFONT
public static final String KEY_XAXISLABEL
public static final String KEY_YAXISLABEL
public static final String KEY_XAXISDISTANCE
public static final String KEY_YAXISDISTANCE
public static final String KEY_XUSERSPACEMIN
public static final String KEY_YUSERSPACEMIN
public static final String KEY_SAVESETS
public static final String SAVEDATA
private static final String LEGEND
private static final String LINE
private static final transient ShapeDraw DEFSHAPE
private static final transient Shape DEFXERRORSHAPE
private static final transient Shape DEFYERRORSHAPE
private static final transient Shape DEFHIGHLIGHTSHAPE
private static final int DEFXINDEX
private static final int DEFYINDEX
private static final int DEFXERRORINDEX
private static final int DEFYERRORINDEX
private static final boolean DEFCONNECT
private static final int DEFPOINTS
private static final double DEFXSHRINK
private static final double DEFYSHRINK
private static final boolean DEFFLIPXAXIS
private static final boolean DEFFLIPYAXIS
private static final double DEFSHAPESIZE
private static final boolean DEFDATALAST
private static final boolean DEFRETAINSIZE
private static final boolean DEFZEROXAXIS
private static final boolean DEFZEROYAXIS
private static final boolean DEFEQUALSCALE
private static final boolean DEFEQUALSTART
private static final boolean DEFERRORSHOW
private static final boolean DEFERRORINCLUDE
private static final boolean DEFERRORALWAYSRED
private static final DrawingInfo DEFERRORCOLOR
private static final boolean DEFERRORHAT
private static final double DEFERRORHATLENGTH
private static final double DEFLEGENDY
private static final double DEFLEGENDLENGTH
private static final double DEFLEGENDGAP
public static final double DEFXUSERSPACEMIN
public static final double DEFYUSERSPACEMIN
private static final double DEFPRINTFONTSCALE
private Map<String,List<DataCard>> userdata
private Map<String,List<DataObserver>> ogle
private Map<String,List<ShapeDraw>> datadraw
private Map<String,List<PointDraw>> pointdraw
private Map<String,List<ShapeDraw>> linedraw
private Map<String,List<ShapeDraw>> errordraw
private Map<String,List<PointDraw>> errorhats
private Map<String,VectorG> xminmax
private Map<String,VectorG> yminmax
private VectorG xspan
private VectorG yspan
private Map<String,ShapeDraw> setshapes
private List<String> joints
| Constructor Detail |
|---|
public JDataCanvas(PropertyBearing prop)
| Method Detail |
|---|
public JDataCanvas getMainCanvas()
getMainCanvas in interface DataCanvasProvidingpublic Collection<JDataCanvas> getComposingCanvases()
getComposingCanvases in interface DataCanvasProvidingpublic void init()
init in interface Initializableinit in class JBoxedCanvaspublic void setComposedProperties(PropertyBearing prop)
setComposedProperties in interface PropertyAwaresetComposedProperties in class JBoxedCanvaspublic static void addDelete(JDataCanvas jtf)
public static void addZoom(JDataCanvas jtf)
public boolean clearData()
public Vector2D getSpanX()
public Vector2D getSpanY()
public int getMaximumPoints()
public <T extends Centerable> T getClosestShape(Point2D norm,
Class<T> oftype)
getClosestShape in interface NormalizedShapesgetClosestShape in class JNormalizedCanvasnorm - The point-of-interest in normalized coordinates.
public <T extends Centerable> Collection<T> getInsideShapes(Rectangle2D norm,
Class<T> oftype)
getInsideShapes in interface NormalizedShapesgetInsideShapes in class JNormalizedCanvasnorm - The bounding rectangle in normalized coordinates.
public Centerable getClosestDataShape(Point2D norm,
String setname,
double maxnorm)
KEY_RETAINSIZE we either return a
PointDraw or a ShapeDraw object, both are also
FilledShapes and can be cast.
norm - Look around this normalized pointsetname - Only look in this setmaxnorm - If closest distance higher, return null.
public DataCard getClosestData(Point2D norm,
String setname)
public DataCard getClosestData(Point2D norm,
String setname,
double maxnorm)
public Collection<DataCard> getInsideData(Rectangle2D norm,
String setname)
public DataTransfer deleteClosest(Point2D norm,
String setname)
revertDeleted(java.util.List, java.lang.String) with the data transfer object
returned by this call.
public Collection<DrawingInfo> getAnimationInfo(String stylename)
getAnimationInfo in class JNormalizedCanvas
public List<DataTransfer> deleteInside(Rectangle2D norm,
String setname)
revertDeleted(java.util.List, java.lang.String) with the data transfer object
returned by this call. Note that it is essential to retain the order
of the transferred data points to correctly redeem them, if they are
connected.
public boolean revertDeleted(List<DataTransfer> redeem,
String setname)
protected boolean redeemList(List<DataTransfer> redeem,
String setname)
protected List<DataTransfer> extractKeys(List<Object> keys,
String setname)
protected List<DataTransfer> extractKeys(List<Object> keys,
String setname,
boolean notify)
private boolean extract(Object cardkey,
String setname,
List<DataTransfer> sink)
DataCards belonging to the specified set is searched for
the ID and this entry is deletedDataCard, the appropriate entry
in the datadraw or pointdraw map is deleted.DataTransfer
object collects all necessary information and is put into the provided
sink.
private boolean redeem(DataTransfer undel,
String setname)
private static <T extends FilledShape> T scanRemove(List<T> scan,
Object key)
private <T extends Centerable> T nearest(T one,
T two,
Point2D p)
public void addDataObserver(DataObserver eye,
String setname)
public void removeDataObserver(DataObserver eye,
String setname)
public int addMeasure(VectorG point)
public int addMeasure(String setname,
VectorG onepoint,
Object key)
public int putMeasuredSet(List<? extends VectorG> points)
public int putMeasuredSet(String setname,
List<? extends VectorG> points,
List<Object> keys)
public int putMeasuredSets(Map<String,List<? extends VectorG>> pointmap,
Map<String,List<Object>> keymap)
private boolean putMeasurements(String setname,
List<? extends VectorG> points,
List<Object> keys,
boolean scale)
public Object addDrawingInfo(String stylename,
DrawingInfo color)
addDrawingInfo in class JNormalizedCanvaspublic List<DataCard> getMeasuredData(String setname)
public Map<String,List<DataCard>> getUserData()
public int setUserData(Map<String,List<DataCard>> apply)
public ShapeDraw getShapeForSet(String setname)
public ShapeDraw setShapeForSet(String setname,
ShapeDraw sd)
public void addJoint(String setname)
public void removeJoint(String setname)
public boolean isEmpty()
isEmpty in class JNormalizedCanvasprotected void prepareCanvas(Graphics g)
prepareCanvas in class JBoxedCanvas
protected void drawShapes(Graphics2D g2d,
AffineTransform af)
drawShapes in class JNormalizedCanvasprivate void rescale()
xspan and yspan
Vectors must be up-to-date. From these tables, we get the overall
scaling of the component. We calculate the user-space transformation
and update the ticks/labels along with all data points.
public void rebuildOneDataSet(String setname)
private void putOneDataSet(String setname,
List<DataCard> all)
private int addLineData(String color,
ShapeDraw shape)
private int addErrorData(String color,
ShapeDraw shape)
private int addErrorHat(String color,
PointDraw shape)
private int addDrawData(String color,
ShapeDraw shape)
private int addPointData(String color,
PointDraw shape)
private <T> int insertInto(Map<String,List<T>> setdata,
String color,
T shape)
private void putSinglePoint(String setname,
DataCard current,
DataCard old)
protected void notifyOnRemove(String setname,
List<DataCard> removed)
protected void notifyOnAdd(String setname,
List<DataCard> removed)
protected void notifyNew(Collection<String> sets)
protected void notifyClear(Collection<String> sets)
private void notifyListeners(String setname,
DataChangeEvent dce)
private ShapeDraw createNormalShape(CoordinateTransforming xy,
DataCard point,
double scalex,
double scaley,
Shape generic,
boolean filled)
private PointDraw createNormalPoint(CoordinateTransforming xy,
DataCard point,
double scalex,
double scaley,
Shape generic,
boolean filled)
private ShapeDraw createLine(CoordinateTransforming xy,
DataCard p1,
DataCard p2)
private static final VectorG getMinMax(List<DataCard> nvector,
boolean ad,
int index,
int erridx)
VectorGs and returns the maximum and minimum
found at the specified index as index 0/1. If an error index is given,
the error on that min/max place is also recorded on indices 2 and 3.
private static final VectorG getSpan(Collection<VectorG> vec2d,
boolean ad)
public Map<String,Action> getActions()
getActions in class JNormalizedCanvaspublic static Map<String,String> getDefaultProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||