|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.ibase.toolkit.PPrimBase
public abstract class PPrimBase
Very basic plot primitive without any graphical representation, but with case handling. This abstract class can be used as a base for any plot primitives that use ID reference lists. Methods concerning graphical representation (paint..., contains, intersects) are left abstract.
Field Summary | |
---|---|
java.awt.Color |
borderColor
|
java.awt.Color |
borderColorSel
|
java.awt.Color |
col
Deprecated. Should be removed as it isn't used anymore. Left here for compatibility reasons. |
java.awt.Color |
COL_OUTLINE
|
protected boolean |
dragging
|
java.awt.Color |
fillColor
|
java.awt.Color |
fillColorDrag
|
java.awt.Color |
fillColorSel
|
boolean |
performAlphaBlending
|
boolean |
queryable
whether this primitive can be queried |
int[] |
ref
references (IDs) to cases represented by this primitive |
protected boolean |
visible
|
Constructor Summary | |
---|---|
PPrimBase()
|
Method Summary | |
---|---|
int |
cases()
returns the number of cases this primitive represents |
int[] |
getCaseIDs()
returns the IDs of all cases represented by this primitive. |
java.awt.Color |
getColor()
returns the main color of the primitive |
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. |
double |
getMarkedProportion(SMarker m,
int mark,
boolean dropPrimary)
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 |
protected int |
getPropSize(int totalSize,
double proportion)
|
protected double |
getRelativeMarkedProportion(SMarker m,
int mark)
|
boolean |
hilitcontains(int x,
int y)
|
boolean |
isDragging()
|
boolean |
isPerformingAlphaBlending()
|
boolean |
isQueryable()
returns whether this primitive should respond to queries. |
boolean |
isVisible()
returns whether this primitive is visible |
void |
move(int x,
int y)
|
void |
moveX(int x)
|
void |
moveY(int y)
|
boolean |
representsCase(int cid)
checks whether the specified case is represented by this primitive. |
void |
setCaseIDs(double[] r)
|
void |
setCaseIDs(int[] r)
|
void |
setDragging(boolean b)
|
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 true. |
void |
setVisible(boolean b)
sets visibility of this primitive |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.rosuda.ibase.toolkit.PlotPrimitive |
---|
contains, intersects, paint, paintSelected |
Field Detail |
---|
public java.awt.Color col
public java.awt.Color COL_OUTLINE
public int[] ref
protected boolean visible
protected boolean dragging
public boolean queryable
public java.awt.Color fillColor
public java.awt.Color borderColor
public java.awt.Color fillColorSel
public java.awt.Color borderColorSel
public java.awt.Color fillColorDrag
public boolean performAlphaBlending
Constructor Detail |
---|
public PPrimBase()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int[] getCaseIDs()
PlotPrimitive
null
is valid and means that this primitive represents no data
getCaseIDs
in interface PlotPrimitive
public void setCaseIDs(int[] r)
public void setCaseIDs(double[] r)
public int getPrimaryCase()
PlotPrimitive
getPrimaryCase
in interface PlotPrimitive
public boolean representsCase(int cid)
PlotPrimitive
representsCase
in interface PlotPrimitive
cid
- case ID to check for
true
if the case is represented by this primitivepublic int cases()
PlotPrimitive
cases
in interface PlotPrimitive
public void setMark(SMarker m, boolean setTo)
setMark
in interface PlotPrimitive
public double getMarkedProportion(SMarker m, int mark)
PlotPrimitive
getMarkedProportion
in interface PlotPrimitive
public double getMarkedProportion(SMarker m, int mark, boolean dropPrimary)
public java.awt.Color getColor()
getColor
in interface PlotPrimitive
public boolean isQueryable()
PlotPrimitive
isQueryable
in interface PlotPrimitive
protected double getRelativeMarkedProportion(SMarker m, int mark)
protected int getPropSize(int totalSize, double proportion)
public void setVisible(boolean b)
PlotPrimitive
setVisible
in interface PlotPrimitive
public boolean isVisible()
PlotPrimitive
isVisible
in interface PlotPrimitive
public void setDragging(boolean b)
public boolean isDragging()
public void move(int x, int y)
public void moveX(int x)
public void moveY(int y)
public boolean hilitcontains(int x, int y)
hilitcontains
in interface PlotPrimitive
public boolean isPerformingAlphaBlending()
isPerformingAlphaBlending
in interface PlotPrimitive
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |