1 2 package org.newdawn.slick.font.effects; 3 4 import javax.annotation.Nonnull; 5 import java.util.List; 6 7 /** 8 * An effect that has a number of configuration values. This allows the effect to be configured in the Hiero GUI and to be saved 9 * and loaded to and from a file. 10 * 11 * @author Nathan Sweet <misc@n4te.com> 12 */ 13 public interface ConfigurableEffect extends Effect { 14 /** 15 * Returns the list of {@link Value}s for this effect. This list is not typically backed by the effect, so changes to the 16 * values will not take affect until {@link #setValues(List)} is called. 17 */ 18 @Nonnull 19 public List<Value> getValues(); 20 21 /** 22 * Sets the list of {@link Value}s for this effect. 23 */ 24 public void setValues(List<Value> values); 25 26 /** 27 * Represents a configurable value for an effect. 28 */ 29 static public interface Value { 30 /** 31 * Returns the name of the value. 32 */ 33 public String getName (); 34 35 /** 36 * Sets the string representation of the value. 37 */ 38 public void setString (String value); 39 40 /** 41 * Gets the string representation of the value. 42 */ 43 public String getString (); 44 45 /** 46 * Gets the object representation of the value. 47 */ 48 public Object getObject (); 49 50 /** 51 * Shows a dialog allowing a user to configure this value. 52 */ 53 public void showDialog (); 54 } 55 }