Package schule.ngb.zm.shapes.charts
Class BarChart
java.lang.Object
schule.ngb.zm.Constants
schule.ngb.zm.BasicDrawable
schule.ngb.zm.shapes.Shape
schule.ngb.zm.shapes.Rectangle
schule.ngb.zm.shapes.charts.BarChart
- All Implemented Interfaces:
Drawable
,Fillable
,Strokeable
-
Field Summary
Modifier and TypeFieldDescriptionprotected HashMap<ChartValue,
Color> static String
protected boolean
protected boolean
protected boolean
protected double
protected ArrayList<ChartValue>
protected boolean
Fields inherited from class schule.ngb.zm.BasicDrawable
fill, fillColor, stroke, strokeColor, strokeJoin, strokeType, strokeWeight, visible
Fields inherited from class schule.ngb.zm.Constants
APP_NAME, APP_VERSION, APP_VERSION_MAJ, APP_VERSION_MIN, APP_VERSION_REV, ARROW, BEVEL, BLACK, BLUE, BOLD, BROWN, canvasHeight, canvasWidth, CENTER, CLOSED, cmouseX, cmouseY, CROSS, CYAN, DARKGRAY, DASHED, DEFAULT_ANIM_RUNTIME, DEFAULT_BACKGROUND, DEFAULT_BUFFER, DEFAULT_EASING, DEFAULT_FILLCOLOR, DEFAULT_FONTSIZE, DEFAULT_FPS, DEFAULT_HEIGHT, DEFAULT_STROKECOLOR, DEFAULT_STROKEWEIGHT, DEFAULT_WIDTH, delta, DOTTED, DOWN, DOWNLEFT, DOWNRIGHT, EAST, FILLED, framesPerSecond, GRAY, GREEN, HALF_PI, HAND, ITALIC, key, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_A, KEY_ALT, KEY_B, KEY_BACK_SPACE, KEY_C, KEY_CANCEL, KEY_CAPS_LOCK, KEY_CLEAR, KEY_COMMA, KEY_CONTROL, KEY_D, KEY_DOWN, KEY_E, KEY_END, KEY_ENTER, KEY_EQUALS, KEY_ESCAPE, KEY_F, KEY_G, KEY_H, KEY_HOME, KEY_I, KEY_J, KEY_K, KEY_L, KEY_LEFT, KEY_M, KEY_MINUS, KEY_N, KEY_O, KEY_P, KEY_PAGE_DOWN, KEY_PAGE_UP, KEY_PAUSE, KEY_PERIOD, KEY_Q, KEY_R, KEY_RIGHT, KEY_S, KEY_SEMICOLON, KEY_SHIFT, KEY_SLASH, KEY_SPACE, KEY_T, KEY_TAB, KEY_U, KEY_UP, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, keyCode, keyEvent, keyPressed, LEFT, LIGHTGRAY, LINES, LINUX, MACOS, MAGENTA, MIDDLE, MITER, MOUSE1, MOUSE2, MOUSE3, mouseButton, mouseEvent, mousePressed, mouseX, mouseY, MOVE, NOMOUSE, NORTH, NORTHEAST, NORTHWEST, OPEN, ORANGE, PI, PIE, PINK, PLAIN, pmouseX, pmouseY, PURPLE, QUARTER_PI, RED, RIGHT, ROUND, runtime, screenHeight, screenWidth, SOLID, SOUTH, SOUTHEAST, SOUTHWEST, TEXT, tick, TWO_PI, UP, UPLEFT, UPRIGHT, WAIT, WEST, WHITE, WINDOWS, YELLOW
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValue
(double pValue) void
void
void
addValue
(ChartValue pValue) void
addValues
(double[] pValues) void
addValues
(Collection<ChartValue> pValues) void
addValues
(ChartValue[] pValues) boolean
containsValue
(ChartValue pValue) void
draw
(Graphics2D graphics, AffineTransform transform) Zeichnet die Form, aber wendet zuvor noch eine zusätzliche Transformations- matrix an.getColor
(int i) Color[]
getLabel
(int i) String[]
double
getMax()
double
getValue
(int i) double[]
boolean
boolean
boolean
boolean
void
removeValue
(int i) void
removeValue
(ChartValue pValue) void
removeValues
(Collection<ChartValue> pValues) void
removeValues
(ChartValue[] pValues) void
void
void
setInverted
(boolean pInverted) void
void
void
setLabelsInline
(boolean pLabelsInline) void
setLabelsVisible
(boolean pLabels) void
setMax
(double pMax) void
setValue
(int i, double pValue) void
setVertical
(boolean pPillars) Methods inherited from class schule.ngb.zm.shapes.Rectangle
copy, copyFrom, equals, getHeight, getShape, getWidth, scale, setHeight, setWidth, toString
Methods inherited from class schule.ngb.zm.shapes.Shape
alignTo, alignTo, alignTo, alignTo, draw, fillShape, getAbsAnchorPoint, getAnchor, getAnchorPoint, getAnchorPoint, getBounds, getRotation, getScale, getTransform, getX, getY, move, moveTo, moveTo, moveTo, moveTo, nextTo, nextTo, rotate, rotate, rotate, rotateTo, scaleBy, setAnchor, setGradient, setGradient, setX, setY, strokeShape
Methods inherited from class schule.ngb.zm.BasicDrawable
getFill, getFillColor, getGradient, getStroke, getStrokeColor, getStrokeJoin, getStrokeType, getStrokeWeight, hasFillColor, hasGradient, hide, isVisible, setFill, setFillColor, setStroke, setStrokeColor, setStrokeJoin, setStrokeType, setStrokeWeight, show, toggle
Methods inherited from class schule.ngb.zm.Constants
abs, arccos, arcsin, arctan, asBool, asBool, asBool, asBool, asBool, asBool, asBool, asBool, asBool, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asDouble, asInt, asInt, asInt, asInt, asInt, asInt, asInt, asInt, asInt, avg, binary, ceil, choice, choice, choice, choice, color, color, color, color, colorHsb, colorHsl, cos, degrees, distance, floor, fromBinary, fromHex, getRandom, hex, interpolate, limit, limit, loadImage, map, max, max, min, min, morph, noise, noise, noise, noise, pow, radians, random, random, random, random, random, randomBool, randomBool, randomBool, randomColor, randomGaussian, randomNiceColor, round, setSeed, shuffle, shuffle, shuffle, shuffle, sign, sin, sqrt, sum, tan
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface schule.ngb.zm.Fillable
hasFill, noFill, noGradient, resetFill, setFillColor, setFillColor, setFillColor, setFillColor, setFillColor, setGradient, setGradient
Methods inherited from interface schule.ngb.zm.Strokeable
hasStroke, noStroke, resetStroke, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeColor
-
Field Details
-
DEFAULT_LABEL
-
values
-
colorMap
-
max
protected double max -
vertical
protected boolean vertical -
inverted
protected boolean inverted -
labels
protected boolean labels -
labelsInline
protected boolean labelsInline
-
-
Constructor Details
-
BarChart
public BarChart(double x, double y, double width, double height) -
BarChart
public BarChart(double x, double y, double width, double height, double max) -
BarChart
public BarChart(double x, double y, double width, double height, double max, double[] pValues)
-
-
Method Details
-
isVertical
public boolean isVertical() -
setVertical
public void setVertical(boolean pPillars) -
isInverted
public boolean isInverted() -
setInverted
public void setInverted(boolean pInverted) -
isLabelsVisible
public boolean isLabelsVisible() -
setLabelsVisible
public void setLabelsVisible(boolean pLabels) -
isLabelsInline
public boolean isLabelsInline() -
setLabelsInline
public void setLabelsInline(boolean pLabelsInline) -
getMax
public double getMax() -
setMax
public void setMax(double pMax) -
getChartValues
-
getValues
public double[] getValues() -
addValue
public void addValue(double pValue) -
addValue
-
addValue
-
addValue
-
addValues
public void addValues(double[] pValues) -
addValues
-
addValues
-
removeValue
public void removeValue(int i) -
removeValue
-
removeValues
-
removeValues
-
getValue
public double getValue(int i) -
setValue
public void setValue(int i, double pValue) -
containsValue
-
getLabels
-
getLabel
-
setLabel
-
setLabels
-
getColors
-
setColors
-
getColor
-
setColor
-
draw
Description copied from class:Shape
Zeichnet die Form, aber wendet zuvor noch eine zusätzliche Transformations- matrix an. Wird u.A. von derShapeGroup
verwendet.
-