Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.visual
Class BareGraph

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--uk.co.westhawk.visual.BareGraph

All Implemented Interfaces:
  java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable

public class BareGraph
extends java.awt.Component
implements java.beans.PropertyChangeListener

The class BareGraph makes a graphical respresentation of a set of integer values. The values are provided by the GraphDataSet class.

The line that this class draws can be set to the 10log() representation of the values.

Version:
  $Revision: 1.8 $ $Date: 2006/01/17 17:43:54 $
Author:
  Tim Panton
See Also:
  `Graph`, `GraphDataSet`, Serialized Form

Field Summary

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
`BareGraph()` The default constructor.
`BareGraph(GraphDataSet d)` The constructor with the data set

Method Summary
`java.awt.Color` | `getAxisColour()` Returns the colour of the axes of the graph.
`float` | `getAxisPercent()` Returns the per cent size of the axes in respect to the graph.
`GraphDataSet` | `getDataSet()` Returns the data set that the graph displays.
`java.awt.Color` | `getGraphColour()` Returns the colour of the line of the graph.
`int` | `getMax()` Returns the maximum value that is displayed in the graph.
`int` | `getMin()` Returns the minimum value that is displayed in the graph.
`java.awt.Dimension` | `getMinimumSize()` Returns the minimum size.
`java.awt.Dimension` | `getPreferredSize()` Returns the preferred size.
`boolean` | `isLog()` Returns the log mode of the graph.
`void` | `paint(java.awt.Graphics g)`
`void` | `propertyChange(java.beans.PropertyChangeEvent evt)` Implements the PropertyChangeListener.
`void` | `setAxes(boolean b)` Makes the graph draw the axes or not.
`void` | `setAxisColour(java.awt.Color c)` Sets the colour of the axes of the graph.
`void` | `setAxisPercent(float x)` Sets the per cent size of the axes in respect to the graph.
`void` | `setDataSet(GraphDataSet d)` Sets the data set that the graph displays.
`void` | `setGraphColour(java.awt.Color c)` Sets the colour of the line of the graph.
`void` | `setLog(boolean b)` Makes the graph draw the 10log() of the values or not.
`void` | `setMax(int m)` Sets the maximum value that is displayed in the graph.
`void` | `setMin(int m)` Sets the minimum value that is displayed in the graph.

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BareGraph

    public BareGraph()

  The default constructor. You need to call setDataSet

See Also:
  `setDataSet(uk.co.westhawk.visual.GraphDataSet)`

### BareGraph

    public BareGraph(GraphDataSet d)

  The constructor with the data set

Parameters:
  `d` - the data set

Method Detail

### setLog

    public void setLog(boolean b)

  Makes the graph draw the 10log() of the values or not. The default is false.

  Parameters:
    `b` - set the 10log() version on or not
  See Also:
    `isLog()`

### isLog

    public boolean isLog()

  Returns the log mode of the graph.

  Returns:
    is the graph drawing the 10log() values or not
  See Also:
    `setLog(boolean)`

### setAxes

    public void setAxes(boolean b)

  Makes the graph draw the axes or not. The default is true.

  Parameters:
    `b` - set the axes or not

### getMax

    public int getMax()

  Returns the maximum value that is displayed in the graph.

  Returns:
    the maximum value
  See Also:
    `setMax(int)`

### setMax

    public void setMax(int m)

  Sets the maximum value that is displayed in the graph.

  Parameters:
    `m` - the maximum
  See Also:
    `getMax()`

### getMin

    public int getMin()

  Returns the minimum value that is displayed in the graph.

  Returns:
    the minimum
  See Also:
    `setMin(int)`

### setMin

    public void setMin(int m)

  Sets the minimum value that is displayed in the graph.

  Parameters:
    `m` - the minimum value
  See Also:
    `getMin()`

### getAxisColour

    public java.awt.Color getAxisColour()

  Returns the colour of the axes of the graph.

  Returns:
    the axes' colour
  See Also:
    `setAxisColour(java.awt.Color)`

### setAxisColour

    public void setAxisColour(java.awt.Color c)

  Sets the colour of the axes of the graph. The default is Color.red.

  Parameters:
    `c` - the axes' colour
  See Also:
    `getAxisColour()`

### getGraphColour

    public java.awt.Color getGraphColour()

  Returns the colour of the line of the graph.

  Returns:
    the line's colour
  See Also:
    `setGraphColour(java.awt.Color)`

### setGraphColour

    public void setGraphColour(java.awt.Color c)

  Sets the colour of the line of the graph. The default is Color.blue.

  Parameters:
    `c` - the line's colour
  See Also:
    `getGraphColour()`

### getAxisPercent

    public float getAxisPercent()

  Returns the per cent size of the axes in respect to the graph.

  Returns:
    the size (%) of the axes
  See Also:
    `setAxisPercent(float)`

### setAxisPercent

    public void setAxisPercent(float x)

  Sets the per cent size of the axes in respect to the graph. The default is 5.0 %.

  See Also:
    `getAxisPercent()`

### getPreferredSize

    public java.awt.Dimension getPreferredSize()

  Returns the preferred size.

  Overrides:
    `getPreferredSize` in class `java.awt.Component`
  Returns:
    the dimensions of the preferred size

### getMinimumSize

    public java.awt.Dimension getMinimumSize()

  Returns the minimum size.

  Overrides:
    `getMinimumSize` in class `java.awt.Component`
  Returns:
    the dimensions of the minimum size

### setDataSet

    public void setDataSet(GraphDataSet d)

  Sets the data set that the graph displays. Depending on the log mode, the line will represents the values of the 10log() of the values.

  Parameters:
    `d` - the data set.
  See Also:
    `getDataSet()`

### getDataSet

    public GraphDataSet getDataSet()

  Returns the data set that the graph displays.

  Returns:
    the data set.
  See Also:
    `setDataSet(uk.co.westhawk.visual.GraphDataSet)`

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent evt)

  Implements the PropertyChangeListener. Gets the update of the data.

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`
  Parameters:
    `evt` - the property change event
  See Also:
    `PropertyChangeListener`

### paint

    public void paint(java.awt.Graphics g)

  Overrides:
    `paint` in class `java.awt.Component`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD