![]() |
Gridarta Editor
|
A View for choosing pickmaps. More...
Public Member Functions | |
void | addChangeListener (@NotNull final ChangeListener changeListener) |
Adds a ChangeListener to be notified when the selected pickmap tab changes. More... | |
Component | getPickmapPanel () |
Returns the JTabbedPane with all pickmaps. More... | |
int | getSelectedIndex () |
Returns the selected index. More... | |
void | newPickmap (@NotNull final Size2D mapSize, @NotNull final String pickmapName) throws DuplicatePickmapException, IOException |
Add a new pickmap. More... | |
PickmapChooserView (@NotNull final PickmapChooserModel< G, A, R > pickmapChooserModel, @NotNull final MapFolderTree< G, A, R > mapFolderTree, @NotNull final MapArchObjectFactory< A > mapArchObjectFactory, @NotNull final MapReaderFactory< G, A > mapReaderFactory, @NotNull final MapManager< G, A, R > pickmapManager) | |
Creates a new instance. More... | |
void | setPopupMenu (@NotNull final JPopupMenu popupMenu) |
Sets the popup menu to show. More... | |
Private Member Functions | |
void | addPickmap (@NotNull final PickmapState< G, A, R > pickmapState) |
Called when a new pickmap has been added to the model. More... | |
String | getTitle (@NotNull final PickmapState< G, A, R > pickmapState) |
Returns the title of a pickmap to use as the tab name. More... | |
void | removePickmap (@NotNull final PickmapState< G, A, R > pickmapState) |
Called when a pickmap has been removed from the model. More... | |
void | revertPickmap (@NotNull final PickmapState< G, A, R > pickmapState, @NotNull final MapControl< G, A, R > oldPickmap) |
Called when a pickmap in the model has been reverted. More... | |
void | setActivePickmap (@NotNull final PickmapState< G, A, R > pickmapState) |
Sets the active pickmap. More... | |
Static Private Attributes | |
static final Category | LOG = Logger.getLogger(PickmapChooserView.class) |
The Logger for printing log messages. More... | |
A View for choosing pickmaps.
Definition at line 58 of file PickmapChooserView.java.
net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.PickmapChooserView | ( | @NotNull final PickmapChooserModel< G, A, R > | pickmapChooserModel, |
@NotNull final MapFolderTree< G, A, R > | mapFolderTree, | ||
@NotNull final MapArchObjectFactory< A > | mapArchObjectFactory, | ||
@NotNull final MapReaderFactory< G, A > | mapReaderFactory, | ||
@NotNull final MapManager< G, A, R > | pickmapManager | ||
) |
Creates a new instance.
pickmapChooserModel | the attached pickmap chooser model |
mapFolderTree | the model to display |
mapArchObjectFactory | the map arch object factory instance |
mapReaderFactory | the map reader factory instance |
pickmapManager | the pickmap manager for loading pickmaps |
Definition at line 200 of file PickmapChooserView.java.
void net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addChangeListener | ( | @NotNull final ChangeListener | changeListener | ) |
Adds a ChangeListener to be notified when the selected pickmap tab changes.
changeListener | the listener to add |
Definition at line 228 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.PickmapChooserControl().
|
private |
Called when a new pickmap has been added to the model.
pickmapState | the pickmap |
Definition at line 236 of file PickmapChooserView.java.
Component net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getPickmapPanel | ( | ) |
Returns the JTabbedPane with all pickmaps.
Definition at line 305 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.getComponent().
int net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSelectedIndex | ( | ) |
Returns the selected index.
Definition at line 313 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.getSelectedPickmap().
|
private |
Returns the title of a pickmap to use as the tab name.
pickmapState | the pickmap |
Definition at line 293 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.addPickmap(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.revertPickmap().
void net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.newPickmap | ( | @NotNull final Size2D | mapSize, |
@NotNull final String | pickmapName | ||
) | throws DuplicatePickmapException, IOException |
Add a new pickmap.
mapSize | the pickmap size in squares |
pickmapName | the name of the pickmap |
IOException | if an I/O error occurs |
DuplicatePickmapException | if the pickmap name is not unique |
Definition at line 324 of file PickmapChooserView.java.
|
private |
Called when a pickmap has been removed from the model.
pickmapState | the pickmap |
Definition at line 253 of file PickmapChooserView.java.
|
private |
Called when a pickmap in the model has been reverted.
pickmapState | the pickmap |
oldPickmap | the map control before revert |
Definition at line 265 of file PickmapChooserView.java.
|
private |
Sets the active pickmap.
pickmapState | the pickmap |
Definition at line 279 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap().
void net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setPopupMenu | ( | @NotNull final JPopupMenu | popupMenu | ) |
Sets the popup menu to show.
popupMenu | the popup menu to use |
Definition at line 219 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.setPopupMenu().
|
private |
The last known active folder.
Definition at line 106 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap().
|
staticprivate |
The Logger for printing log messages.
Definition at line 64 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.addPickmap().
|
private |
The MapArchObjectFactory instance.
Definition at line 82 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView().
|
private |
The listener attached to activeMapFolder.
Definition at line 151 of file PickmapChooserView.java.
|
private |
The model to display.
Definition at line 76 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView().
|
private |
The listener attached to mapFolderTree.
Definition at line 112 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView().
|
private |
The map reader factory instance.
Definition at line 88 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView().
|
private |
The attached PickmapChooserModel.
Definition at line 70 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.addPickmap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.removePickmap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.revertPickmap(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.setActivePickmap().
|
private |
The PickmapChooserModelListener attached to {} to detect modified pickmaps.
Definition at line 175 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView().
|
private |
The MapManager instance for loading pickmaps.
Definition at line 94 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView().
|
private |
Panel with pickmaps.
Definition at line 100 of file PickmapChooserView.java.
Referenced by net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.addChangeListener(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.addPickmap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.getPickmapPanel(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.getSelectedIndex(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.PickmapChooserView(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.removePickmap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.revertPickmap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.setActivePickmap(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.setPopupMenu().