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.
-
IMAGE_DOWN
- Round the number of images to be displayed down to the previous whole number.
-
IMAGE_NEAREST
- Round the number of images to be displayed to the nearest whole number.
-
IMAGE_UP
- Round the number of images to be displayed up to the next whole number.
-
PIXEL_CONTINUOUS
- Do not round the number of images.
-
PIXEL_WHOLE
- Do not round the number of images.
-
StackImageIndicator()
- Create a StackImageIndicator with an initial value of 0, a minimum value of -100 and a maximum value of 100.
-
StackImageIndicator(Image)
- Create a StackImageIndicator specifying the image used to represent all of the gauge values.
-
StackImageIndicator(Image, Image)
- Create a StackImageIndicator specifying the images used to represent the positive and
negative values.
-
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.
-
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.
-
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.
-
addNotify()
-
-
copyright()
- Copyright methond to ensure that short copyright string appears in the class file.
-
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.
-
getBackgroundImage()
- Return the image tiled as the gauge backround
-
getBackgroundStyle()
- Return the background to be drawn by this gauge prior
to each paint, or null if no background is set.
-
getChangeOverValue()
- Return the value at which the gauge begins to display positive values.
-
getImageDeviation()
- Return the limits of random deviation as a percentage of the stack width.
-
getImageOverlap()
- Return the number of pixels the images overlap
-
getMinimumSize()
-
-
getNegativeImage()
- Return the positive image.
-
getNegativeStackToFront()
- Return whether the negative images are to be stacked away from or toward the changeOverValue.
-
getPoints()
- Return an array of points at which to place the images.
-
getPositiveImage()
- Return the image to represent positive values, or null if no image has been specified.
-
getPositiveStackToFront()
- Return whether the positive images are to be stacked away from or toward the changeOverValue.
-
getRandomImageDeviation(int, int)
-
-
getRounding()
- Return the rounding style which refers to one of the rounding style constants.
-
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.
-
imagesReady()
- This method is called automatically whenever
the final image currently registered to be
monitored during loading becomes ready.
-
paintComponent(Graphics, Dimension, int, int, int)
- Paint the gauge.
-
processComponentEvent(ComponentEvent)
-
-
setBackgroundImage(Image)
- Specify the image to be tiled as the gauge background.
-
setBackgroundStyle(Background)
- Set the background to be drawn by this gauge prior
to each paint.
-
setChangeOverValue(int)
- Specify the value at which the gauge begins to display positive values.
-
setImageDeviation(int)
- Specify the limits of random deviation as a percentage of the stack width.
-
setImageOverlap(int)
- Specify the number of pixels by which the images overlap.
-
setNegativeImage(Image)
- Specify the positive image
-
setNegativeStackToFront(boolean)
- Specify whether the negative images are to be stacked away from or toward the changeOverValue.
-
setOrientation(int)
- Set the orientation for the gauge.
-
setPoints(Point[])
- Specify an array of points at which to place the images.
-
setPositiveImage(Image)
- Specify the image to represent positive values.
-
setPositiveStackToFront(boolean)
- Specify whether the positive images are to be stacked away from or toward the changeOverValue.
-
setRounding(int)
- Specify the rounding style using one of the appropriate constants.
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
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
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
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
IMAGE_NEAREST
public static final int IMAGE_NEAREST
- Round the number of images to be displayed to the nearest whole number.
- See Also:
- setRounding
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.
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.
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.
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.
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.
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.
copyright
public static String copyright()
- Copyright methond to ensure that short copyright string appears in the class file.
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class JComponent
addNotify
public void addNotify()
- Overrides:
- addNotify in class JComponent
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
processComponentEvent
public void processComponentEvent(ComponentEvent e)
- Overrides:
- processComponentEvent in class BaseGauge
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
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
setBackgroundStyle
public void setBackgroundStyle(Background background)
- Set the background to be drawn by this gauge prior
to each paint.
- Overrides:
- setBackgroundStyle in class BaseGauge
setBackgroundImage
public void setBackgroundImage(Image image)
- Specify the image to be tiled as the gauge background. Null removes any background image.
getBackgroundImage
public Image getBackgroundImage()
- Return the image tiled as the gauge backround
setPositiveImage
public void setPositiveImage(Image positiveImage)
- Specify the image to represent positive values.
getPositiveImage
public Image getPositiveImage()
- Return the image to represent positive values, or null if no image has been specified.
setNegativeImage
public void setNegativeImage(Image negativeImage)
- Specify the positive image
getNegativeImage
public Image getNegativeImage()
- Return the positive image.
setChangeOverValue
public void setChangeOverValue(int changeOverValue)
- Specify the value at which the gauge begins to display positive values.
getChangeOverValue
public int getChangeOverValue()
- Return the value at which the gauge begins to display positive values.
setPositiveStackToFront
public void setPositiveStackToFront(boolean stackToFront)
- Specify whether the positive images are to be stacked away from or toward the changeOverValue.
getPositiveStackToFront
public boolean getPositiveStackToFront()
- Return whether the positive images are to be stacked away from or toward the changeOverValue.
setNegativeStackToFront
public void setNegativeStackToFront(boolean stackToFront)
- Specify whether the negative images are to be stacked away from or toward the changeOverValue.
getNegativeStackToFront
public boolean getNegativeStackToFront()
- Return whether the negative images are to be stacked away from or toward the changeOverValue.
setImageOverlap
public void setImageOverlap(int imageOverlap)
- Specify the number of pixels by which the images overlap.
getImageOverlap
public int getImageOverlap()
- Return the number of pixels the images overlap
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.
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.
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
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
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.
getPoints
public Point[] getPoints()
- Return an array of points at which to place the images.
setOrientation
public void setOrientation(int orientation)
- Set the orientation for the gauge.
- Overrides:
- setOrientation in class BaseGauge
getRandomImageDeviation
public int getRandomImageDeviation(int imageWidth,
int imageDeviation)
paintComponent
public void paintComponent(Graphics g,
Dimension d,
int displayValue,
int minimum,
int maximum)
- Paint the gauge.
- Overrides:
- paintComponent in class BaseGauge
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