Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.newdawn.slick.font.effects
Class EffectUtil

    java.lang.Object
      org.newdawn.slick.font.effects.EffectUtil

    public class EffectUtil

extends java.lang.Object

Provides utility methods for effects.

Author:
  Nathan Sweet

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

### EffectUtil

    public EffectUtil()

Method Detail

### getScratchImage

    public static java.awt.image.BufferedImage getScratchImage()

  Returns an image that can be used by effects as a temp image.

  Returns:
    The scratch image used for temporary operations

### colorValue

    public static ConfigurableEffect.Value colorValue(java.lang.String name,
                                                      java.awt.Color currentValue)

  Prompts the user for a colour value

  Parameters:
    `name` - Thename of the value being configured
    `currentValue` - The default value that should be selected
  Returns:
    The value selected

### intValue

    public static ConfigurableEffect.Value intValue(java.lang.String name,
                                                    int currentValue,
                                                    java.lang.String description)

  Prompts the user for int value

  Parameters:
    `name` - The name of the dialog to show
    `currentValue` - The current value to be displayed
    `description` - The help text to provide
  Returns:
    The value selected by the user

### floatValue

    public static ConfigurableEffect.Value floatValue(java.lang.String name,
                                                      float currentValue,
                                                      float min,
                                                      float max,
                                                      java.lang.String description)

  Prompts the user for float value

  Parameters:
    `name` - The name of the dialog to show
    `currentValue` - The current value to be displayed
    `description` - The help text to provide
    `min` - The minimum value to allow
    `max` - The maximum value to allow
  Returns:
    The value selected by the user

### booleanValue

    public static ConfigurableEffect.Value booleanValue(java.lang.String name,
                                                        boolean currentValue,
                                                        java.lang.String description)

  Prompts the user for boolean value

  Parameters:
    `name` - The name of the dialog to show
    `currentValue` - The current value to be displayed
    `description` - The help text to provide
  Returns:
    The value selected by the user

### optionValue

    public 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. All options are strings.

  Parameters:
    `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 for
    `currentValue` - The current value to show as default
    `description` - The description of the value
  Returns:
    The value selected by the user

### toString

    public static java.lang.String toString(java.awt.Color color)

  Convers a color to a string.

  Parameters:
    `color` - The color to encode to a string
  Returns:
    The colour as a string

### fromString

    public static java.awt.Color fromString(java.lang.String rgb)

  Converts a string to a color.

  Parameters:
    `rgb` - The string encoding the colour
  Returns:
    The colour represented by the given encoded string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 New Dawn Software. All Rights Reserved.