|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.jidesoft.gauge.AbstractGauge<BulletAxis> com.jidesoft.gauge.Bullet
public class Bullet
A Bullet Chart class
Nested Class Summary |
---|
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 | |
---|---|
static String |
DEFAULT_INDICATOR_NAME
|
static int |
INDICATOR_Z_ORDER
Any Drawables with a Z order less than this value will be painted before the indicators; any Drawables with a Z order greater than this value will be painted after the indicators. |
static String |
PROPERTY_BULLET_BACKGROUND
|
static String |
PROPERTY_BULLET_FOREGROUND
|
Fields inherited from class com.jidesoft.gauge.AbstractGauge |
---|
DEFAULT_NEEDLE_NAME, PROPERTY_BACKGROUND_PAINT, PROPERTY_RESIZE_FONTS |
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 | |
---|---|
Bullet()
|
|
Bullet(Dimension d)
|
Method Summary | |
---|---|
void |
addAxis(BulletAxis axis)
Add the specified axis to the Bullet. |
void |
addDrawable(Drawable drawable)
Adds a Drawable object to the dial |
Bullet |
addIndicator(String indicatorName,
IndicatorStyle style)
You can clear an individual style by setting it to null. |
protected double |
calculatePixelCoordinate(BulletAxis axis,
double value)
|
protected Point2D |
calculatePixelPoint2D(BulletAxis axis,
double value)
|
List<String> |
containingShapes(Point p)
Discovers the values that were rendered at the supplied pixel location |
BulletAxis |
getAxis()
Returns the axis for the Bullet. |
double |
getBreadthProportion()
Returns the breadth of the bullet as a proportion of its length |
Paint |
getBulletBackground()
Returns the background paint to use for the bullet area |
Border |
getBulletBorder()
returns the Border that is used for the bullet area |
double |
getBulletBreadth()
Returns the breadth of the bullet in pixels |
IndicatorStyle |
getIndicatorStyle(String indicatorName)
|
double |
getMidX()
midX is the x coordinate at the centre of the bullet part of the display (ie. |
double |
getMidY()
midY is the y coordinate at the centre of the bullet part of the display (ie. |
Orientation |
getOrientation()
Returns the orientation of the Bullet (horizontal or vertical) |
Insets2D |
getProportionalInsets()
Returns the current proportional insets |
IndicatorRenderer |
getRenderer()
Returns the default indicator renderer (used when no value-specific renderer is defined) |
IndicatorRenderer |
getRenderer(String valueName)
Returns the renderer specified for the given value tag |
int |
getXEnd()
|
int |
getXStart()
|
int |
getYEnd()
yEnd is the y coordinate at the top of the component after taking account of any border inset |
int |
getYStart()
yStart is the y coordinate at the bottom of the component after taking account of any border inset |
protected void |
paintAxis(Graphics2D g,
BulletAxis axis)
|
protected Rectangle2D |
paintBulletBackground(Graphics2D g2d)
|
protected void |
paintBulletBorder(Graphics2D g2d)
|
protected void |
paintComponent(Graphics g)
|
void |
removeDrawable(Drawable drawable)
Removes the specified Drawable from the dial |
void |
removeDrawables()
Removes all Drawables from the dial |
void |
removeIndicator(String indicatorName)
|
void |
removeIndicators()
|
void |
removeStyles()
|
Shape |
renderedAs(String valueName)
Returns the shape that was rendered for the supplied value |
void |
setAxis(BulletAxis axis)
Set the axis for the bullet. |
void |
setBreadthProportion(double breadthProportion)
Set the breadth of the bullet as a proportion of its length; by default 0.1 |
void |
setBulletBackground(Paint bulletBackground)
Specify the background paint to use for the bullet area |
void |
setBulletBorder(Border bulletBorder)
Specify the Border to use for the bullet area |
void |
setIndicatorStyle(IndicatorStyle style)
Sets the style for the default value. |
void |
setIndicatorStyle(String indicatorName,
IndicatorStyle style)
You can clear an individual style by setting it to null. |
void |
setOrientation(Orientation orientation)
Specify the orientation of the bullet |
void |
setProportionalInsets(Insets2D insets2D)
Specify proportional insets that improve scalability of the component |
void |
setRenderer(IndicatorRenderer renderer)
Specify the default IndicatorRenderer |
void |
setRenderer(String valueName,
IndicatorRenderer renderer)
Specify the renderer for the given value tag |
void |
setValue(String indicatorName,
Positionable pos,
boolean fireUpdate)
Set the value of the specified indicator on the primary axis |
void |
update()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jidesoft.chart.ResizableComponent |
---|
addComponentListener |
Field Detail |
---|
public static final int INDICATOR_Z_ORDER
public static final String DEFAULT_INDICATOR_NAME
public static final String PROPERTY_BULLET_FOREGROUND
public static final String PROPERTY_BULLET_BACKGROUND
Constructor Detail |
---|
public Bullet()
public Bullet(Dimension d)
Method Detail |
---|
public BulletAxis getAxis()
public void setAxis(BulletAxis axis)
axis
- the axis to set for the bullet.public void addAxis(BulletAxis axis)
axis
- the axis to add to the bullet.public Insets2D getProportionalInsets()
public void setProportionalInsets(Insets2D insets2D)
insets2D
- the insetspublic Orientation getOrientation()
public void setOrientation(Orientation orientation)
orientation
- the orientation of the bullet chart (horizontal or vertical)public IndicatorRenderer getRenderer()
public void setRenderer(IndicatorRenderer renderer)
renderer
- the renderer that will be used unless a value-specific one is setpublic IndicatorRenderer getRenderer(String valueName)
valueName
- the name of the value
public void setRenderer(String valueName, IndicatorRenderer renderer)
valueName
- the name of the valuerenderer
- the renderer to use for the valuepublic void addDrawable(Drawable drawable)
drawable
- the Drawable to addDialIntervalMarker
,
DialLabel
public void removeDrawable(Drawable drawable)
drawable
- the drawable to removepublic void removeDrawables()
public Paint getBulletBackground()
public void setBulletBackground(Paint bulletBackground)
bulletBackground
- the background to use for the bullet areapublic Border getBulletBorder()
public void setBulletBorder(Border bulletBorder)
bulletBorder
- the Border to use for the bullet areapublic Shape renderedAs(String valueName)
valueName
- the name of the value in which we are interested
public List<String> containingShapes(Point p)
p
- the pixel location of interest (usually the cursor position)
public int getXEnd()
public int getXStart()
public int getYEnd()
public int getYStart()
public double getMidY()
public double getMidX()
public void setValue(String indicatorName, Positionable pos, boolean fireUpdate)
setValue
in class AbstractGauge<BulletAxis>
indicatorName
- the indicator whose value we are settingpos
- a Positionable object that carries the value of the indicator (and possibly other information
too)fireUpdate
- specify whether an update event should be fired on the modelpublic Bullet addIndicator(String indicatorName, IndicatorStyle style)
indicatorName
- the name of the value for which the style is being specifiedstyle
- the style to assign to the value renderingpublic void removeIndicator(String indicatorName)
public void removeIndicators()
public void setIndicatorStyle(IndicatorStyle style)
style
- the style for the default bullet valuepublic void setIndicatorStyle(String indicatorName, IndicatorStyle style)
indicatorName
- the name of the value for which the style is being specifiedstyle
- the style to assign to the value renderingpublic IndicatorStyle getIndicatorStyle(String indicatorName)
public void removeStyles()
protected double calculatePixelCoordinate(BulletAxis axis, double value)
protected Point2D calculatePixelPoint2D(BulletAxis axis, double value)
calculatePixelPoint2D
in class AbstractGauge<BulletAxis>
public void update()
public double getBulletBreadth()
public double getBreadthProportion()
public void setBreadthProportion(double breadthProportion)
breadthProportion
- the breadth of the bullet as a proportion of its lengthprotected void paintComponent(Graphics g)
paintComponent
in class JComponent
protected Rectangle2D paintBulletBackground(Graphics2D g2d)
protected void paintBulletBorder(Graphics2D g2d)
protected void paintAxis(Graphics2D g, BulletAxis axis)
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |