|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jscience.chemistry.vapor.util.chart.Chart
public class Chart
Basic X-Y Plot charting tool.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
AXIS_BOTTOM
DOCUMENT ME! |
static int |
AXIS_LEFT
DOCUMENT ME! |
static int |
AXIS_NONE
DOCUMENT ME! |
static int |
AXIS_RIGHT
DOCUMENT ME! |
static int |
AXIS_TOP
DOCUMENT ME! |
static int |
HALIGN_CENTER
DOCUMENT ME! |
static int |
HALIGN_LEFT
DOCUMENT ME! |
static int |
HALIGN_RIGHT
DOCUMENT ME! |
static int |
VALIGN_ABOVE
DOCUMENT ME! |
static int |
VALIGN_BELOW
DOCUMENT ME! |
static int |
VALIGN_MIDDLE
DOCUMENT ME! |
| 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 | |
|---|---|
Chart()
Default Constructor. |
|
| Method Summary | |
|---|---|
void |
addDataset(Dataset dataset)
Adds the given dataset to the current list of datasets |
java.awt.Color |
getAxisLabelColor()
Returns the Axes label color |
java.awt.Font |
getAxisLabelFont()
Returns the Axes label font |
java.awt.Color |
getBGColor()
Returns the current background color |
java.awt.Color |
getBorderColor()
Returns the current border color |
java.awt.image.BufferedImage |
getChartImage()
Returns a buffered image of the current chart. |
java.util.ArrayList |
getDatasets()
Returns the current list of datasets |
java.lang.String |
getSubTitle()
Returns the sub-title text |
java.awt.Color |
getSubTitleColor()
Returns the sub-title font color |
java.awt.Font |
getSubTitleFont()
Returns the sub-title font |
java.lang.String |
getTitle()
Returns the main title text |
java.awt.Color |
getTitleColor()
Returns the main title font color |
java.awt.Font |
getTitleFont()
Returns the main title font |
java.lang.String |
getXAxisLabel()
Returns the X-Axis label text |
double |
getXGridSpacing()
Returns the grid spacing for X-Axis. |
java.lang.String |
getYAxisLabel()
Returns the Y-Axis label text |
double |
getYGridSpacing()
Returns the grid spacing for Y-Axis. |
void |
hilitePoint(java.awt.geom.Point2D.Double point,
int xAxis,
int yAxis)
Highlights the given point by means of adding dashed line projections on the given axes. |
boolean |
isAutoXGridSpacing()
Returns whether grid spacing for X-Axis is automatic. |
boolean |
isAutoYGridSpacing()
Returns whether grid spacing for Y-Axis is automatic. |
boolean |
isShowGrid()
Returns whether grid is displayed. |
void |
setAutoXGridSpacing(boolean autoXSpacing)
Sets automatic grid spacing for X-Axis |
void |
setAutoYGridSpacing(boolean autoYSpacing)
Sets automatic grid spacing for Y-Axis |
void |
setAxisLabelColor(java.awt.Color axisLabelColor)
Sets the Axes label color |
void |
setAxisLabelFont(java.awt.Font axisLabelFont)
Sets the Axes label font |
void |
setBGColor(java.awt.Color bgColor)
Sets the current background color |
void |
setBorderColor(java.awt.Color borderColor)
Sets the current border color |
void |
setShowGrid(boolean showGrid)
Sets whether grid is displayed. |
void |
setSubTitle(java.lang.String subTitle)
Sets the sub-title text |
void |
setSubTitleColor(java.awt.Color subTitleColor)
Sets the sub-title font color |
void |
setSubTitleFont(java.awt.Font subTitleFont)
Sets the sub-title font |
void |
setTitle(java.lang.String title)
Sets the main title text |
void |
setTitleColor(java.awt.Color titleColor)
Sets the main title font color |
void |
setTitleFont(java.awt.Font titleFont)
Sets the main title font |
void |
setXAxisLabel(java.lang.String xLabel)
Sets the X-Axis label text |
void |
setXGridSpacing(double xSpacing)
Sets the grid spacing for X-Axis. |
void |
setYAxisLabel(java.lang.String yLabel)
Sets the Y-Axis label text |
void |
setYGridSpacing(double ySpacing)
Sets the grid spacing for Y-Axis. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int AXIS_TOP
public static final int AXIS_BOTTOM
public static final int AXIS_LEFT
public static final int AXIS_RIGHT
public static final int AXIS_NONE
public static final int VALIGN_ABOVE
public static final int VALIGN_MIDDLE
public static final int VALIGN_BELOW
public static final int HALIGN_LEFT
public static final int HALIGN_CENTER
public static final int HALIGN_RIGHT
| Constructor Detail |
|---|
public Chart()
| Method Detail |
|---|
public boolean isShowGrid()
public void setShowGrid(boolean showGrid)
showGrid - public boolean isAutoXGridSpacing()
public void setAutoXGridSpacing(boolean autoXSpacing)
autoXSpacing - public boolean isAutoYGridSpacing()
public void setAutoYGridSpacing(boolean autoYSpacing)
autoYSpacing - public double getXGridSpacing()
public void setXGridSpacing(double xSpacing)
xSpacing - public double getYGridSpacing()
public void setYGridSpacing(double ySpacing)
ySpacing - public java.awt.Color getBGColor()
public void setBGColor(java.awt.Color bgColor)
bgColor - public java.awt.Color getBorderColor()
public void setBorderColor(java.awt.Color borderColor)
borderColor - public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - public java.lang.String getSubTitle()
public void setSubTitle(java.lang.String subTitle)
subTitle - public java.awt.Color getTitleColor()
public void setTitleColor(java.awt.Color titleColor)
titleColor - public java.awt.Color getSubTitleColor()
public void setSubTitleColor(java.awt.Color subTitleColor)
subTitleColor - public java.awt.Font getTitleFont()
public void setTitleFont(java.awt.Font titleFont)
titleFont - public java.awt.Font getSubTitleFont()
public void setSubTitleFont(java.awt.Font subTitleFont)
subTitleFont - public java.lang.String getXAxisLabel()
public void setXAxisLabel(java.lang.String xLabel)
xLabel - public java.lang.String getYAxisLabel()
public void setYAxisLabel(java.lang.String yLabel)
yLabel - public java.awt.Color getAxisLabelColor()
public void setAxisLabelColor(java.awt.Color axisLabelColor)
axisLabelColor - public java.awt.Font getAxisLabelFont()
public void setAxisLabelFont(java.awt.Font axisLabelFont)
axisLabelFont - public java.util.ArrayList getDatasets()
public void addDataset(Dataset dataset)
dataset -
public void hilitePoint(java.awt.geom.Point2D.Double point,
int xAxis,
int yAxis)
point - - the point to be highlightedxAxis - - can be AXIS_TOP, AXIS_BOTTOM or AXIS_NONEyAxis - - can be AXIS_LEFT, AXIS_RIGHT or AXIS_NONEpublic java.awt.image.BufferedImage getChartImage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||