All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eou.toolkit.gauge.ArcBlockIndicator

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JPanel
                                   |
                                   +----com.ibm.eou.toolkit.gauge.BaseGauge
                                           |
                                           +----com.ibm.eou.toolkit.gauge.BlockIndicator
                                                   |
                                                   +----com.ibm.eou.toolkit.gauge.ArcBlockIndicator

public class ArcBlockIndicator
extends BlockIndicator
implements Serializable
This gauge is composed of a semicircular array of quadrilateral ticks. The range of possible values is shown by faded ticks. The ticks are divided into three sections which can be given different colors and positions. As the gauge value changes ticks are added or removed one by one.

To use this gauge the changeover values and colors for the three sections need to be specfied along with the inner radius, number of ticks and the tick size.


Constructor Index

 o ArcBlockIndicator()
Create an ArcBlockIndicator with an initial value of 0 and a range of 0 to 100.
 o ArcBlockIndicator(int, int, int)
Create an ArcBlockIndicator specifying only the initial value, minimum value and maximum value.
 o ArcBlockIndicator(int, int, int, int, int, int, int, int, Color, Color, Color)
Create an ArcBlockIndicator specifying all properties.

Method Index

 o copyright()
 o gaugeModelChanged(GaugeModelChangeEvent)
This method can be overriden by extending classes which need to react to a change to one or more of the models settings.
 o getBlockWidthProportion()
Return the percentage of the available space to use for each tick.
 o getHighColor()
Return the high color.
 o getHighThreshold()
Return the value at which the medium colored ticks turn to high colored ticks.
 o getInnerRadius()
Return the inner radius of the arc.
 o getLowColor()
Return the low color.
 o getLowThreshold()
Return the value at which the low colored ticks turn to medium colored ticks.
 o getMediumColor()
Return the medium color.
 o getMinimumSize()
 o getUpdateBounds(Dimension, int, int, int, int, int, int)
Return an array of one rectangle that defines the area of the gauge that will need to be updated as a result of the supplied next and current display values.
 o paintComponent(Graphics, Dimension, int, int, int)
Paint the gauge so that it represents the supplied value.
 o setBlockWidthProportion(int)
Specify the percentage of the available space to use for each tick.
 o setHighColor(Color)
Set the high color.
 o setHighThreshold(int)
Specify the value at which the medium colored ticks turn to high colored ticks.
 o setInnerRadius(int)
Set the inner radius of the arc.
 o setLowColor(Color)
Set the low color.
 o setLowThreshold(int)
Specify the value at which the low colored ticks turn to medium colored ticks.
 o setMediumColor(Color)
Set the medium color.
 o setNumberOfBlocks(int)
Specify the number of blocks in the gauge.

Constructors

 o ArcBlockIndicator
 public ArcBlockIndicator(int initialValue,
                          int minimum,
                          int maximum,
                          int numberOfTicks,
                          int tickSize,
                          int lowThreshold,
                          int highThreshold,
                          int innerRadius,
                          Color high,
                          Color mediumColor,
                          Color low)
Create an ArcBlockIndicator specifying all properties. You need to specify the number of ticks, the percentage of the available space to use for each tick, the thresholds for the color changes, the inner radius of the arc (as a percentage of the total arc radius), and the colors to use for the ticks in each region. If the colors are specified as null the default colors will be used. These are red, yellow and green, representing low, medium and high. If the there is not enough space to draw the ticks as specified, with at least one pixel gap between each tick on the inner radius, then the ticks will be drawn as single lines.

 o ArcBlockIndicator
 public ArcBlockIndicator(int initialValue,
                          int minimum,
                          int maximum)
Create an ArcBlockIndicator specifying only the initial value, minimum value and maximum value. The remaining properties default to 30 ticks that are 60 pixels in height. The lower and higher thresholds are set as 1/4 and 3/4 of the minimum and maximum values, the inner arc radius is 50% of the total arc radius. The default colors are, red, yellow and green representing low, medium and high.

 o ArcBlockIndicator
 public ArcBlockIndicator()
Create an ArcBlockIndicator with an initial value of 0 and a range of 0 to 100. The remaining properties default to 30 ticks that are 60 pixels in height. The lower and higher thresholds are set as 1/4 and 3/4 of the minimum and maximum values, the inner arc radius is 50% of the total arc radius. The default colors are, red, yellow and green representing low, medium and high.

Methods

 o copyright
 public static String copyright()
 o setNumberOfBlocks
 public void setNumberOfBlocks(int blocks)
Specify the number of blocks in the gauge.

Overrides:
setNumberOfBlocks in class BlockIndicator
 o getLowThreshold
 public int getLowThreshold()
Return the value at which the low colored ticks turn to medium colored ticks.

 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class BlockIndicator
 o setLowThreshold
 public void setLowThreshold(int thresholdValue)
Specify the value at which the low colored ticks turn to medium colored ticks.

 o getHighThreshold
 public int getHighThreshold()
Return the value at which the medium colored ticks turn to high colored ticks.

 o setHighThreshold
 public void setHighThreshold(int thresholdValue)
Specify the value at which the medium colored ticks turn to high colored ticks.

 o setInnerRadius
 public void setInnerRadius(int percentageRadius)
Set the inner radius of the arc. This is a percentage of the total arc radius. For best results do not use values less than twenty.

 o getInnerRadius
 public int getInnerRadius()
Return the inner radius of the arc. This is a percentage of the total arc radius.

 o setHighColor
 public void setHighColor(Color color)
Set the high color. Null is ignored.

 o getHighColor
 public Color getHighColor()
Return the high color.

 o setMediumColor
 public void setMediumColor(Color color)
Set the medium color. Null is ignored.

 o getMediumColor
 public Color getMediumColor()
Return the medium color.

 o setLowColor
 public void setLowColor(Color color)
Set the low color. Null is ignored.

 o getLowColor
 public Color getLowColor()
Return the low color.

 o setBlockWidthProportion
 public void setBlockWidthProportion(int blockWidth)
Specify the percentage of the available space to use for each tick.

 o getBlockWidthProportion
 public int getBlockWidthProportion()
Return the percentage of the available space to use for each tick.

 o gaugeModelChanged
 protected void gaugeModelChanged(GaugeModelChangeEvent e)
This method can be overriden by extending classes which need to react to a change to one or more of the models settings.

Overrides:
gaugeModelChanged in class BlockIndicator
 o getUpdateBounds
 protected Rectangle[] getUpdateBounds(Dimension size,
                                       int nextDisplayValue,
                                       int nextDisplayMinimum,
                                       int nextDisplayMaximum,
                                       int currentDisplayValue,
                                       int currentDisplayMinimum,
                                       int currentDisplayMaximum)
Return an array of one rectangle that defines the area of the gauge that will need to be updated as a result of the supplied next and current display values. This area is used to generate a paint request which will have a clipping region set that matches the update region. Paint processing is optimized to only paint gauge artefacts that intersect this region.

Overrides:
getUpdateBounds in class BlockIndicator
 o paintComponent
 public void paintComponent(Graphics g,
                            Dimension size,
                            int value,
                            int minimum,
                            int maximum)
Paint the gauge so that it represents the supplied value.

Overrides:
paintComponent in class BlockIndicator

All Packages  Class Hierarchy  This Package  Previous  Next  Index