public class MainActions<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction, MapViewManagerListener<G,A,R>
Constructor and Description |
---|
MainActions(FindDialogManager<G,A,R> findDialogManager,
ReplaceDialogManager<G,A,R> replaceDialogManager,
javax.swing.JFrame parent,
MapViewSettings mapViewSettings,
ArchetypeSet<G,A,R> archetypeSet,
CopyBuffer<G,A,R> copyBuffer,
ObjectChooser<G,A,R> objectChooser,
MapManager<G,A,R> mapManager,
InsertionModeSet<G,A,R> insertionModeSet)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activeMapViewChanged(MapView<G,A,R> mapView)
This event handler is called when the current map view has changed.
|
void |
clear()
"Clear" was selected from the Edit menu.
|
void |
copy()
"Copy" was selected from the Edit menu.
|
void |
cut()
"Cut" was selected from the Edit menu.
|
void |
expandEmptySelection()
Invoked when the user wants to expand the selection of empty map squares
to surrounding empty map squares.
|
void |
fillAbove()
"Fill above" was selected from the Edit menu.
|
void |
fillAuto()
"Fill" was selected from the Edit menu.
|
void |
fillBelow()
"Fill below" was selected from the Edit menu.
|
void |
find()
"Find" was selected from the Edit menu.
|
void |
findNext()
"Find next" was selected from the Edit menu.
|
void |
findPrev()
"Find previous" was selected from the Edit menu.
|
void |
floodFill()
"Flood fill" was selected from the Edit menu.
|
void |
invertSelection()
Invoked when the user wants to invert all selected squares from a map.
|
void |
mapViewClosing(MapView<G,A,R> mapView)
This event handler is called when a map view is to be closed.
|
void |
mapViewCreated(MapView<G,A,R> mapView)
This event handler is called when a map view was created.
|
void |
massChange()
"Mass change" was selected from the Edit menu.
|
void |
paste()
"Paste" was selected from the Edit menu.
|
void |
pasteTiled()
"Paste Tiled" was selected from the Edit menu.
|
void |
randFillAbove()
"Random fill above" was selected from the Edit menu.
|
void |
randFillAuto()
"Random fill" was selected from the Edit menu.
|
void |
randFillBelow()
"Random fill below" was selected from the Edit menu.
|
void |
replace()
"Replace" was selected from the Edit menu.
|
void |
selectAll()
Invoked when the user wants to select all squares from a map.
|
void |
setAction(javax.swing.Action action,
java.lang.String name)
Sets the
Action instance for this editor action. |
void |
shiftEast()
"Shift East" was selected from the Edit menu.
|
void |
shiftNorth()
"Shift North" was selected from the Edit menu.
|
void |
shiftNorthEast()
"Shift North East" was selected from the Edit menu.
|
void |
shiftNorthWest()
"Shift North West" was selected from the Edit menu.
|
void |
shiftSouth()
"Shift South" was selected from the Edit menu.
|
void |
shiftSouthEast()
"Shift South East" was selected from the Edit menu.
|
void |
shiftSouthWest()
"Shift South West" was selected from the Edit menu.
|
void |
shiftWest()
"Shift West" was selected from the Edit menu.
|
void |
tileStretchingClear()
Invoked when the user wants to clear tile stretching on the selected map
squares.
|
void |
tileStretchingDecrease()
Invoked when the user wants to decrease tile stretching on the selected
map squares.
|
void |
tileStretchingIncrease()
Invoked when the user wants to increase tile stretching on the selected
map squares.
|
void |
tileStretchingSet()
Invoked when the user wants to set tile stretching on the selected map
squares.
|
public MainActions(@NotNull FindDialogManager<G,A,R> findDialogManager, @NotNull ReplaceDialogManager<G,A,R> replaceDialogManager, @NotNull javax.swing.JFrame parent, @NotNull MapViewSettings mapViewSettings, @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull CopyBuffer<G,A,R> copyBuffer, @NotNull ObjectChooser<G,A,R> objectChooser, @NotNull MapManager<G,A,R> mapManager, @NotNull InsertionModeSet<G,A,R> insertionModeSet)
findDialogManager
- the find dialog manager to usereplaceDialogManager
- the replace dialog manager to useparent
- the parent component for dialog windowsmapViewSettings
- the map view settings instancearchetypeSet
- the archetype setcopyBuffer
- the copy buffer instanceobjectChooser
- the animation objects instance to usemapManager
- the map manager instanceinsertionModeSet
- the insertion mode set to use@ActionMethod public void clear()
@ActionMethod public void cut()
@ActionMethod public void copy()
@ActionMethod public void paste()
@ActionMethod public void pasteTiled()
@ActionMethod public void shiftNorth()
@ActionMethod public void shiftNorthEast()
@ActionMethod public void shiftEast()
@ActionMethod public void shiftSouthEast()
@ActionMethod public void shiftSouth()
@ActionMethod public void shiftSouthWest()
@ActionMethod public void shiftWest()
@ActionMethod public void shiftNorthWest()
@ActionMethod public void find()
@ActionMethod public void findNext()
@ActionMethod public void findPrev()
@ActionMethod public void replace()
@ActionMethod public void fillAuto()
@ActionMethod public void fillAbove()
@ActionMethod public void fillBelow()
@ActionMethod public void randFillAuto()
@ActionMethod public void randFillAbove()
@ActionMethod public void randFillBelow()
@ActionMethod public void floodFill()
@ActionMethod public void massChange()
@ActionMethod public void selectAll()
@ActionMethod public void invertSelection()
@ActionMethod public void expandEmptySelection()
@ActionMethod public void tileStretchingSet()
@ActionMethod public void tileStretchingClear()
@ActionMethod public void tileStretchingIncrease()
@ActionMethod public void tileStretchingDecrease()
public void setAction(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
Action
instance for this editor action.setAction
in interface EditorAction
action
- the action instancename
- the name of the actionpublic void activeMapViewChanged(@Nullable MapView<G,A,R> mapView)
activeMapViewChanged
in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
mapView
- the new map view or null
if no opened map view
existspublic void mapViewCreated(@NotNull MapView<G,A,R> mapView)
mapViewCreated
in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
mapView
- the created map viewpublic void mapViewClosing(@NotNull MapView<G,A,R> mapView)
mapViewClosing
in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
mapView
- the map view that is to be closed