All Packages Class Hierarchy This Package Previous Next Index
Class guinea.ui.VolumeGradeBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----guinea.ui.GradeBar
|
+----guinea.ui.VolumeGradeBar
- public class VolumeGradeBar
- extends GradeBar
The VolumeGradeBar is an extension to the normal
grader bar which given numbers as answers. This version gives
Volume objects as answers by converting graderbar's numeric
answers to Volume type.
Variable Index
- ·
scale
- The volume scale type to use.
- ·
useNumberFormat
- Use number format for formatting the level.
Constructor Index
- ·
VolumeGradeBar()
-
Method Index
- ·
formatMessage(Object)
- Format the current grade to string for displaying
grade/adjective below the scrollbar.
- ·
getAnswer_internal()
- Convert the Number value the GradeBar normally uses to a
Volume object in selected volume scale type.
- ·
getVolumeScaleType()
- Get the volume scale type used in this component.
- ·
propertyLoad(Properties, String)
-
- ·
setAnswer(Object)
- Set answer of question.
- ·
setVolumeScaleType(int)
- Set the volume scale type used in this component.
Variables
·
scale
protected int scale
- The volume scale type to use. Default is VOLUME_DECIBEL.
- See Also:
- Volume
·
useNumberFormat
protected boolean useNumberFormat
- Use number format for formatting the level. It is necessary
if adjectives are wanted with scale. Default if
false
, Volume object is used.
Constructors
·
VolumeGradeBar
public VolumeGradeBar()
Methods
·
setVolumeScaleType
public void setVolumeScaleType(int scale)
- Set the volume scale type used in this component.
- Parameters:
- scale - The volume scale type.
- See Also:
- Volume
·
getVolumeScaleType
public int getVolumeScaleType()
- Get the volume scale type used in this component.
- Returns:
- A volume scale type.
- See Also:
- Volume
·
getAnswer_internal
protected Object getAnswer_internal()
- Convert the Number value the GradeBar normally uses to a
Volume object in selected volume scale type.
- Returns:
- A volume object.
- Overrides:
- getAnswer_internal in class GradeBar
- See Also:
- scale, Volume
·
setAnswer
public void setAnswer(Object answer)
- Set answer of question. If the answer is a Volume object, it
is converted to a Number using the selected scale.
- Parameters:
- answer - The answer as a
guinea.player.Volume
. A
java.lang.Number
and a null
are also
possible.
- Overrides:
- setAnswer in class GradeBar
- See Also:
- scale
·
formatMessage
protected String formatMessage(Object value)
- Format the current grade to string for displaying
grade/adjective below the scrollbar.
- Parameters:
- value - The value to format.
- Overrides:
- formatMessage in class GradeBar
·
propertyLoad
public void propertyLoad(Properties p,
String name) throws IllegalArgumentException
- Overrides:
- propertyLoad in class GradeBar
All Packages Class Hierarchy This Package Previous Next Index