|
||||||||
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
ac.essex.graphing.plotting.Graph
public class GraphPanel
Graph Panel A JPanel for use in Swing GUI interfaces that can draw various mathematical functions, which implement the GraphableFunction Interface
There are a number of different settings that can be changed to alter the appearance and behaviour of the Graph Panel. Have a look at the Getter and Setter methods for more details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version, provided that any use properly credits the author. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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(ac.essex.graphing.plotting.ContinuousFunctionPlotter function)
Simplest constructor, initialises the Graph Panel with the mathematical function to implement. |
|
GraphPanel(ac.essex.graphing.plotting.ContinuousFunctionPlotter function,
double xMin,
double xMax,
double yMin,
double yMax)
|
Method Summary | |
---|---|
java.awt.Color |
getAxisColor()
|
java.awt.Color |
getBackgroundColor()
|
int |
getBorderBottom()
|
int |
getBorderLeft()
|
int |
getBorderRight()
|
int |
getBorderTop()
|
java.awt.Color |
getFontColor()
|
ac.essex.graphing.plotting.ContinuousFunctionPlotter |
getFunction()
Gets the function class used to generate the graph. |
java.awt.Color |
getGridColor()
|
double |
getMaxX()
Gets the maximum X value for plotting. |
double |
getMaxY()
Gets the maximum Y value for plotting |
double |
getMinX()
Gets the minimum X value for plotting |
double |
getMinY()
Gets the minimum Y value for plotting |
int |
getNotchCountX()
|
int |
getNotchCountY()
|
int |
getNotchGap()
|
int |
getNotchSize()
|
java.text.Format |
getNumberFormatter()
|
java.awt.Color |
getPlotColor()
|
boolean |
isHorizontalGridVisible()
|
boolean |
isVerticalGridVisible()
|
void |
paint(java.awt.Graphics g)
|
void |
setAxisColor(java.awt.Color axisColor)
|
void |
setBackgroundColor(java.awt.Color backgroundColor)
|
void |
setBorderBottom(int borderBottom)
|
void |
setBorderLeft(int borderLeft)
|
void |
setBorderRight(int borderRight)
|
void |
setBorderTop(int borderTop)
|
void |
setFontColor(java.awt.Color fontColor)
|
void |
setFunction(ac.essex.graphing.plotting.ContinuousFunctionPlotter function)
Sets the function class used to generate the graph. |
void |
setGridColor(java.awt.Color gridColor)
|
void |
setHorizontalGridVisible(boolean horizontalGridVisible)
|
void |
setMaxX(double maxX)
Sets the maximum X value for plotting. |
void |
setMaxY(double maxY)
Sets the maximum Y value for plotting |
void |
setMinX(double minX)
Sets the minimum X value for plotting. |
void |
setMinY(double minY)
Sets the minimum Y value for plotting |
void |
setNotchCountX(int notchCountX)
|
void |
setNotchCountY(int notchCountY)
|
void |
setNotchGap(int notchGap)
|
void |
setNotchSize(int notchSize)
|
void |
setNumberFormatter(java.text.Format numberFormatter)
|
void |
setPlotColor(java.awt.Color plotColor)
|
void |
setVerticalGridVisible(boolean verticalGridVisible)
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GraphPanel(ac.essex.graphing.plotting.ContinuousFunctionPlotter function)
public GraphPanel(ac.essex.graphing.plotting.ContinuousFunctionPlotter function, double xMin, double xMax, double yMin, double yMax)
Method Detail |
---|
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public double getMinX()
public void setMinX(double minX)
public double getMaxX()
public void setMaxX(double maxX)
public double getMinY()
public void setMinY(double minY)
public double getMaxY()
public void setMaxY(double maxY)
public ac.essex.graphing.plotting.ContinuousFunctionPlotter getFunction()
public void setFunction(ac.essex.graphing.plotting.ContinuousFunctionPlotter function)
public int getBorderTop()
public void setBorderTop(int borderTop)
public int getBorderBottom()
public void setBorderBottom(int borderBottom)
public int getBorderLeft()
public void setBorderLeft(int borderLeft)
public int getBorderRight()
public void setBorderRight(int borderRight)
public java.awt.Color getAxisColor()
public void setAxisColor(java.awt.Color axisColor)
public java.awt.Color getFontColor()
public void setFontColor(java.awt.Color fontColor)
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color backgroundColor)
public java.awt.Color getPlotColor()
public void setPlotColor(java.awt.Color plotColor)
public java.awt.Color getGridColor()
public void setGridColor(java.awt.Color gridColor)
public int getNotchSize()
public void setNotchSize(int notchSize)
public int getNotchGap()
public void setNotchGap(int notchGap)
public boolean isHorizontalGridVisible()
public void setHorizontalGridVisible(boolean horizontalGridVisible)
public boolean isVerticalGridVisible()
public void setVerticalGridVisible(boolean verticalGridVisible)
public java.text.Format getNumberFormatter()
public void setNumberFormatter(java.text.Format numberFormatter)
public int getNotchCountX()
public void setNotchCountX(int notchCountX)
public int getNotchCountY()
public void setNotchCountY(int notchCountY)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |