Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.watch
Class DefaultCalculableView

    java.lang.Object
      org.jini.rio.watch.DefaultCalculableView

All Implemented Interfaces:
  CalculableViewable

Direct Known Subclasses:
  CalculableDiskSpaceView, CalculableMemoryView, CounterCalculableView, ResponseTimeCalculableView, ThresholdCalculableView

    public class DefaultCalculableView

extends Object
implements CalculableViewable

Default attributes for viewing a collection of Calculables

Field Summary
`protected Accumulator` | `accum`
`protected static Color` | `avgColor`
`protected static int` | `BOTTOM_AXIS_MARGIN`
`protected static int` | `BOTTOM_GRAPH_MARGIN`
`protected double` | `bottomLineValue`
`protected CalculableDisplayAttributes` | `calcDisplayAttrs`
`protected int` | `currentSize`
`protected Calculable[]` | `data`
`protected static CalculableDisplayAttributes` | `defaultDisplayAttributes`
`protected static Font` | `defaultFont`
`static DecimalFormat` | `defaultFormater`
`protected static Color` | `devColor`
`protected double` | `drawHeight`
`protected double` | `drawWidth`
`protected double` | `highThreshold`
`protected static int` | `HORIZONTAL__MIN_GRID_WIDTH`
`protected static int` | `LEFT_AXIS_MARGIN`
`protected static int` | `LEFT_GRAPH_MARGIN`
`protected double` | `lowThreshold`
`protected double` | `max`
`protected double` | `maxY`
`protected double` | `mean`
`protected double` | `min`
`protected double` | `minY`
`protected double` | `nbrHGrids`
`protected int` | `offset`
`protected double` | `rangeSize`
`protected static int` | `RIGHT_AXIS_MARGIN`
`protected static int` | `RIGHT_GRAPH_MARGIN`
`protected double` | `startRange`
`protected double` | `startValue`
`protected double` | `stdDev`
`protected double` | `stopRange`
`protected double` | `stopValue`
`protected String` | `title`
`protected Font` | `titleFont`
`protected static int` | `TOP_AXIS_MARGIN`
`protected static int` | `TOP_GRAPH_MARGIN`
`protected double` | `topLineValue`
`protected static int` | `TOTAL_H_GRAPH_MARGIN`
`protected static int` | `TOTAL_V_GRAPH_MARGIN`
`protected double` | `valuesRange`
`protected static int` | `VERTICAL__MIN_GRID_HEIGHT`
`protected static int` | `VERTICAL_GRAPH_OFFSET`
`protected double` | `vStep`
`protected double` | `vStepMultiplier`
`protected WatchDataSource` | `watchDataSource`
`protected NumberFormat` | `xFormat`
`protected String` | `xLegend`
`protected Font` | `xLegendFont`
`protected double` | `xScale`
`protected NumberFormat` | `yFormat`
`protected String` | `yLegend`
`protected Font` | `yLegendFont`
`protected double` | `yScale`

Constructor Summary
`DefaultCalculableView()` Creates new DefaultCalculableView
`DefaultCalculableView(CalculableDisplayAttributes calcDisplayAttrs)` Creates new DefaultCalculableView

Method Summary
`protected double` | `getBottomLineValue()`
`int` | `getLength()` Get the length property
`int` | `getOffset()` Get the offset property
`double` | `getStartValue()` Getter for property startValue.
`double` | `getStopValue()` Getter for property stopValue.
`protected double` | `getTopLineValue()`
`protected void` | `initValues()` Initialize the graph values from the WatchDataSource
`void` | `paint(Graphics g, Dimension size)` Paints the view to the graphics context
`protected void` | `resetValues()` Reset the graph values to default values
`void` | `setCalculableDisplayAttributes(CalculableDisplayAttributes calcDisplayAttrs)` Sets the Calculable Display Attributes used to format the graph
`void` | `setStartValue(double startValue)` Setter for property startValue.
`void` | `setStopValue(double stopValue)` Setter for property stopValue.
`void` | `setWatchDataSource(WatchDataSource watchDataSource)` Sets the watch data source for this view

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

Field Detail

### TOP_AXIS_MARGIN

    protected static final int TOP_AXIS_MARGIN

See Also:
  Constant Field Values

### BOTTOM_AXIS_MARGIN

    protected static final int BOTTOM_AXIS_MARGIN

See Also:
  Constant Field Values

### LEFT_AXIS_MARGIN

    protected static final int LEFT_AXIS_MARGIN

See Also:
  Constant Field Values

### RIGHT_AXIS_MARGIN

    protected static final int RIGHT_AXIS_MARGIN

See Also:
  Constant Field Values

### TOP_GRAPH_MARGIN

    protected static final int TOP_GRAPH_MARGIN

See Also:
  Constant Field Values

### BOTTOM_GRAPH_MARGIN

    protected static final int BOTTOM_GRAPH_MARGIN

See Also:
  Constant Field Values

### LEFT_GRAPH_MARGIN

    protected static final int LEFT_GRAPH_MARGIN

See Also:
  Constant Field Values

### RIGHT_GRAPH_MARGIN

    protected static final int RIGHT_GRAPH_MARGIN

See Also:
  Constant Field Values

