|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.font.effects.EffectUtil
public class EffectUtil
Provides utility methods for effects.
Constructor Summary | |
---|---|
EffectUtil()
|
Method Summary | |
---|---|
static ConfigurableEffect.Value |
booleanValue(java.lang.String name,
boolean currentValue,
java.lang.String description)
Prompts the user for boolean value |
static ConfigurableEffect.Value |
colorValue(java.lang.String name,
java.awt.Color currentValue)
Prompts the user for a colour value |
static ConfigurableEffect.Value |
floatValue(java.lang.String name,
float currentValue,
float min,
float max,
java.lang.String description)
Prompts the user for float value |
static java.awt.Color |
fromString(java.lang.String rgb)
Converts a string to a color. |
static java.awt.image.BufferedImage |
getScratchImage()
Returns an image that can be used by effects as a temp image. |
static ConfigurableEffect.Value |
intValue(java.lang.String name,
int currentValue,
java.lang.String description)
Prompts the user for int value |
static ConfigurableEffect.Value |
optionValue(java.lang.String name,
java.lang.String currentValue,
java.lang.String[][] options,
java.lang.String description)
Prompts the user for a value that represents a fixed number of options. |
static java.lang.String |
toString(java.awt.Color color)
Convers a color to a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EffectUtil()
Method Detail |
---|
public static java.awt.image.BufferedImage getScratchImage()
public static ConfigurableEffect.Value colorValue(java.lang.String name, java.awt.Color currentValue)
name
- Thename of the value being configuredcurrentValue
- The default value that should be selected
public static ConfigurableEffect.Value intValue(java.lang.String name, int currentValue, java.lang.String description)
name
- The name of the dialog to showcurrentValue
- The current value to be displayeddescription
- The help text to provide
public static ConfigurableEffect.Value floatValue(java.lang.String name, float currentValue, float min, float max, java.lang.String description)
name
- The name of the dialog to showcurrentValue
- The current value to be displayeddescription
- The help text to providemin
- The minimum value to allowmax
- The maximum value to allow
public static ConfigurableEffect.Value booleanValue(java.lang.String name, boolean currentValue, java.lang.String description)
name
- The name of the dialog to showcurrentValue
- The current value to be displayeddescription
- The help text to provide
public static ConfigurableEffect.Value optionValue(java.lang.String name, java.lang.String currentValue, java.lang.String[][] options, java.lang.String description)
options
- The first array has an entry for each option. Each entry is either a String[1] that is both the display value
and actual value, or a String[2] whose first element is the display value and second element is the actual value.name
- The name of the value being prompted forcurrentValue
- The current value to show as defaultdescription
- The description of the value
public static java.lang.String toString(java.awt.Color color)
color
- The color to encode to a string
public static java.awt.Color fromString(java.lang.String rgb)
rgb
- The string encoding the colour
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |