Package net.sf.gridarta.mainactions
Class MainActions<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.mainactions.MainActions<G,A,R>
-
- All Implemented Interfaces:
MapViewManagerListener<G,A,R>,EditorAction
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>
Encapsulates actions and related functions.
-
-
Constructor Summary
Constructors Constructor Description 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)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactiveMapViewChanged(@Nullable MapView<G,A,R> mapView)This event handler is called when the current map view has changed.voidclear()"Clear" was selected from the Edit menu.voidcopy()"Copy" was selected from the Edit menu.voidcut()"Cut" was selected from the Edit menu.voidexpandEmptySelection()Invoked when the user wants to expand the selection of empty map squares to surrounding empty map squares.voidfillAbove()"Fill above" was selected from the Edit menu.voidfillAuto()"Fill" was selected from the Edit menu.voidfillBelow()"Fill below" was selected from the Edit menu.voidfind()"Find" was selected from the Edit menu.voidfindNext()"Find next" was selected from the Edit menu.voidfindPrev()"Find previous" was selected from the Edit menu.voidfloodFill()"Flood fill" was selected from the Edit menu.voidinvertSelection()Invoked when the user wants to invert all selected squares from a map.voidmapViewClosing(@NotNull MapView<G,A,R> mapView)This event handler is called when a map view is to be closed.voidmapViewCreated(@NotNull MapView<G,A,R> mapView)This event handler is called when a map view was created.voidmassChange()"Mass change" was selected from the Edit menu.voidpaste()"Paste" was selected from the Edit menu.voidpasteTiled()"Paste Tiled" was selected from the Edit menu.voidrandFillAbove()"Random fill above" was selected from the Edit menu.voidrandFillAuto()"Random fill" was selected from the Edit menu.voidrandFillBelow()"Random fill below" was selected from the Edit menu.voidreplace()"Replace" was selected from the Edit menu.voidselectAll()Invoked when the user wants to select all squares from a map.voidsetAction(@NotNull javax.swing.Action action, @NotNull java.lang.String name)Sets theActioninstance for this editor action.voidshiftEast()"Shift East" was selected from the Edit menu.voidshiftNorth()"Shift North" was selected from the Edit menu.voidshiftNorthEast()"Shift North East" was selected from the Edit menu.voidshiftNorthWest()"Shift North West" was selected from the Edit menu.voidshiftSouth()"Shift South" was selected from the Edit menu.voidshiftSouthEast()"Shift South East" was selected from the Edit menu.voidshiftSouthWest()"Shift South West" was selected from the Edit menu.voidshiftWest()"Shift West" was selected from the Edit menu.voidtileStretchingClear()Invoked when the user wants to clear tile stretching on the selected map squares.voidtileStretchingDecrease()Invoked when the user wants to decrease tile stretching on the selected map squares.voidtileStretchingIncrease()Invoked when the user wants to increase tile stretching on the selected map squares.voidtileStretchingSet()Invoked when the user wants to set tile stretching on the selected map squares.
-
-
-
Constructor Detail
-
MainActions
public MainActions(@NotNull @NotNull FindDialogManager<G,A,R> findDialogManager, @NotNull @NotNull ReplaceDialogManager<G,A,R> replaceDialogManager, @NotNull @NotNull javax.swing.JFrame parent, @NotNull @NotNull MapViewSettings mapViewSettings, @NotNull @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull @NotNull CopyBuffer<G,A,R> copyBuffer, @NotNull @NotNull ObjectChooser<G,A,R> objectChooser, @NotNull @NotNull MapManager<G,A,R> mapManager, @NotNull @NotNull InsertionModeSet<G,A,R> insertionModeSet)Creates a new instance.- Parameters:
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
-
-
Method Detail
-
clear
@ActionMethod public void clear()
"Clear" was selected from the Edit menu.
-
cut
@ActionMethod public void cut()
"Cut" was selected from the Edit menu.
-
copy
@ActionMethod public void copy()
"Copy" was selected from the Edit menu.
-
paste
@ActionMethod public void paste()
"Paste" was selected from the Edit menu.
-
pasteTiled
@ActionMethod public void pasteTiled()
"Paste Tiled" was selected from the Edit menu.
-
shiftNorth
@ActionMethod public void shiftNorth()
"Shift North" was selected from the Edit menu.
-
shiftNorthEast
@ActionMethod public void shiftNorthEast()
"Shift North East" was selected from the Edit menu.
-
shiftEast
@ActionMethod public void shiftEast()
"Shift East" was selected from the Edit menu.
-
shiftSouthEast
@ActionMethod public void shiftSouthEast()
"Shift South East" was selected from the Edit menu.
-
shiftSouth
@ActionMethod public void shiftSouth()
"Shift South" was selected from the Edit menu.
-
shiftSouthWest
@ActionMethod public void shiftSouthWest()
"Shift South West" was selected from the Edit menu.
-
shiftWest
@ActionMethod public void shiftWest()
"Shift West" was selected from the Edit menu.
-
shiftNorthWest
@ActionMethod public void shiftNorthWest()
"Shift North West" was selected from the Edit menu.
-
find
@ActionMethod public void find()
"Find" was selected from the Edit menu.
-
findNext
@ActionMethod public void findNext()
"Find next" was selected from the Edit menu.
-
findPrev
@ActionMethod public void findPrev()
"Find previous" was selected from the Edit menu.
-
replace
@ActionMethod public void replace()
"Replace" was selected from the Edit menu.
-
fillAuto
@ActionMethod public void fillAuto()
"Fill" was selected from the Edit menu.
-
fillAbove
@ActionMethod public void fillAbove()
"Fill above" was selected from the Edit menu.
-
fillBelow
@ActionMethod public void fillBelow()
"Fill below" was selected from the Edit menu.
-
randFillAuto
@ActionMethod public void randFillAuto()
"Random fill" was selected from the Edit menu.
-
randFillAbove
@ActionMethod public void randFillAbove()
"Random fill above" was selected from the Edit menu.
-
randFillBelow
@ActionMethod public void randFillBelow()
"Random fill below" was selected from the Edit menu.
-
floodFill
@ActionMethod public void floodFill()
"Flood fill" was selected from the Edit menu.
-
massChange
@ActionMethod public void massChange()
"Mass change" was selected from the Edit menu.
-
selectAll
@ActionMethod public void selectAll()
Invoked when the user wants to select all squares from a map.
-
invertSelection
@ActionMethod public void invertSelection()
Invoked when the user wants to invert all selected squares from a map.
-
expandEmptySelection
@ActionMethod public void expandEmptySelection()
Invoked when the user wants to expand the selection of empty map squares to surrounding empty map squares.
-
tileStretchingSet
@ActionMethod public void tileStretchingSet()
Invoked when the user wants to set tile stretching on the selected map squares.
-
tileStretchingClear
@ActionMethod public void tileStretchingClear()
Invoked when the user wants to clear tile stretching on the selected map squares.
-
tileStretchingIncrease
@ActionMethod public void tileStretchingIncrease()
Invoked when the user wants to increase tile stretching on the selected map squares.
-
tileStretchingDecrease
@ActionMethod public void tileStretchingDecrease()
Invoked when the user wants to decrease tile stretching on the selected map squares.
-
setAction
public void setAction(@NotNull @NotNull javax.swing.Action action, @NotNull @NotNull java.lang.String name)Description copied from interface:EditorActionSets theActioninstance for this editor action.- Specified by:
setActionin interfaceEditorAction- Parameters:
action- the action instancename- the name of the action
-
activeMapViewChanged
public void activeMapViewChanged(@Nullable @Nullable MapView<G,A,R> mapView)Description copied from interface:MapViewManagerListenerThis event handler is called when the current map view has changed.- Specified by:
activeMapViewChangedin interfaceMapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapView- the new map view ornullif no opened map view exists
-
mapViewCreated
public void mapViewCreated(@NotNull @NotNull MapView<G,A,R> mapView)Description copied from interface:MapViewManagerListenerThis event handler is called when a map view was created.- Specified by:
mapViewCreatedin interfaceMapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapView- the created map view
-
mapViewClosing
public void mapViewClosing(@NotNull @NotNull MapView<G,A,R> mapView)Description copied from interface:MapViewManagerListenerThis event handler is called when a map view is to be closed.- Specified by:
mapViewClosingin interfaceMapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapView- the map view that is to be closed
-
-