public class ArchetypeChooserPanel<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
implements java.io.Serializable
ArchetypeChooserModel
. A panel consists of a
set of ArchetypeChooserFolders
. One panel is
selected at any time.Constructor and Description |
---|
ArchetypeChooserPanel(@NotNull java.lang.String name)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addArchetype(@NotNull java.lang.String folder,
R archetype)
Adds an
Archetype to this panel. |
void |
addArchetypeChooserPanelListener(@NotNull ArchetypeChooserPanelListener<G,A,R> listener)
Adds a listener to be notified of changes.
|
@NotNull ArchetypeChooserFolder<G,A,R> |
getDefaultFolder()
Returns the default
ArchetypeChooserFolder that contains all
Archetypes of all folders. |
@NotNull java.util.List<ArchetypeChooserFolder<G,A,R>> |
getFolders()
Returns the
ArchetypeChooserFolders . |
@NotNull java.lang.String |
getName()
Returns the panel name.
|
@NotNull ArchetypeChooserFolder<G,A,R> |
getSelectedFolder()
Returns the selected
ArchetypeChooserFolder . |
void |
removeArchetypeChooserPanelListener(@NotNull ArchetypeChooserPanelListener<G,A,R> listener)
Removes a listener to be notified of changes.
|
void |
setSelectedFolder(@NotNull ArchetypeChooserFolder<G,A,R> selectedFolder)
Sets the selected
ArchetypeChooserFolder . |
public ArchetypeChooserPanel(@NotNull @NotNull java.lang.String name)
name
- the panel namepublic void addArchetypeChooserPanelListener(@NotNull @NotNull ArchetypeChooserPanelListener<G,A,R> listener)
listener
- the listenerpublic void removeArchetypeChooserPanelListener(@NotNull @NotNull ArchetypeChooserPanelListener<G,A,R> listener)
listener
- the listener@NotNull public @NotNull java.lang.String getName()
@NotNull public @NotNull java.util.List<ArchetypeChooserFolder<G,A,R>> getFolders()
ArchetypeChooserFolders
.public void addArchetype(@NotNull @NotNull java.lang.String folder, @NotNull R archetype)
Archetype
to this panel.folder
- the folder name to add toarchetype
- the archetype to add@NotNull public @NotNull ArchetypeChooserFolder<G,A,R> getDefaultFolder()
ArchetypeChooserFolder
that contains all
Archetypes
of all folders.@NotNull public @NotNull ArchetypeChooserFolder<G,A,R> getSelectedFolder()
ArchetypeChooserFolder
.public void setSelectedFolder(@NotNull @NotNull ArchetypeChooserFolder<G,A,R> selectedFolder)
ArchetypeChooserFolder
.selectedFolder
- the selected folder