Package net.sf.gridarta.gui.panel.tools
Class DeletionTool<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.gui.panel.tools.AbstractTool<G,A,R>
-
- net.sf.gridarta.gui.panel.tools.BasicAbstractTool<G,A,R>
-
- net.sf.gridarta.gui.panel.tools.DeletionTool<G,A,R>
-
- All Implemented Interfaces:
MouseOpListener<G,A,R>,Tool<G,A,R>
public class DeletionTool<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends BasicAbstractTool<G,A,R>
Tool for Deletion.
-
-
Constructor Summary
Constructors Constructor Description DeletionTool(@NotNull MapViewSettings mapViewSettings, @NotNull ObjectChooser<G,A,R> objectChooser, @NotNull PickmapSettings pickmapSettings, @Nullable GameObjectMatcher floorGameObjectMatcher, @Nullable GameObjectMatcher wallGameObjectMatcher, @Nullable GameObjectMatcher monsterGameObjectMatcher)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclicked(@NotNull MouseOpEvent<G,A,R> e)Mouse was clicked.@Nullable java.awt.ComponentcreateOptionsView()Creates a view for changing the options of this tool.voiddragged(@NotNull MouseOpEvent<G,A,R> e)Mouse was dragged.booleanisDeletionToolExceptionsIgnoreFloors()Returns whether floors should not be deleted.booleanisDeletionToolExceptionsIgnoreMonsters()Returns whether monsters should not be deleted.booleanisDeletionToolExceptionsIgnoreWalls()Returns whether walls should not be deleted.voidmoved(@NotNull MouseOpEvent<G,A,R> e)Mouse was moved.voidpressed(@NotNull MouseOpEvent<G,A,R> e)Mouse was pressed.voidreleased(@NotNull MouseOpEvent<G,A,R> e)Mouse was released.voidsetDeletionToolExceptionsIgnoreFloors(boolean deletionToolExceptionsIgnoreFloors)Sets whether floors should not be deleted.voidsetDeletionToolExceptionsIgnoreMonsters(boolean deletionToolExceptionsIgnoreMonsters)Sets whether monsters should not be deleted.voidsetDeletionToolExceptionsIgnoreWalls(boolean deletionToolExceptionsIgnoreWalls)Sets whether walls should not be deleted.-
Methods inherited from class net.sf.gridarta.gui.panel.tools.BasicAbstractTool
getId
-
-
-
-
Constructor Detail
-
DeletionTool
public DeletionTool(@NotNull @NotNull MapViewSettings mapViewSettings, @NotNull @NotNull ObjectChooser<G,A,R> objectChooser, @NotNull @NotNull PickmapSettings pickmapSettings, @Nullable @Nullable GameObjectMatcher floorGameObjectMatcher, @Nullable @Nullable GameObjectMatcher wallGameObjectMatcher, @Nullable @Nullable GameObjectMatcher monsterGameObjectMatcher)Creates a new instance.- Parameters:
mapViewSettings- the map view settings instanceobjectChooser- the object chooser to usepickmapSettings- the pickmap settings to usefloorGameObjectMatcher- the floor matcher to usewallGameObjectMatcher- the wall matcher to usemonsterGameObjectMatcher- the monster matcher to use
-
-
Method Detail
-
pressed
public void pressed(@NotNull @NotNull MouseOpEvent<G,A,R> e)Description copied from interface:MouseOpListenerMouse was pressed.- Parameters:
e- the event
-
released
public void released(@NotNull @NotNull MouseOpEvent<G,A,R> e)Description copied from interface:MouseOpListenerMouse was released.- Parameters:
e- the event
-
clicked
public void clicked(@NotNull @NotNull MouseOpEvent<G,A,R> e)Description copied from interface:MouseOpListenerMouse was clicked.- Parameters:
e- the event
-
dragged
public void dragged(@NotNull @NotNull MouseOpEvent<G,A,R> e)Description copied from interface:MouseOpListenerMouse was dragged.- Parameters:
e- the event
-
moved
public void moved(@NotNull @NotNull MouseOpEvent<G,A,R> e)Description copied from interface:MouseOpListenerMouse was moved.- Parameters:
e- the event
-
createOptionsView
@Nullable public @Nullable java.awt.Component createOptionsView()
Description copied from interface:ToolCreates a view for changing the options of this tool.- Returns:
- view for changing the options of this tool or
nullif this tool hasn't any options
-
isDeletionToolExceptionsIgnoreWalls
@ActionMethod public boolean isDeletionToolExceptionsIgnoreWalls()
Returns whether walls should not be deleted.- Returns:
- whether walls should not be deleted
-
setDeletionToolExceptionsIgnoreWalls
@ActionMethod public void setDeletionToolExceptionsIgnoreWalls(boolean deletionToolExceptionsIgnoreWalls)
Sets whether walls should not be deleted.- Parameters:
deletionToolExceptionsIgnoreWalls- whether walls should not be deleted
-
isDeletionToolExceptionsIgnoreFloors
@ActionMethod public boolean isDeletionToolExceptionsIgnoreFloors()
Returns whether floors should not be deleted.- Returns:
- whether floors should not be deleted
-
setDeletionToolExceptionsIgnoreFloors
@ActionMethod public void setDeletionToolExceptionsIgnoreFloors(boolean deletionToolExceptionsIgnoreFloors)
Sets whether floors should not be deleted.- Parameters:
deletionToolExceptionsIgnoreFloors- whether floors should not be deleted
-
isDeletionToolExceptionsIgnoreMonsters
@ActionMethod public boolean isDeletionToolExceptionsIgnoreMonsters()
Returns whether monsters should not be deleted.- Returns:
- whether monsters should not be deleted
-
setDeletionToolExceptionsIgnoreMonsters
@ActionMethod public void setDeletionToolExceptionsIgnoreMonsters(boolean deletionToolExceptionsIgnoreMonsters)
Sets whether monsters should not be deleted.- Parameters:
deletionToolExceptionsIgnoreMonsters- whether monsters should not be deleted
-
-