Package adams.gui.flow.tree
Class ActorTemplateSuggestion
- java.lang.Object
-
- adams.gui.flow.tree.ActorTemplateSuggestion
-
public class ActorTemplateSuggestion extends Object
Class for suggesting actor templates when editing a flow, depending on the context.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILENAME
the name of the props file.static String
KEY_DEFAULT
the key for the default actor.protected AbstractActorTemplate[]
m_Defaults
the default actor(s).protected Properties
m_Properties
the properties with the rules.protected String[]
m_Rules
the valid rules.protected static ActorTemplateSuggestion
m_Singleton
the singleton.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractActorTemplate[]
getDefaults()
Returns the available default actor templates.static ActorTemplateSuggestion
getSingleton()
Returns the singleton instance for suggesting actor templates.protected void
initialize()
Initializes the rules engine for proposing actor templates.AbstractActorTemplate[]
suggest(Actor parent, int position, Actor[] actors)
Returns the suggested actor templates.
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
the name of the props file.- See Also:
- Constant Field Values
-
KEY_DEFAULT
public static final String KEY_DEFAULT
the key for the default actor.- See Also:
- Constant Field Values
-
m_Properties
protected Properties m_Properties
the properties with the rules.
-
m_Defaults
protected AbstractActorTemplate[] m_Defaults
the default actor(s).
-
m_Rules
protected String[] m_Rules
the valid rules.
-
m_Singleton
protected static ActorTemplateSuggestion m_Singleton
the singleton.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the rules engine for proposing actor templates.
-
getDefaults
public AbstractActorTemplate[] getDefaults()
Returns the available default actor templates.- Returns:
- the default actor templates
-
suggest
public AbstractActorTemplate[] suggest(Actor parent, int position, Actor[] actors)
Returns the suggested actor templates.- Parameters:
parent
- the parent of the actor to suggestposition
- the position of the actor template to insert in the actorsactors
- the actors to insert the suggested actor template in- Returns:
- the suggested actor templates
-
getSingleton
public static ActorTemplateSuggestion getSingleton()
Returns the singleton instance for suggesting actor templates.- Returns:
- the singleton
-
-