### VERTICAL_GRAPH_OFFSET

    protected static final int VERTICAL_GRAPH_OFFSET

See Also:
  Constant Field Values

### TOTAL_H_GRAPH_MARGIN

    protected static final int TOTAL_H_GRAPH_MARGIN

See Also:
  Constant Field Values

### TOTAL_V_GRAPH_MARGIN

    protected static final int TOTAL_V_GRAPH_MARGIN

See Also:
  Constant Field Values

### VERTICAL__MIN_GRID_HEIGHT

    protected static final int VERTICAL__MIN_GRID_HEIGHT

See Also:
  Constant Field Values

### HORIZONTAL__MIN_GRID_WIDTH

    protected static final int HORIZONTAL__MIN_GRID_WIDTH

See Also:
  Constant Field Values

### devColor

    protected static final Color devColor

### avgColor

    protected static final Color avgColor

### defaultFormater

    public static final DecimalFormat defaultFormater

### defaultFont

    protected static final Font defaultFont

### defaultDisplayAttributes

    protected static final CalculableDisplayAttributes defaultDisplayAttributes

### watchDataSource

    protected WatchDataSource watchDataSource

### accum

    protected Accumulator accum

### data

    protected Calculable[] data

### highThreshold

    protected double highThreshold

### lowThreshold

    protected double lowThreshold

### startRange

    protected double startRange

### stopRange

    protected double stopRange

### startValue

    protected double startValue

### stopValue

    protected double stopValue

### min

    protected double min

### max

    protected double max

### mean

    protected double mean

### stdDev

    protected double stdDev

### yLegend

    protected String yLegend

### yLegendFont

    protected Font yLegendFont

### yScale

    protected double yScale

### yFormat

    protected NumberFormat yFormat

### xLegend

    protected String xLegend

### xLegendFont

    protected Font xLegendFont

### xScale

    protected double xScale

### xFormat

    protected NumberFormat xFormat

### title

    protected String title

### titleFont

    protected Font titleFont

### calcDisplayAttrs

    protected CalculableDisplayAttributes calcDisplayAttrs

### currentSize

    protected int currentSize

### offset

    protected int offset

### drawWidth

    protected double drawWidth

### rangeSize

    protected double rangeSize

### drawHeight

    protected double drawHeight

### topLineValue

    protected double topLineValue

### bottomLineValue

    protected double bottomLineValue

### valuesRange

    protected double valuesRange

### vStep

    protected double vStep

### vStepMultiplier

    protected double vStepMultiplier

### nbrHGrids

    protected double nbrHGrids

### maxY

    protected double maxY

### minY

    protected double minY

Constructor Detail

### DefaultCalculableView

    public DefaultCalculableView()

  Creates new DefaultCalculableView

### DefaultCalculableView

    public DefaultCalculableView(CalculableDisplayAttributes calcDisplayAttrs)

  Creates new DefaultCalculableView

  Parameters:
    `calcDisplayAttrs` - The Calculable Display Attributes used to format the graph

Method Detail

### setCalculableDisplayAttributes

    public void setCalculableDisplayAttributes(CalculableDisplayAttributes calcDisplayAttrs)

  Sets the Calculable Display Attributes used to format the graph

  Parameters:
    `calcDisplayAttrs` - The Calculable Display Attributes used to format the graph

### setWatchDataSource

    public void setWatchDataSource(WatchDataSource watchDataSource)

  Sets the watch data source for this view

  Specified by:
    `setWatchDataSource` in interface `CalculableViewable`
  Parameters:
    `watchDataSource` - The WatchDataSource

### resetValues

    protected void resetValues()

  Reset the graph values to default values

### initValues

    protected void initValues()

  Initialize the graph values from the WatchDataSource

### paint

    public void paint(Graphics g,
                      Dimension size)

  Paints the view to the graphics context

  Specified by:
    `paint` in interface `CalculableViewable`
  Parameters:
    `g` - The Graphics context
    `size` - The Dimension to paint

### getOffset

    public int getOffset()

  Get the offset property

  Specified by:
    `getOffset` in interface `CalculableViewable`
  Returns:
    the current offset for the underlying data collection

### getLength

    public int getLength()

  Get the length property

  Specified by:
    `getLength` in interface `CalculableViewable`
  Returns:
    the length for the underlying data collection

### getTopLineValue

    protected double getTopLineValue()

  Returns:
    The value for the top Y axis

### getBottomLineValue

    protected double getBottomLineValue()

  Returns:
    The value for the bottom Y axis

### getStartValue

    public double getStartValue()

  Getter for property startValue.

  Specified by:
    `getStartValue` in interface `CalculableViewable`
  Returns:
    Value of property startValue.

### setStartValue

    public void setStartValue(double startValue)

  Setter for property startValue.

  Specified by:
    `setStartValue` in interface `CalculableViewable`
  Parameters:
    `startValue` - New value of property startValue.

### getStopValue

    public double getStopValue()

  Getter for property stopValue.

  Specified by:
    `getStopValue` in interface `CalculableViewable`
  Returns:
    Value of property stopValue.

### setStopValue

    public void setStopValue(double stopValue)

  Setter for property stopValue.

  Specified by:
    `setStopValue` in interface `CalculableViewable`
  Parameters:
    `stopValue` - New value of property stopValue.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.