All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eou.toolkit.gauge.StackImageIndicator

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.StackImageIndicator

public class StackImageIndicator
extends BaseGauge
implements Serializable
This gauge represents values by stacking images. Image spacing, stacking order and random deviation may be adjusted to produce realistic stacking effects, or an array of image positions can be supplied. The indicator value can be represented using whole images or partial images, rounded in various ways.


Variable Index

 o IMAGE_DOWN
Round the number of images to be displayed down to the previous whole number.
 o IMAGE_NEAREST
Round the number of images to be displayed to the nearest whole number.
 o IMAGE_UP
Round the number of images to be displayed up to the next whole number.
 o PIXEL_CONTINUOUS
Do not round the number of images.
 o PIXEL_WHOLE
Do not round the number of images.

Constructor Index

 o StackImageIndicator()
Create a StackImageIndicator with an initial value of 0, a minimum value of -100 and a maximum value of 100.
 o StackImageIndicator(Image)
Create a StackImageIndicator specifying the image used to represent all of the gauge values.
 o StackImageIndicator(Image, Image)
Create a StackImageIndicator specifying the images used to represent the positive and negative values.
 o StackImageIndicator(int, int, int, int, Image, Image)
Create a StackImageIndicator specifying the initail value, the minimum and maximum values, the change-over value at which the gauge begins to display positive images, the images to represent positive and negative values, and whether the images are to be stacked away from or toward the change over value.
 o StackImageIndicator(int, int, int, int, Image, Image, boolean, boolean, boolean, int, int, int)
Create a StackImageIndicator specifying the initail value, the minimum and maximum values, the change-over value at which the gauge begins to display positive images, the images to represent positive and negative values, and whether the images are to be stacked away from or toward the change over value.
 o StackImageIndicator(int, int, int, int, Image, Image, boolean, boolean, Point[])
Create a StackImageIndicator specifying the initail value, the minimum and maximum values, the change-over value at which the gauge begins to display positive images, the images to represent positive and negative values, and whether the images are to be stacked away from or toward the change over value.

Method Index

 o addNotify()
 o copyright()
Copyright methond to ensure that short copyright string appears in the class file.
 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 getBackgroundImage()
Return the image tiled as the gauge backround
 o getBackgroundStyle()
Return the background to be drawn by this gauge prior to each paint, or null if no background is set.
 o getChangeOverValue()
Return the value at which the gauge begins to display positive values.
 o getImageDeviation()
Return the limits of random deviation as a percentage of the stack width.
 o getImageOverlap()
Return the number of pixels the images overlap
 o getMinimumSize()
 o getNegativeImage()
Return the positive image.
 o getNegativeStackToFront()
Return whether the negative images are to be stacked away from or toward the changeOverValue.
 o getPoints()
Return an array of points at which to place the images.
 o getPositiveImage()
Return the image to represent positive values, or null if no image has been specified.
 o getPositiveStackToFront()
Return whether the positive images are to be stacked away from or toward the changeOverValue.
 o getRandomImageDeviation(int, int)
 o getRounding()
Return the rounding style which refers to one of the rounding style constants.
 o getUpdateBounds(Dimension, int, int, int, int, int, int)
Return an array of rectangles defining the regions within the gauge display area that will need to be repainted as a result of the supplied next and current display values.
 o imagesReady()
This method is called automatically whenever the final image currently registered to be monitored during loading becomes ready.
 o paintComponent(Graphics, Dimension, int, int, int)
Paint the gauge.
 o processComponentEvent(ComponentEvent)
 o setBackgroundImage(Image)
Specify the image to be tiled as the gauge background.
 o setBackgroundStyle(Background)
Set the background to be drawn by this gauge prior to each paint.
 o setChangeOverValue(int)
Specify the value at which the gauge begins to display positive values.
 o setImageDeviation(int)
Specify the limits of random deviation as a percentage of the stack width.
 o setImageOverlap(int)
Specify the number of pixels by which the images overlap.
 o setNegativeImage(Image)
Specify the positive image
 o setNegativeStackToFront(boolean)
Specify whether the negative images are to be stacked away from or toward the changeOverValue.
 o setOrientation(int)
Set the orientation for the gauge.
 o setPoints(Point[])
Specify an array of points at which to place the images.
 o setPositiveImage(Image)
Specify the image to represent positive values.
 o setPositiveStackToFront(boolean)
