|
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 javax.swing.JPanel com.jidesoft.chart.axis.AxisComponent
public class AxisComponent
A visual axis component that can used independently from, but in conjunction with, a Chart. Most importantly, it can be used as one of the border components of a JScrollPane, so that the axis does not scroll but the chart pane does.
Note This class is in 'beta' release and is subject to change.
Instances of this class can currently only be used as a y axis, but this will change soon!
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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 |
PROPERTY_AXIS
|
static String |
PROPERTY_CHART
|
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 | |
---|---|
AxisComponent()
Zero argument constructor provided for Java bean compatibility |
|
AxisComponent(Chart chart,
Axis axis)
|
Method Summary | |
---|---|
protected void |
drawStringIfWithinBounds(Graphics g,
String s,
int x,
int y)
Paints a string but only if the whole of the string will be visible according to the bounds of the component |
Axis |
getAxis()
Returns the axis associated with this visual component |
Chart |
getChart()
|
Orientation |
getOrientation()
Returns the orientation of the axis component; that is, either horizontal or vertical |
void |
paintComponent(Graphics g)
|
void |
setAxis(Axis axis)
Specify the axis for which this is a visual representation |
void |
setChart(Chart chart)
Specify the chart with which this axis component is associated. |
void |
setOrientation(Orientation orientation)
Specify the orientation of the axis component |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_AXIS
public static final String PROPERTY_CHART
Constructor Detail |
---|
public AxisComponent()
public AxisComponent(Chart chart, Axis axis)
Method Detail |
---|
public Axis getAxis()
public void setAxis(Axis axis)
axis
- the associated axis classpublic Chart getChart()
public void setChart(Chart chart)
chart
- the Chart with which to associate this axis componentpublic Orientation getOrientation()
horizontal
or vertical
public void setOrientation(Orientation orientation)
orientation
- the orientation of the axis componentpublic void paintComponent(Graphics g)
paintComponent
in class JComponent
protected void drawStringIfWithinBounds(Graphics g, String s, int x, int y)
g
- the Graphics
contexts
- the string to drawx
- the bottom left x coordinate of the drawn stringy
- the bottom left y coordinate of the drawn string
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |