public class SelectionTool<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends BasicAbstractTool<G,A,R>
Constructor and Description |
---|
SelectionTool(@NotNull ObjectChooser<G,A,R> objectChooser,
@NotNull InsertionModeSet<G,A,R> insertionModeSet)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clicked(@NotNull MouseOpEvent<G,A,R> e)
Mouse was clicked.
|
@Nullable java.awt.Component |
createOptionsView()
Creates a view for changing the options of this tool.
|
void |
dragged(@NotNull MouseOpEvent<G,A,R> e)
Mouse was dragged.
|
boolean |
isSelectionToolAutoFill()
Returns whether auto-fill is enabled.
|
void |
moved(@NotNull MouseOpEvent<G,A,R> e)
Mouse was moved.
|
void |
pressed(@NotNull MouseOpEvent<G,A,R> e)
Mouse was pressed.
|
void |
released(@NotNull MouseOpEvent<G,A,R> e)
Mouse was released.
|
void |
setSelectionToolAutoFill(boolean selectionToolAutoFill)
Sets whether auto-fill is enabled.
|
getId
public SelectionTool(@NotNull @NotNull ObjectChooser<G,A,R> objectChooser, @NotNull @NotNull InsertionModeSet<G,A,R> insertionModeSet)
objectChooser
- the object chooser to updateinsertionModeSet
- the insertion mode set to usepublic void pressed(@NotNull @NotNull MouseOpEvent<G,A,R> e)
MouseOpListener
e
- the eventpublic void clicked(@NotNull @NotNull MouseOpEvent<G,A,R> e)
MouseOpListener
e
- the eventpublic void dragged(@NotNull @NotNull MouseOpEvent<G,A,R> e)
MouseOpListener
e
- the eventpublic void moved(@NotNull @NotNull MouseOpEvent<G,A,R> e)
MouseOpListener
e
- the eventpublic void released(@NotNull @NotNull MouseOpEvent<G,A,R> e)
MouseOpListener
e
- the event@Nullable public @Nullable java.awt.Component createOptionsView()
Tool
null
if
this tool hasn't any options@ActionMethod public boolean isSelectionToolAutoFill()
@ActionMethod public void setSelectionToolAutoFill(boolean selectionToolAutoFill)
selectionToolAutoFill
- whether auto-fill is enabled