|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PlotPrimitive
PlotPrimitive provides a generic interfrace to objects on the screen and their linkage to cases. A subclass of BaseCanvas
is free to use its own implementation (for example optimized for speed). Default methods of BaseCanvas
use an array of PlotPrimitives to display graphical objects and map them into cases of the underlying dataset. The mapping can be 1:1 (see scatterplot), 1:n (see histograms), m:1 (see maps) or m:n (see faceplots). Please note that PlotPrimitives are geometric objects, that is their position is specified in geometry coorditates (for speed).
Since 10/2003 PlotPrimitive is just an interface. Basic linking capabilities are implemented by the PPrimBase class, real graphical representations are provided by its subclasses PPrimRectangle and PPrimPolygon.
Method Summary | |
---|---|
int |
cases()
returns the number of cases this primitive represents |
boolean |
contains(int x,
int y)
checks whether the PlotPrimitive contains (or in case of a point primitive equals to) the given point. |
int[] |
getCaseIDs()
returns the IDs of all cases represented by this primitive. |
java.awt.Color |
getColor()
returns the main color of the primitive (this is usually the fill color for primitives that have both fill and draw colors |
double |
getMarkedProportion(SMarker m,
int mark)
calculates the proportion of cases with the given mark in relation to total population of cases represented by this PlotPrimitive. |
int |
getPrimaryCase()
returns the case ID for 1:1 (or m:1) relationships |
boolean |
hilitcontains(int x,
int y)
|
boolean |
intersects(java.awt.Rectangle rt)
checks whether the PlotPrimitive intersects (or is contained) in the given rectangle. |
boolean |
isPerformingAlphaBlending()
|
boolean |
isQueryable()
returns whether this primitive should respond to queries. |
boolean |
isVisible()
returns whether this primitive is visible |
void |
paint(PoGraSS g,
int orientation,
SMarker m)
paint the primitive (w/o selection) |
void |
paintSelected(PoGraSS g,
int orientation,
SMarker m)
paint the selection |
boolean |
representsCase(int cid)
checks whether the specified case is represented by this primitive. |
void |
setMark(SMarker m,
boolean setTo)
sets mark for cases represented by this PlotPrimitive in following fashion: if the case is already marked then its mark is set to setTo, otherwise the mark is set to 1. |
void |
setVisible(boolean b)
sets visibility of this primitive |
Method Detail |
---|
boolean contains(int x, int y)
boolean hilitcontains(int x, int y)
boolean intersects(java.awt.Rectangle rt)
java.awt.Color getColor()
void paint(PoGraSS g, int orientation, SMarker m)
void paintSelected(PoGraSS g, int orientation, SMarker m)
void setMark(SMarker m, boolean setTo)
double getMarkedProportion(SMarker m, int mark)
int[] getCaseIDs()
null
is valid and means that this primitive represents no data
int getPrimaryCase()
boolean representsCase(int cid)
cid
- case ID to check for
true
if the case is represented by this primitiveint cases()
boolean isQueryable()
void setVisible(boolean b)
boolean isVisible()
boolean isPerformingAlphaBlending()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |