Gridarta Editor
DeletionTool.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2023 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.gui.panel.tools;
21 
22 import java.awt.Component;
23 import java.awt.Container;
24 import java.awt.GridBagConstraints;
25 import java.awt.GridBagLayout;
26 import java.awt.Point;
27 import java.util.Collection;
28 import java.util.HashSet;
29 import javax.swing.JComboBox;
30 import javax.swing.JPanel;
45 import net.sf.japi.swing.action.ActionBuilder;
46 import net.sf.japi.swing.action.ActionBuilderFactory;
47 import net.sf.japi.swing.action.ActionMethod;
48 import net.sf.japi.swing.action.ToggleAction;
49 import org.jetbrains.annotations.NotNull;
50 import org.jetbrains.annotations.Nullable;
51 
56 public class DeletionTool<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends BasicAbstractTool<G, A, R> {
57 
61  private static final int DELETE_TOPMOST = 0;
62 
66  private static final int DELETE_ALL = 1;
67 
71  private static final int DELETE_BOTTOMMOST = 2;
72 
76  private static final int SCOPE_SQUARE = 0;
77 
81  private static final int SCOPE_ABOVE_FLOOR = 1;
82 
86  private static final int SCOPE_BELOW_FLOOR = 2;
87 
92  private static final int SCOPE_SELECTED_OBJECT = 3;
93 
97  private static final int SCOPE_WALL = 4;
98 
102  private static final int SCOPE_FLOOR = 5;
103 
107  @NotNull
108  private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta.gui.panel.tools");
109 
113  @NotNull
115 
119  @Nullable
121 
125  @Nullable
127 
131  @Nullable
133 
137  @NotNull
139 
143  @NotNull
145 
149  @NotNull
150  private final ToggleAction ignoreWallsAction = (ToggleAction) ACTION_BUILDER.createToggle(true, "deletionToolExceptionsIgnoreWalls", this);
151 
155  @NotNull
156  private final ToggleAction ignoreFloorsAction = (ToggleAction) ACTION_BUILDER.createToggle(true, "deletionToolExceptionsIgnoreFloors", this);
157 
161  @NotNull
162  private final ToggleAction ignoreMonstersAction = (ToggleAction) ACTION_BUILDER.createToggle(true, "deletionToolExceptionsIgnoreMonsters", this);
163 
168 
173 
178 
182  @NotNull
183  private final JComboBox<?> deleteComboBox = createDeleteComboBox();
184 
188  @NotNull
189  private final JComboBox<?> scopeComboBox = createScopeComboBox();
190 
201  super("deletion");
202  this.mapViewSettings = mapViewSettings;
203  this.objectChooser = objectChooser;
204  this.pickmapSettings = pickmapSettings;
205  this.floorGameObjectMatcher = floorGameObjectMatcher;
206  this.wallGameObjectMatcher = wallGameObjectMatcher;
207  this.monsterGameObjectMatcher = monsterGameObjectMatcher;
208  }
209 
210  @Override
211  public void pressed(@NotNull final MouseOpEvent<G, A, R> e) {
212  final Point mapLoc = e.getMapLocation();
213  final MapCursor<G, A, R> mapCursor = e.getMapCursor();
214  final MapControl<G, A, R> mapControl = e.getMapControl();
215  mapCursor.setLocationSafe(mapLoc);
216  if (mapLoc != null) {
217  // delete the topmost arch (matching the view settings) on that square and redraw the map
218  deleteArch(mapLoc, mapControl);
219  }
220  }
221 
222  @Override
223  public void released(@NotNull final MouseOpEvent<G, A, R> e) {
224 
225  }
226 
227  @Override
228  public void clicked(@NotNull final MouseOpEvent<G, A, R> e) {
229  }
230 
231  @Override
232  public void dragged(@NotNull final MouseOpEvent<G, A, R> e) {
233  final Point mapLoc = e.getMapLocation();
234  final MapCursor<G, A, R> mapCursor = e.getMapCursor();
235  final MapControl<G, A, R> mapControl = e.getMapControl();
236  if (mapCursor.setLocationSafe(mapLoc)) {
237  // delete the topmost arch (matching the view settings) on that square and redraw the map
238  deleteArch(mapLoc, mapControl);
239  }
240  }
241 
242  @Override
243  public void moved(@NotNull final MouseOpEvent<G, A, R> e) {
244  }
245 
251  private void deleteArch(@NotNull final Point mapLoc, @NotNull final MapControl<G, A, R> mapControl) {
252  if (mapControl.isPickmap() && pickmapSettings.isLocked()) {
253  return;
254  }
255 
256  final MapSquare<G, A, R> mapSquare = mapControl.getMapModel().getMapSquare(mapLoc);
257  final int scopeType = scopeComboBox.getSelectedIndex();
258  final int deleteType = deleteComboBox.getSelectedIndex();
259 
260  @Nullable final GameObject<G, A, R> start;
261  @Nullable final GameObject<G, A, R> end;
262  switch (scopeType) {
263  case SCOPE_ABOVE_FLOOR:
264  start = floorGameObjectMatcher == null ? null : mapSquare.getAfterLast(floorGameObjectMatcher);
265  end = mapSquare.getLast();
266  break;
267 
268  case SCOPE_BELOW_FLOOR:
269  start = mapSquare.getFirst();
270  end = floorGameObjectMatcher == null ? null : mapSquare.getBeforeFirst(floorGameObjectMatcher);
271  break;
272 
273  case SCOPE_SQUARE:
275  case SCOPE_WALL:
276  case SCOPE_FLOOR:
277  start = mapSquare.getFirst();
278  end = mapSquare.getLast();
279  break;
280 
281  default:
282  return;
283  }
284  if (start == null || end == null) {
285  return;
286  }
287  final Collection<G> gameObjectsToDelete = new HashSet<>();
288  boolean foundFirst = false;
289  final GameObject<G, A, R> start2 = deleteType == DELETE_TOPMOST ? end : start;
290  final GameObject<G, A, R> end2 = deleteType == DELETE_TOPMOST ? start : end;
291  for (final GameObject<G, A, R> gameObject : deleteType == DELETE_TOPMOST ? mapSquare.reverse() : mapSquare) {
292  if (gameObject == start2) {
293  foundFirst = true;
294  }
295  if (foundFirst) {
296  final G head = gameObject.getHead();
297  if (mapViewSettings.isEditType(head)) {
298  boolean insert = false;
299  switch (scopeType) {
300  case SCOPE_SQUARE:
301  case SCOPE_ABOVE_FLOOR:
302  case SCOPE_BELOW_FLOOR:
303  insert = true;
304  break;
305 
307  if (objectChooser.isMatching(head)) {
308  insert = true;
309  }
310  break;
311 
312  case SCOPE_WALL:
314  insert = true;
315  }
316  break;
317 
318  case SCOPE_FLOOR:
320  insert = true;
321  }
322  break;
323  }
324  if (insert) {
326  // ignore
328  // ignore
330  // ignore
331  } else {
332  gameObjectsToDelete.add(head);
333  if (deleteType != DELETE_ALL) {
334  break;
335  }
336  }
337  }
338  }
339  if (gameObject == end2) {
340  break;
341  }
342  }
343  }
344  if (!gameObjectsToDelete.isEmpty()) {
345  final MapModel<G, A, R> mapModel = mapSquare.getMapModel();
346  mapModel.beginTransaction("Delete Object");
347  try {
348  for (final G gameObjectToDelete : gameObjectsToDelete) {
349  mapModel.removeGameObject(gameObjectToDelete, mapViewSettings.isAutojoin());
350  }
351  } finally {
352  mapModel.endTransaction();
353  }
354  }
355  }
356 
357  @Nullable
358  @Override
359  public Component createOptionsView() {
360  final Container panel = new JPanel();
361  panel.setLayout(new GridBagLayout());
362 
363  final GridBagConstraints gbcLabel = new GridBagConstraints();
364  gbcLabel.anchor = GridBagConstraints.EAST;
365 
366  final GridBagConstraints gbcComboBox = new GridBagConstraints();
367  gbcComboBox.fill = GridBagConstraints.HORIZONTAL;
368  gbcComboBox.weightx = 1.0;
369  gbcComboBox.gridwidth = GridBagConstraints.REMAINDER;
370 
371  final GridBagConstraints gbcCheckBox = new GridBagConstraints();
372  gbcCheckBox.fill = GridBagConstraints.HORIZONTAL;
373  gbcCheckBox.gridwidth = GridBagConstraints.REMAINDER;
374 
375  panel.add(SwingUtils.createLabel("deletionTool.delete", deleteComboBox), gbcLabel);
376  panel.add(deleteComboBox, gbcComboBox);
377 
378  panel.add(SwingUtils.createLabel("deletionTool.scope", scopeComboBox), gbcLabel);
379  panel.add(scopeComboBox, gbcComboBox);
380 
381  panel.add(ignoreWallsAction.createCheckBox(), gbcCheckBox);
382  panel.add(ignoreFloorsAction.createCheckBox(), gbcCheckBox);
383  panel.add(ignoreMonstersAction.createCheckBox(), gbcCheckBox);
384  return panel;
385  }
386 
391  @NotNull
392  private static JComboBox<?> createDeleteComboBox() {
393  final String[] options = { ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.delete.top"), ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.delete.all"), ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.delete.bottom"), };
394  final JComboBox<?> comboBox = new JComboBox<>(options);
395  comboBox.setToolTipText(ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.delete.shortdescription"));
396  return comboBox;
397  }
398 
403  @NotNull
404  private static JComboBox<?> createScopeComboBox() {
405  final String[] options = { ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.scope.square"), ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.scope.aboveFloor"), ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.scope.belowFloor"), ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.scope.selectedObject"), ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.scope.wall"), ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.scope.floor"), };
406  final JComboBox<?> comboBox = new JComboBox<>(options);
407  comboBox.setToolTipText(ActionBuilderUtils.getString(ACTION_BUILDER, "deletionTool.scope.shortdescription"));
408  return comboBox;
409  }
410 
415  @ActionMethod
418  }
419 
425  @ActionMethod
427  this.deletionToolExceptionsIgnoreWalls = deletionToolExceptionsIgnoreWalls;
428  }
429 
434  @ActionMethod
437  }
438 
444  @ActionMethod
446  this.deletionToolExceptionsIgnoreFloors = deletionToolExceptionsIgnoreFloors;
447  }
448 
453  @ActionMethod
456  }
457 
463  @ActionMethod
465  this.deletionToolExceptionsIgnoreMonsters = deletionToolExceptionsIgnoreMonsters;
466  }
467 
468 }
net.sf.gridarta.gui.map.event.MouseOpEvent
A MouseOpEvent is an event triggered for a MouseOpListener.
Definition: MouseOpEvent.java:37
net.sf.gridarta.model.mapmodel.MapModel
A MapModel reflects the data of a map.
Definition: MapModel.java:75
net.sf.gridarta.gui.panel
net.sf.gridarta.gui.panel.tools.DeletionTool.DELETE_ALL
static final int DELETE_ALL
Index into deleteComboBox: delete all objects.
Definition: DeletionTool.java:66
net.sf.gridarta.model.mapmodel.MapSquare.getLast
G getLast(@NotNull final GameObjectMatcher gameObjectMatcher)
Returns the last occurrence of a matching game object.
Definition: MapSquare.java:196
net.sf.gridarta.gui.panel.tools.DeletionTool.ignoreFloorsAction
final ToggleAction ignoreFloorsAction
The action for "ignore floors".
Definition: DeletionTool.java:156
net.sf.gridarta.gui.panel.tools.DeletionTool.pressed
void pressed(@NotNull final MouseOpEvent< G, A, R > e)
Definition: DeletionTool.java:211
net.sf.gridarta
Base package of all Gridarta classes.
net.sf.gridarta.model.mapmodel.MapSquare.getFirst
G getFirst(@NotNull final GameObjectMatcher gameObjectMatcher)
Returns the first occurrence of a matching game object.
Definition: MapSquare.java:230
net.sf.gridarta.model.mapmodel.MapSquare
A single Map Square.
Definition: MapSquare.java:45
net.sf.gridarta.model.mapmodel.MapModel.endTransaction
void endTransaction()
End a transaction.
net.sf.gridarta.gui.panel.tools.DeletionTool.floorGameObjectMatcher
final GameObjectMatcher floorGameObjectMatcher
A GameObjectMatcher matching floor game objects.
Definition: DeletionTool.java:120
net.sf.gridarta.gui.panel.tools.DeletionTool.objectChooser
final ObjectChooser< G, A, R > objectChooser
The ObjectChooser to use.
Definition: DeletionTool.java:138
net.sf.gridarta.gui.panel.tools.DeletionTool.moved
void moved(@NotNull final MouseOpEvent< G, A, R > e)
Definition: DeletionTool.java:243
net.sf.gridarta.model.mapviewsettings
Definition: AbstractMapViewSettings.java:20
net.sf
net.sf.gridarta.model.mapmodel.MapModel.beginTransaction
void beginTransaction(@NotNull String name)
Starts a new transaction.
net.sf.gridarta.model.mapviewsettings.MapViewSettings.isAutojoin
boolean isAutojoin()
Returns whether "autojoin" is enabled.
net.sf.gridarta.gui.panel.tools.DeletionTool.DELETE_TOPMOST
static final int DELETE_TOPMOST
Index into deleteComboBox: delete topmost object.
Definition: DeletionTool.java:61
net.sf.gridarta.model.mapmodel
Definition: AboveFloorInsertionMode.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool.dragged
void dragged(@NotNull final MouseOpEvent< G, A, R > e)
Definition: DeletionTool.java:232
net.sf.gridarta.gui.panel.tools.DeletionTool.setDeletionToolExceptionsIgnoreMonsters
void setDeletionToolExceptionsIgnoreMonsters(final boolean deletionToolExceptionsIgnoreMonsters)
Sets whether monsters should not be deleted.
Definition: DeletionTool.java:464
net.sf.gridarta.gui.panel.tools.DeletionTool.pickmapSettings
final PickmapSettings pickmapSettings
The PickmapSettings to use.
Definition: DeletionTool.java:144
net.sf.gridarta.model.match.GameObjectMatcher
Interface for classes that match GameObjects.
Definition: GameObjectMatcher.java:30
net.sf.gridarta.model.archetype
Definition: AbstractArchetype.java:20
net.sf.gridarta.model.gameobject.GameObject
Reflects a game object (object on a map).
Definition: GameObject.java:36
net.sf.gridarta.model.mapviewsettings.MapViewSettings
Container for settings that affect the rendering of maps.
Definition: MapViewSettings.java:30
net.sf.gridarta.model.mapcontrol
Definition: DefaultMapControl.java:20
net.sf.gridarta.gui.panel.objectchooser.ObjectChooser.isMatching
boolean isMatching(@NotNull G gameObject)
Returns whether the current selection matches a given game object.
net.sf.gridarta.gui.panel.tools.DeletionTool.deletionToolExceptionsIgnoreWalls
boolean deletionToolExceptionsIgnoreWalls
Whether "ignore walls" is enabled.
Definition: DeletionTool.java:167
net.sf.gridarta.gui.panel.tools.DeletionTool.SCOPE_SQUARE
static final int SCOPE_SQUARE
Index into scopeComboBox: delete all objects.
Definition: DeletionTool.java:76
net.sf.gridarta.model.match.GameObjectMatcher.isMatching
boolean isMatching(@NotNull GameObject<?, ?, ?> gameObject)
Matches a GameObject.
net.sf.gridarta.gui.panel.tools.DeletionTool.clicked
void clicked(@NotNull final MouseOpEvent< G, A, R > e)
Definition: DeletionTool.java:228
net.sf.gridarta.gui
Graphical User Interface of Gridarta.
net.sf.gridarta.model.mapcursor.MapCursor.setLocationSafe
boolean setLocationSafe(@Nullable final Point p)
Move cursor to a new location.
Definition: MapCursor.java:255
net.sf.gridarta.gui.panel.tools.DeletionTool.ignoreWallsAction
final ToggleAction ignoreWallsAction
The action for "ignore walls".
Definition: DeletionTool.java:150
net.sf.gridarta.gui.panel.tools.DeletionTool.deleteArch
void deleteArch(@NotNull final Point mapLoc, @NotNull final MapControl< G, A, R > mapControl)
Deletes a game object.
Definition: DeletionTool.java:251
net.sf.gridarta.gui.panel.objectchooser
Definition: DefaultObjectChooser.java:20
net.sf.gridarta.model.gameobject
GameObjects are the objects based on Archetypes found on maps.
Definition: AbstractGameObject.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool.SCOPE_BELOW_FLOOR
static final int SCOPE_BELOW_FLOOR
Index into scopeComboBox: delete all objects below floors.
Definition: DeletionTool.java:86
net
net.sf.gridarta.gui.panel.tools.DeletionTool.mapViewSettings
final MapViewSettings mapViewSettings
The map view settings instance.
Definition: DeletionTool.java:114
net.sf.gridarta.gui.panel.tools.DeletionTool.deletionToolExceptionsIgnoreMonsters
boolean deletionToolExceptionsIgnoreMonsters
Whether "ignore monsters" is enabled.
Definition: DeletionTool.java:177
net.sf.gridarta.gui.panel.tools.DeletionTool.DELETE_BOTTOMMOST
static final int DELETE_BOTTOMMOST
Index into deleteComboBox: delete bottommost object.
Definition: DeletionTool.java:71
net.sf.gridarta.model.match
Classes related to matching {GameObjects}, so called { net.sf.gridarta.model.match....
Definition: AndGameObjectMatcher.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool.DeletionTool
DeletionTool(@NotNull final MapViewSettings mapViewSettings, @NotNull final ObjectChooser< G, A, R > objectChooser, @NotNull final PickmapSettings pickmapSettings, @Nullable final GameObjectMatcher floorGameObjectMatcher, @Nullable final GameObjectMatcher wallGameObjectMatcher, @Nullable final GameObjectMatcher monsterGameObjectMatcher)
Creates a new instance.
Definition: DeletionTool.java:200
net.sf.gridarta.gui.utils.SwingUtils
Utility class for Swing related functions.
Definition: SwingUtils.java:37
net.sf.gridarta.model.baseobject.GameObjectContainer.reverse
transient Iterable< G > reverse
Iterable implementation for reverse traversal.
Definition: GameObjectContainer.java:75
net.sf.gridarta.gui.panel.tools.DeletionTool.ACTION_BUILDER
static final ActionBuilder ACTION_BUILDER
Action Builder.
Definition: DeletionTool.java:108
net.sf.gridarta.model.mapmodel.MapSquare.getBeforeFirst
G getBeforeFirst(@NotNull final GameObjectMatcher gameObjectMatcher)
Returns the game object before the first occurrence of a matching game object.
Definition: MapSquare.java:247
net.sf.gridarta.model.maparchobject.MapArchObject
Interface for MapArchObjects.
Definition: MapArchObject.java:40
net.sf.gridarta.gui.panel.tools.DeletionTool.createScopeComboBox
static JComboBox<?> createScopeComboBox()
Creates a JComboBox for selecting the scope to delete.
Definition: DeletionTool.java:404
net.sf.gridarta.model.mapviewsettings.MapViewSettings.isEditType
boolean isEditType(int editType)
Get information on the current state of edit type.
net.sf.gridarta.model.mapmodel.MapModel.removeGameObject
void removeGameObject(@NotNull G gameObject, boolean join)
Delete an existing GameObject from the map.
net.sf.gridarta.gui.panel.tools.DeletionTool.SCOPE_WALL
static final int SCOPE_WALL
Index into scopeComboBox: delete all wall objects.
Definition: DeletionTool.java:97
net.sf.gridarta.gui.map.event
Definition: MouseOpEvent.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool.scopeComboBox
final JComboBox<?> scopeComboBox
The JComboBox for selecting the scope to delete.
Definition: DeletionTool.java:189
net.sf.gridarta.gui.panel.tools.DeletionTool.released
void released(@NotNull final MouseOpEvent< G, A, R > e)
Definition: DeletionTool.java:223
net.sf.gridarta.model.pickmapsettings.PickmapSettings.isLocked
boolean isLocked()
Returns whether pickmaps are immutable.
net.sf.gridarta.model.mapcursor.MapCursor
MapCursor provides methods to move and drag on map.
Definition: MapCursor.java:58
net.sf.gridarta.gui.panel.tools.DeletionTool.createDeleteComboBox
static JComboBox<?> createDeleteComboBox()
Creates a JComboBox for selecting the objects to delete.
Definition: DeletionTool.java:392
net.sf.gridarta.utils.ActionBuilderUtils.getString
static String getString(@NotNull final ActionBuilder actionBuilder, @NotNull final String key, @NotNull final String defaultValue)
Returns the value of a key.
Definition: ActionBuilderUtils.java:71
net.sf.gridarta.gui.panel.tools.DeletionTool.wallGameObjectMatcher
final GameObjectMatcher wallGameObjectMatcher
A GameObjectMatcher matching wall game objects.
Definition: DeletionTool.java:126
net.sf.gridarta.gui.panel.objectchooser.ObjectChooser
Common base interface for ObjectChoosers.
Definition: ObjectChooser.java:34
net.sf.gridarta.gui.panel.tools.DeletionTool.deleteComboBox
final JComboBox<?> deleteComboBox
The JComboBox for selecting the objects to delete.
Definition: DeletionTool.java:183
net.sf.gridarta.model.mapmodel.MapSquare.getMapModel
MapModel< G, A, R > getMapModel()
Returns the MapModel this map square is part of.
Definition: MapSquare.java:99
net.sf.gridarta.gui.panel.tools.DeletionTool.monsterGameObjectMatcher
final GameObjectMatcher monsterGameObjectMatcher
A GameObjectMatcher matching monster game objects.
Definition: DeletionTool.java:132
net.sf.gridarta.gui.panel.tools.DeletionTool.SCOPE_SELECTED_OBJECT
static final int SCOPE_SELECTED_OBJECT
Index into scopeComboBox: delete all objects matching the object chooser.
Definition: DeletionTool.java:92
net.sf.gridarta.model.mapmodel.MapModel.getMapSquare
MapSquare< G, A, R > getMapSquare(@NotNull Point pos)
Get the square at a specified location.
net.sf.gridarta.gui.panel.tools.DeletionTool.isDeletionToolExceptionsIgnoreWalls
boolean isDeletionToolExceptionsIgnoreWalls()
Returns whether walls should not be deleted.
Definition: DeletionTool.java:416
net.sf.gridarta.model
net.sf.gridarta.model.archetype.Archetype
Reflects an Archetype.
Definition: Archetype.java:41
net.sf.gridarta.gui.panel.tools.DeletionTool.ignoreMonstersAction
final ToggleAction ignoreMonstersAction
The action for "ignore monsters".
Definition: DeletionTool.java:162
net.sf.gridarta.gui.panel.tools.DeletionTool.setDeletionToolExceptionsIgnoreFloors
void setDeletionToolExceptionsIgnoreFloors(final boolean deletionToolExceptionsIgnoreFloors)
Sets whether floors should not be deleted.
Definition: DeletionTool.java:445
net.sf.gridarta.model.mapmodel.MapSquare.getAfterLast
G getAfterLast(@NotNull final GameObjectMatcher gameObjectMatcher)
Returns the game object after the last occurrence of a matching game object.
Definition: MapSquare.java:213
net.sf.gridarta.gui.map
Base classes for rendering maps.
Definition: AbstractPerMapDialogManager.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool.isDeletionToolExceptionsIgnoreFloors
boolean isDeletionToolExceptionsIgnoreFloors()
Returns whether floors should not be deleted.
Definition: DeletionTool.java:435
net.sf.gridarta.model.pickmapsettings
Definition: AbstractPickmapSettings.java:20
net.sf.gridarta.gui.utils.SwingUtils.createLabel
static Component createLabel(@NotNull final String key, @Nullable final Component component)
Creates a javax.swing.JLabel instance.
Definition: SwingUtils.java:58
net.sf.gridarta.gui.panel.tools.DeletionTool.SCOPE_FLOOR
static final int SCOPE_FLOOR
Index into scopeComboBox: delete all floor objects.
Definition: DeletionTool.java:102
net.sf.gridarta.model.mapcontrol.MapControl
Currently nothing more than a marker interface for unification.
Definition: MapControl.java:35
net.sf.gridarta.utils.ActionBuilderUtils
Utility class for ActionBuilder related functions.
Definition: ActionBuilderUtils.java:31
net.sf.gridarta.model.maparchobject
Definition: AbstractMapArchObject.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool.setDeletionToolExceptionsIgnoreWalls
void setDeletionToolExceptionsIgnoreWalls(final boolean deletionToolExceptionsIgnoreWalls)
Sets whether walls should not be deleted.
Definition: DeletionTool.java:426
net.sf.gridarta.gui.panel.tools.DeletionTool.isDeletionToolExceptionsIgnoreMonsters
boolean isDeletionToolExceptionsIgnoreMonsters()
Returns whether monsters should not be deleted.
Definition: DeletionTool.java:454
net.sf.gridarta.gui.utils
Definition: AnimationComponent.java:20
net.sf.gridarta.gui.panel.tools.BasicAbstractTool
Base class for the default provided tools.
Definition: BasicAbstractTool.java:32
net.sf.gridarta.model.mapcursor
Definition: MapCursor.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool.deletionToolExceptionsIgnoreFloors
boolean deletionToolExceptionsIgnoreFloors
Whether "ignore floors" is enabled.
Definition: DeletionTool.java:172
net.sf.gridarta.utils
Definition: ActionBuilderUtils.java:20
net.sf.gridarta.gui.panel.tools.DeletionTool
Tool for Deletion.
Definition: DeletionTool.java:56
net.sf.gridarta.model.pickmapsettings.PickmapSettings
Container for settings that affect pickmaps.
Definition: PickmapSettings.java:28
net.sf.gridarta.gui.panel.tools.DeletionTool.createOptionsView
Component createOptionsView()
Definition: DeletionTool.java:359
net.sf.gridarta.gui.panel.tools.DeletionTool.SCOPE_ABOVE_FLOOR
static final int SCOPE_ABOVE_FLOOR
Index into scopeComboBox: delete all objects above floors.
Definition: DeletionTool.java:81