public class PickmapChooserView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
| Constructor and Description |
|---|
PickmapChooserView(@NotNull PickmapChooserModel<G,A,R> pickmapChooserModel,
@NotNull MapFolderTree<G,A,R> mapFolderTree,
@NotNull MapArchObjectFactory<A> mapArchObjectFactory,
@NotNull MapReaderFactory<G,A> mapReaderFactory,
@NotNull MapManager<G,A,R> pickmapManager)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(@NotNull javax.swing.event.ChangeListener changeListener)
Adds a
ChangeListener to be notified when the selected pickmap
tab changes. |
@NotNull java.awt.Component |
getPickmapPanel()
Returns the
JTabbedPane with all pickmaps. |
int |
getSelectedIndex()
Returns the selected index.
|
void |
newPickmap(@NotNull Size2D mapSize,
@NotNull java.lang.String pickmapName)
Add a new pickmap.
|
void |
setPopupMenu(@NotNull javax.swing.JPopupMenu popupMenu)
Sets the popup menu to show.
|
public PickmapChooserView(@NotNull
@NotNull PickmapChooserModel<G,A,R> pickmapChooserModel,
@NotNull
@NotNull MapFolderTree<G,A,R> mapFolderTree,
@NotNull
@NotNull MapArchObjectFactory<A> mapArchObjectFactory,
@NotNull
@NotNull MapReaderFactory<G,A> mapReaderFactory,
@NotNull
@NotNull MapManager<G,A,R> pickmapManager)
pickmapChooserModel - the attached pickmap chooser modelmapFolderTree - the model to displaymapArchObjectFactory - the map arch object factory instancemapReaderFactory - the map reader factory instancepickmapManager - the pickmap manager for loading pickmapspublic void setPopupMenu(@NotNull
@NotNull javax.swing.JPopupMenu popupMenu)
popupMenu - the popup menu to usepublic void addChangeListener(@NotNull
@NotNull javax.swing.event.ChangeListener changeListener)
ChangeListener to be notified when the selected pickmap
tab changes.changeListener - the listener to add@NotNull public @NotNull java.awt.Component getPickmapPanel()
JTabbedPane with all pickmaps.JTabbedPane with all pickmapspublic int getSelectedIndex()
public void newPickmap(@NotNull
@NotNull Size2D mapSize,
@NotNull
@NotNull java.lang.String pickmapName)
throws DuplicatePickmapException,
java.io.IOException
mapSize - the pickmap size in squarespickmapName - the name of the pickmapjava.io.IOException - if an I/O error occursDuplicatePickmapException - if the pickmap name is not unique