Package net.sf.gridarta.plugin.parameter
Class AbstractPluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V>
- java.lang.Object
-
- net.sf.gridarta.plugin.parameter.AbstractPluginParameter<G,A,R,V>
-
- All Implemented Interfaces:
PluginParameter<G,A,R,V>
- Direct Known Subclasses:
AbstractStringPluginParameter,AbstractValuePluginParameter
public abstract class AbstractPluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V> extends java.lang.Object implements PluginParameter<G,A,R,V>
Parameter for a Plugin.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPluginParameter()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPluginParameterListener(@NotNull PluginParameterListener listener)Adds alistenerto be notified.protected voidchanged()Notifies all listeners that this plugin parameter has changed.@NotNull java.lang.StringgetDescription()The user-provided description of the value for the user interface.@NotNull java.lang.StringgetName()The name of the parameter.voidremovePluginParameterListener(@NotNull PluginParameterListener listener)Removes alistenerto be notified.voidsetDescription(@NotNull java.lang.String description)Sets the user-provided description of the value for the user interface.voidsetName(@NotNull java.lang.String name)Sets the name of the parameter.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.gridarta.plugin.parameter.PluginParameter
getParameterType, getStringValue, getValue, getValueOrNull, setStringValue, visit
-
-
-
-
Method Detail
-
addPluginParameterListener
public void addPluginParameterListener(@NotNull @NotNull PluginParameterListener listener)Description copied from interface:PluginParameterAdds alistenerto be notified.- Specified by:
addPluginParameterListenerin interfacePluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V>- Parameters:
listener- the listener
-
removePluginParameterListener
public void removePluginParameterListener(@NotNull @NotNull PluginParameterListener listener)Description copied from interface:PluginParameterRemoves alistenerto be notified.- Specified by:
removePluginParameterListenerin interfacePluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V>- Parameters:
listener- the listener
-
getName
@NotNull public @NotNull java.lang.String getName()
Description copied from interface:PluginParameterThe name of the parameter. It identifies the parameter in the user interface and from the plugin script code.
-
setName
public void setName(@NotNull @NotNull java.lang.String name)Description copied from interface:PluginParameterSets the name of the parameter. It identifies the parameter in the user interface and from the plugin script code.
-
getDescription
@NotNull public @NotNull java.lang.String getDescription()
Description copied from interface:PluginParameterThe user-provided description of the value for the user interface.- Specified by:
getDescriptionin interfacePluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V>- Returns:
- the description
-
setDescription
public void setDescription(@NotNull @NotNull java.lang.String description)Description copied from interface:PluginParameterSets the user-provided description of the value for the user interface.- Specified by:
setDescriptionin interfacePluginParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,V>- Parameters:
description- the description
-
changed
protected void changed()
Notifies all listeners that this plugin parameter has changed.
-
-