|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphic
ilog.views.graphic.IlvScale
public abstract class IlvScale
IlvScale is an abstract class from which
all instances of scale object classes are derived. This class
manages the basic information concerning scales.
| Constructor Summary | |
|---|---|
IlvScale(IlvInputStream stream)
Reads the object from an IlvInputStream. |
|
IlvScale(IlvRect rect,
int numberOfSteps,
int numberOfSubSteps,
float stepSize,
float subStepSize,
float min,
float max,
String format)
Creates a new scale by specifying a minimum and maximum value for the labels. |
|
IlvScale(IlvRect rect,
String[] labels,
int numberOfSubSteps,
float stepSize,
float subStepSize)
Creates a new scale by specifying the labels. |
|
IlvScale(IlvScale source)
Creates a new IlvScale by copying an existing one. |
|
| Method Summary | |
|---|---|
void |
applyTransform(IlvTransformer t)
Applies a transformation to the shape of the object. |
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of the object. |
Font |
getFont()
Returns the font of the object. |
Color |
getForeground()
Returns the color of the IlvScale. |
String |
getFormat()
Returns the format used to display numeric labels. |
String[] |
getLabels()
Returns the labels of the scale. |
float |
getMax()
Returns the maximum value displayed as a label of the scale. |
float |
getMin()
Returns the minimum value displayed as a label of the scale. |
int |
getNumberOfSteps()
Returns the number of major steps for this scale. |
int |
getNumberOfSubSteps()
Returns the number of minor steps for this scale. |
float |
getStepSize()
Returns the size of a major tick mark. |
float |
getSubStepSize()
Returns the size of a minor tick mark. |
boolean |
isAntialiasing()
Returns true if the anti-aliasing mode
of the labels is on. |
void |
setAntialiasing(boolean set)
Changes the anti-aliasing mode of the labels. |
void |
setFont(Font font)
Changes the font of the object. |
void |
setForeground(Color color)
Changes the color of the IlvScale. |
void |
setFormat(String format)
Changes the format used to display numeric labels. |
void |
setLabel(int index,
String label)
Changes the specified label of the scale. |
void |
setLabels(String[] labels)
Changes all labels of the scale. |
void |
setMax(float max)
Changes the maximum value displayed as a label of the scale. |
void |
setMin(float min)
Changes the minimum value displayed as a label of the scale. |
void |
setNumberOfSteps(int steps)
Changes the number of major steps for this scale. |
void |
setNumberOfSubSteps(int substeps)
Changes the number of minor steps for this scale. |
void |
setStepSize(float stepSize)
Changes the size of a major tick mark. |
void |
setSubStepSize(float subStepSize)
Changes the size of a minor tick mark. |
void |
write(IlvOutputStream stream)
Writes the object to an IlvOutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IlvScale(IlvRect rect,
int numberOfSteps,
int numberOfSubSteps,
float stepSize,
float subStepSize,
float min,
float max,
String format)
rect - the location and size of the scale.numberOfSteps - the number of major steps.numberOfSubSteps - the number of minor steps displayed between major steps.stepSize - the size of the major tick mark.subStepSize - the size of the minor tick mark.min - the minimum value of the labels of the scale.max - the maximum value of the labels of the scale.format - a format used to display
the labels of the scale. (See the class
java.text.DecimalFormat
for a description of this parameter.)
public IlvScale(IlvRect rect,
String[] labels,
int numberOfSubSteps,
float stepSize,
float subStepSize)
rect - the location and size of the scale.labels - the labels of the scale.numberOfSubSteps - the number of minor steps displayed between major steps.stepSize - the size of the major tick mark.subStepSize - the size of the minor tick mark.public IlvScale(IlvScale source)
IlvScale by copying an existing one.
source - the origin object for the copy.
public IlvScale(IlvInputStream stream)
throws IlvReadFileException
IlvInputStream.
stream - the input stream.
IlvReadFileException - if the format is not correct.| Method Detail |
|---|
public final int getNumberOfSteps()
public final void setNumberOfSteps(int steps)
public final int getNumberOfSubSteps()
public final void setNumberOfSubSteps(int substeps)
public final float getStepSize()
public final void setStepSize(float stepSize)
public final float getSubStepSize()
public final void setSubStepSize(float subStepSize)
public final float getMin()
setLabels method.
getMax()public final void setMin(float min)
setMax(float)public final float getMax()
setLabels method.
getMin()public final void setMax(float max)
setMin(float)public final String getFormat()
min and
max),
the labels are computed using this format. The format
is a decimal format as described in the class
java.text.DecimalFormat.
public final void setFormat(String format)
min
and max),
the labels are computed using this format. The format
is a decimal format as described in the class
java.text.DecimalFormat. Changing the format
may change the bounding box of the object.
public void setFont(Font font)
setFont in interface IlvFontInterfacefont - the new font.public Font getFont()
getFont in interface IlvFontInterfacepublic final boolean isAntialiasing()
true if the anti-aliasing mode
of the labels is on.
Note that Anti-aliasing works only with Java 1.2.
public final void setAntialiasing(boolean set)
public final String[] getLabels()
public void setLabels(String[] labels)
labels - the new labels.
public void setLabel(int index,
String label)
index - the index of the label to change.label - the new label.public IlvRect boundingBox(IlvTransformer t)
boundingBox in class IlvGraphict - The transformer used to draw the object.IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic void applyTransform(IlvTransformer t)
applyTransform in class IlvGraphict - The transformer to be applied.IlvGraphicpublic void setForeground(Color color)
IlvScale.
setForeground in class IlvGraphiccolor - the new color.IlvGraphic.draw(Graphics, IlvTransformer),
IlvGraphic.setBackground(Color),
IlvGraphic.setFillOn(boolean),
IlvGraphic.setStrokeOn(boolean),
IlvGraphicpublic Color getForeground()
IlvScale.
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
Note that even if this is a public method, you should not
call it directly, you should use the write
methods of the manager.
write in interface IlvPersistentObjectwrite in class IlvGraphicstream - The output stream.
IOException - thrown when an exception occurs during
the write operation for this object.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||