Specify whether the positive images are to be stacked away from or toward the changeOverValue.
 o setRounding(int)
Specify the rounding style using one of the appropriate constants.

Variables

 o PIXEL_CONTINUOUS
 public static final int PIXEL_CONTINUOUS
Do not round the number of images. The most significant image may be truncated.

See Also:
setRounding
 o PIXEL_WHOLE
 public static final int PIXEL_WHOLE
Do not round the number of images. The most significant image may be truncated, but the minimum and maximum are represented by whole images.

See Also:
setRounding
 o IMAGE_UP
 public static final int IMAGE_UP
Round the number of images to be displayed up to the next whole number.

See Also:
setRounding
 o IMAGE_DOWN
 public static final int IMAGE_DOWN
Round the number of images to be displayed down to the previous whole number.

See Also:
setRounding
 o IMAGE_NEAREST
 public static final int IMAGE_NEAREST
Round the number of images to be displayed to the nearest whole number.

See Also:
setRounding

Constructors

 o StackImageIndicator
 public StackImageIndicator(int initialValue,
                            int minimum,
                            int maximum,
                            int changeOverValue,
                            Image positiveImage,
                            Image negativeImage,
                            boolean positiveStackToFront,
                            boolean negativeStackToFront,
                            Point points[])
Create a StackImageIndicator specifying the initail value, the minimum and maximum values, the change-over value at which the gauge begins to display positive images, the images to represent positive and negative values, and whether the images are to be stacked away from or toward the change over value. An array of points at which the images are to be placed is also specified.

 o StackImageIndicator
 public StackImageIndicator(int initialValue,
                            int minimum,
                            int maximum,
                            int changeOverValue,
                            Image positiveImage,
                            Image negativeImage,
                            boolean positiveStackToFront,
                            boolean negativeStackToFront,
                            boolean horizontal,
                            int imageOverlap,
                            int imageDeviation,
                            int rounding)
Create a StackImageIndicator specifying the initail value, the minimum and maximum values, the change-over value at which the gauge begins to display positive images, the images to represent positive and negative values, and whether the images are to be stacked away from or toward the change over value. The placement of the images is determined by the orientation, the number of pixels by which the images overlap, and the degree by which the image positioning will randomly vary, and the rounding style.

 o StackImageIndicator
 public StackImageIndicator(int initialValue,
                            int minimum,
                            int maximum,
                            int changeOverValue,
                            Image positiveImage,
                            Image negativeImage)
Create a StackImageIndicator specifying the initail value, the minimum and maximum values, the change-over value at which the gauge begins to display positive images, the images to represent positive and negative values, and whether the images are to be stacked away from or toward the change over value. The remaining properties default to vertical orientation, no image overlap, no random deviation and the stack is rounded to the nearest whole image.

 o StackImageIndicator
 public StackImageIndicator(Image positiveImage,
                            Image negativeImage)
Create a StackImageIndicator specifying the images used to represent the positive and negative values. It has an initial value of 0, a minimum value of -100 and a maximum value of 100. The change-over value at which the gauge begins to show positive images is 0. The remaining properties default to vertical orientation, no image overlap, no random deviation and the stack is rounded to the nearest whole image.

 o StackImageIndicator
 public StackImageIndicator(Image image)
Create a StackImageIndicator specifying the image used to represent all of the gauge values. It has an initial value of 0, a minimum value of -100 and a maximum value of 100. The change-over value at which the gauge begins to show positive images is 0. The remaining properties default to vertical orientation, no image overlap, no random deviation and the stack is rounded to the nearest whole image.

 o StackImageIndicator
 public StackImageIndicator()
Create a StackImageIndicator with an initial value of 0, a minimum value of -100 and a maximum value of 100. The change-over value at which the gauge begins to show positive images is 0, there are no images specified. The remaining properties default to vertical orientation, no image overlap, no random deviation and the stack is rounded to the nearest whole image.

Methods

 o copyright
 public static String copyright()
Copyright methond to ensure that short copyright string appears in the class file.

 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class JComponent
 o addNotify
 public void addNotify()
Overrides:
addNotify in class JComponent
 o imagesReady
 protected void imagesReady()
This method is called automatically whenever the final image currently registered to be monitored during loading becomes ready.

Overrides:
imagesReady in class BaseGauge
 o processComponentEvent
 public void processComponentEvent(ComponentEvent e)
Overrides:
processComponentEvent in class BaseGauge
 o getBackgroundStyle
 public Background getBackgroundStyle()
Return the background to be drawn by this gauge prior to each paint, or null if no background is set.

Overrides:
getBackgroundStyle in class BaseGauge
 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 BaseGauge
 o setBackgroundStyle
 public void setBackgroundStyle(Background background)
Set the background to be drawn by this gauge prior to each paint.

Overrides:
setBackgroundStyle in class BaseGauge
 o setBackgroundImage
 public void setBackgroundImage(Image image)
Specify the image to be tiled as the gauge background. Null removes any background image.

 o getBackgroundImage
 public Image getBackgroundImage()
Return the image tiled as the gauge backround

 o setPositiveImage
 public void setPositiveImage(Image positiveImage)
Specify the image to represent positive values.

 o getPositiveImage
 public Image getPositiveImage()
Return the image to represent positive values, or null if no image has been specified.

 o setNegativeImage
 public void setNegativeImage(Image negativeImage)
Specify the positive image

 o getNegativeImage
 public Image getNegativeImage()
Return the positive image.

 o setChangeOverValue
 public void setChangeOverValue(int changeOverValue)
Specify the value at which the gauge begins to display positive values.

 o getChangeOverValue
 public int getChangeOverValue()
Return the value at which the gauge begins to display positive values.

 o setPositiveStackToFront
 public void setPositiveStackToFront(boolean stackToFront)
Specify whether the positive images are to be stacked away from or toward the changeOverValue.

 o getPositiveStackToFront
 public boolean getPositiveStackToFront()
Return whether the positive images are to be stacked away from or toward the changeOverValue.

 o setNegativeStackToFront
 public void setNegativeStackToFront(boolean stackToFront)
Specify whether the negative images are to be stacked away from or toward the changeOverValue.

 o getNegativeStackToFront
 public boolean getNegativeStackToFront()
Return whether the negative images are to be stacked away from or toward the changeOverValue.

 o setImageOverlap
 public void setImageOverlap(int imageOverlap)
Specify the number of pixels by which the images overlap.

 o getImageOverlap
 public int getImageOverlap()
Return the number of pixels the images overlap

 o setImageDeviation
 public void setImageDeviation(int imageDeviation)
Specify the limits of random deviation as a percentage of the stack width. Zero causes no random deviation, and 100% causes the effective stack width to be doubled. The individual images in the stack width are laterally displaced randomly within this width.

 o getImageDeviation
 public int getImageDeviation()
Return the limits of random deviation as a percentage of the stack width. Zero causes no random deviation, and 100% causes the effective stack width to be doubled. The individual images in the stack width are laterally displaced randomly within this width.

 o setRounding
 public void setRounding(int rounding)
Specify the rounding style using one of the appropriate constants.

See Also:
PIXEL_CONTINUOUS, PIXEL_WHOLE, IMAGE_UP, IMAGE_DOWN, IMAGE_NEAREST
 o getRounding
 public int getRounding()
Return the rounding style which refers to one of the rounding style constants.

See Also:
PIXEL_CONTINUOUS, PIXEL_WHOLE, IMAGE_UP, IMAGE_DOWN, IMAGE_NEAREST
 o setPoints
 public void setPoints(Point points[])
Specify an array of points at which to place the images. If null is specified coordinates for stacking images will be calculated.

 o getPoints
 public Point[] getPoints()
Return an array of points at which to place the images.

 o setOrientation
 public void setOrientation(int orientation)
Set the orientation for the gauge.

Overrides:
setOrientation in class BaseGauge
 o getRandomImageDeviation
 public int getRandomImageDeviation(int imageWidth,
                                    int imageDeviation)
 o paintComponent
 public void paintComponent(Graphics g,
                            Dimension d,
                            int displayValue,
                            int minimum,
                            int maximum)
Paint the gauge.

Overrides:
paintComponent in class BaseGauge
 o getUpdateBounds
 protected Rectangle[] getUpdateBounds(Dimension size,
                                       int nextDisplayValue,
                                       int nextDisplayMinimum,
                                       int nextDisplayMaximum,
                                       int currentDisplayValue,
                                       int currentDisplayMinimum,
                                       int currentDisplayMaximum)
Return an array of rectangles defining the regions within the gauge display area that will need to be repainted as a result of the supplied next and current display values.

Overrides:
getUpdateBounds in class BaseGauge

All Packages  Class Hierarchy  This Package  Previous  Next  Index