|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolo.PNode
at.tuwien.ifs.somtoolbox.apps.viewer.PieChartPNode
public class PieChartPNode
Wrapper for displaying a pie chart within the Piccolo zooming interface framework.
Nested Class Summary | |
---|---|
private class |
PieChartPNode.CountLabeler
|
private class |
PieChartPNode.PercentageLabeler
|
static class |
PieChartPNode.PieChartLabelMode
|
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode |
---|
edu.umd.cs.piccolo.PNode.PSceneGraphDelegate |
Field Summary | |
---|---|
private Rectangle2D |
border
|
private PieChartPNode.CountLabeler |
countLabeler
|
private double |
height
|
private int |
itemCount
|
private PieChartPNode.PercentageLabeler |
percentageLabeler
|
private org.jfree.chart.plot.PiePlot |
plot
|
private static long |
serialVersionUID
|
private int[] |
values
|
private double |
width
|
private double |
X
|
private double |
Y
|
Fields inherited from class edu.umd.cs.piccolo.PNode |
---|
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
PieChartPNode(double x,
double y,
double w,
double h,
int[] values,
int itemCount)
Creates a PieChartPNode at the given coordinates with the given values. |
Method Summary | |
---|---|
static org.jfree.chart.plot.PiePlot |
createPiechartPlot(int[] values)
Creates a piechart from the given count values |
static void |
drawPlot(Graphics2D g2d,
int[] values,
Color[] colors,
double x,
double y,
double width,
double height)
Draw pie-charts on the given Graphics2D object, with the provided values and colours, and unit width. |
Color |
getLegendColor(int index)
Returns the colour used in the diagram at the specified index. |
Color[] |
getLegendColors()
Returns the colors used in the diagram. |
org.jfree.util.PaintList |
getPaintList()
|
int[] |
getValues()
|
protected void |
paint(edu.umd.cs.piccolo.util.PPaintContext paintContext)
|
boolean |
setBounds(double x,
double y,
double width,
double height)
|
void |
setColor(int index,
Color color)
|
void |
setColors(Color[] colors)
|
void |
setShowLegend(PieChartPNode.PieChartLabelMode mode)
|
Methods inherited from class edu.umd.cs.piccolo.PNode |
---|
addActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientProperty, getClientPropertyKeysEnumeration, getClientPropertyKeysIterator, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, internalUpdateBounds, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, paintAfterChildren, paramString, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaint |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private int[] values
private int itemCount
private org.jfree.chart.plot.PiePlot plot
private Rectangle2D border
private double X
private double Y
private double width
private double height
private final PieChartPNode.CountLabeler countLabeler
private final PieChartPNode.PercentageLabeler percentageLabeler
Constructor Detail |
---|
public PieChartPNode(double x, double y, double w, double h, int[] values, int itemCount)
x
- X coordinate of the chart.y
- Y coordinate of the chart.values
- Array of double
containing the values.Method Detail |
---|
public static org.jfree.chart.plot.PiePlot createPiechartPlot(int[] values)
public static void drawPlot(Graphics2D g2d, int[] values, Color[] colors, double x, double y, double width, double height)
Graphics2D
object, with the provided values and colours, and unit width.
Used when exporting pie charts as stand-alone image, or for superimposing them on an exported visualisation.
public boolean setBounds(double x, double y, double width, double height)
setBounds
in class edu.umd.cs.piccolo.PNode
protected void paint(edu.umd.cs.piccolo.util.PPaintContext paintContext)
paint
in class edu.umd.cs.piccolo.PNode
public Color[] getLegendColors()
Color
.public org.jfree.util.PaintList getPaintList()
public Color getLegendColor(int index)
public void setColor(int index, Color color)
public void setColors(Color[] colors)
public int[] getValues()
public void setShowLegend(PieChartPNode.PieChartLabelMode mode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |