|
||||||||||
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
com.moneydance.awt.graph.GraphPanel
Description: This is an abstract class that implements the common functionality required for all types of graphs. Specific graph types such as Bar, Line, or Pie, should subclass this class
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected java.awt.Graphics |
bufferG
|
protected java.awt.Image |
graphImage
|
protected java.awt.Dimension |
graphSize
|
protected boolean |
threeD
|
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 | |
GraphPanel()
Construct a graph with the specified initial size. |
Method Summary | |
protected void |
addBalloonHelpArea(BalloonHelp balloonHelp)
Adds an area where a mouse motion will bring up a balloon help object with the specified text. |
void |
addDataSetGraph(DataSet dataSet,
java.awt.Color color)
Add the specified data set to the graph, using the specified color to draw the data. |
abstract void |
drawGraph(java.awt.Graphics g,
int width,
int height,
boolean printing)
This method must be over-ridden by the different types of graph in order to render the given datasets onto the graphImage. |
java.awt.Color |
getColor(int i)
Get the rendering color of the data set at the specified position. |
DataSet |
getDataSet(int i)
Get the data set at the specified position. |
int |
getNumDataSets()
Get the number of data sets. |
java.awt.Dimension |
getPreferredSize()
|
boolean |
isThreeD()
Ask if this graph is drawn in three dimensions or only two. |
void |
mouseClicked(java.awt.event.MouseEvent e)
ignore this. |
void |
mouseDragged(java.awt.event.MouseEvent e)
ignore this. |
void |
mouseEntered(java.awt.event.MouseEvent e)
ignore this. |
void |
mouseExited(java.awt.event.MouseEvent e)
ignore this. |
void |
mouseMoved(java.awt.event.MouseEvent e)
ignore this. |
void |
mousePressed(java.awt.event.MouseEvent e)
ignore this. |
void |
mouseReleased(java.awt.event.MouseEvent e)
ignore this. |
void |
paint(java.awt.Graphics g)
ignore this. |
protected void |
removeAllBalloonHelpItems()
Remove all balloon help items. |
void |
removeAllDataSets()
Removes all of the current data sets from the graph. |
void |
renderGraph()
Redraw the graph onto the buffered image and update the screen. |
void |
setBalloonHelpEnabled(boolean value)
Set whether or not descriptions of each data set are displayed when the mouse rolls over the display area for each data set. |
void |
setBounds(int x,
int y,
int w,
int h)
|
void |
setThreeD(boolean val)
Set whether this graph is drawn in three dimensions or only two. |
void |
update(java.awt.Graphics g)
|
void |
writeGIF(java.io.OutputStream out)
Save this graph as a GIF image to the specified output stream |
void |
writeGIFWithInfo(java.io.OutputStream out)
Save this graph as a GIF image to the specified output stream, along with a "header" that shows the legend or key. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, 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 |
protected java.awt.Image graphImage
protected java.awt.Dimension graphSize
protected java.awt.Graphics bufferG
protected boolean threeD
Constructor Detail |
public GraphPanel()
Method Detail |
public boolean isThreeD()
public void writeGIF(java.io.OutputStream out) throws java.awt.AWTException, java.io.IOException
java.awt.AWTException
java.io.IOException
public void writeGIFWithInfo(java.io.OutputStream out) throws java.awt.AWTException, java.io.IOException
java.awt.AWTException
java.io.IOException
public void setThreeD(boolean val)
public void setBalloonHelpEnabled(boolean value)
public void addDataSetGraph(DataSet dataSet, java.awt.Color color)
public void removeAllDataSets()
public int getNumDataSets()
public DataSet getDataSet(int i)
public java.awt.Color getColor(int i)
public void setBounds(int x, int y, int w, int h)
public final void renderGraph()
public abstract void drawGraph(java.awt.Graphics g, int width, int height, boolean printing)
protected void addBalloonHelpArea(BalloonHelp balloonHelp)
protected void removeAllBalloonHelpItems()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void paint(java.awt.Graphics g)
public void update(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |