|
Gridarta Editor
|
A GUI component for selecting a direction. More...
Inheritance diagram for net.sf.gridarta.gui.utils.DirectionComponent:
Collaboration diagram for net.sf.gridarta.gui.utils.DirectionComponent:Public Member Functions | |
| void | direction0 () |
| Action method for direction. More... | |
| void | direction1 () |
| Action method for direction. More... | |
| void | direction2 () |
| Action method for direction. More... | |
| void | direction3 () |
| Action method for direction. More... | |
| void | direction4 () |
| Action method for direction. More... | |
| void | direction5 () |
| Action method for direction. More... | |
| void | direction6 () |
| Action method for direction. More... | |
| void | direction7 () |
| Action method for direction. More... | |
| void | direction8 () |
| Action method for direction. More... | |
| void | directionnull () |
| Action method for default direction. More... | |
| void | setEnabled (final boolean enabled) |
| final void | updateDirection (@Nullable final Integer direction) |
| Sets the selected direction. More... | |
Protected Member Functions | |
| abstract void | direction (@Nullable Integer direction) |
| Called whenever a direction button has been selected. More... | |
| DirectionComponent (final boolean includeDefault) | |
| Creates a new instance. More... | |
| final void | updateEnabled (final boolean enableButtons) |
| Enables/disables the direction buttons for a given archetype. More... | |
Private Member Functions | |
| void | createButton (@Nullable final Integer direction, @NotNull final GridBagConstraints gbc, final int x, final int y) |
| Creates a direction button. More... | |
| void | updateEnabled () |
| Enables/disables the buttons. More... | |
Private Attributes | |
| final ButtonGroup | directionButtonGroup = new ButtonGroup() |
| The ButtonGroup for the direction buttons. More... | |
| final Collection< JToggleButton > | directionButtons = new ArrayList<>() |
| The buttons in directionButtonGroup. More... | |
| final Map< Integer, JToggleButton > | directions = new HashMap<>(9) |
| Maps direction to button. More... | |
| boolean | enableButtons |
| Whether the buttons are currently enabled. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| The ActionBuilder instance. More... | |
| static final Insets | EMPTY_INSETS = new Insets(0, 0, 0, 0) |
| Empty Insets. More... | |
| static final long | serialVersionUID = 1L |
| The serial version UID. More... | |
A GUI component for selecting a direction.
Definition at line 48 of file DirectionComponent.java.
|
protected |
Creates a new instance.
| includeDefault | whether the "default" button should be shown |
Definition at line 94 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.createButton(), net.sf.gridarta.gui.utils.DirectionComponent.updateDirection(), and net.sf.gridarta.gui.utils.DirectionComponent.updateEnabled().
Here is the call graph for this function:
|
private |
Creates a direction button.
| direction | the direction for the button |
| gbc | the grid bag constraints to modify |
| x | the x position of the button |
| y | the y position of the button |
Definition at line 144 of file DirectionComponent.java.
Referenced by net.sf.gridarta.gui.utils.DirectionComponent.DirectionComponent().
Here is the caller graph for this function:
|
abstractprotected |
Called whenever a direction button has been selected.
| direction | the selected direction |
Referenced by net.sf.gridarta.gui.utils.DirectionComponent.direction0(), net.sf.gridarta.gui.utils.DirectionComponent.direction1(), net.sf.gridarta.gui.utils.DirectionComponent.direction2(), net.sf.gridarta.gui.utils.DirectionComponent.direction3(), net.sf.gridarta.gui.utils.DirectionComponent.direction4(), net.sf.gridarta.gui.utils.DirectionComponent.direction5(), net.sf.gridarta.gui.utils.DirectionComponent.direction6(), net.sf.gridarta.gui.utils.DirectionComponent.direction7(), net.sf.gridarta.gui.utils.DirectionComponent.direction8(), and net.sf.gridarta.gui.utils.DirectionComponent.directionnull().
Here is the caller graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction0 | ( | ) |
Action method for direction.
Definition at line 162 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction1 | ( | ) |
Action method for direction.
Definition at line 170 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction2 | ( | ) |
Action method for direction.
Definition at line 178 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction3 | ( | ) |
Action method for direction.
Definition at line 186 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction4 | ( | ) |
Action method for direction.
Definition at line 194 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction5 | ( | ) |
Action method for direction.
Definition at line 202 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction6 | ( | ) |
Action method for direction.
Definition at line 210 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction7 | ( | ) |
Action method for direction.
Definition at line 218 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.direction8 | ( | ) |
Action method for direction.
Definition at line 226 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.directionnull | ( | ) |
Action method for default direction.
Definition at line 234 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.direction().
Here is the call graph for this function:| void net.sf.gridarta.gui.utils.DirectionComponent.setEnabled | ( | final boolean | enabled | ) |
Definition at line 245 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.updateEnabled().
Here is the call graph for this function:
Here is the caller graph for this function:| final void net.sf.gridarta.gui.utils.DirectionComponent.updateDirection | ( | @Nullable final Integer | direction | ) |
Sets the selected direction.
| direction | the direction |
Definition at line 130 of file DirectionComponent.java.
Referenced by net.sf.gridarta.gui.utils.DirectionComponent.DirectionComponent(), net.sf.gridarta.gui.panel.archetypechooser.DirectionPane< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.DirectionPane(), and net.sf.gridarta.gui.panel.gameobjectattributes.FaceTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.refresh().
Here is the caller graph for this function:
|
protected |
Enables/disables the direction buttons for a given archetype.
| enableButtons | whether the buttons are enabled |
Definition at line 121 of file DirectionComponent.java.
References net.sf.gridarta.gui.utils.DirectionComponent.enableButtons, and net.sf.gridarta.gui.utils.DirectionComponent.updateEnabled().
Here is the call graph for this function:
|
private |
Enables/disables the buttons.
Definition at line 253 of file DirectionComponent.java.
Referenced by net.sf.gridarta.gui.utils.DirectionComponent.DirectionComponent(), net.sf.gridarta.gui.panel.archetypechooser.DirectionPane< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.DirectionPane(), net.sf.gridarta.gui.utils.DirectionComponent.setEnabled(), net.sf.gridarta.gui.panel.archetypechooser.DirectionPane< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateEnabled(), and net.sf.gridarta.gui.utils.DirectionComponent.updateEnabled().
Here is the caller graph for this function:
|
staticprivate |
The ActionBuilder instance.
Definition at line 59 of file DirectionComponent.java.
|
private |
The ButtonGroup for the direction buttons.
Definition at line 71 of file DirectionComponent.java.
|
private |
The buttons in directionButtonGroup.
Definition at line 77 of file DirectionComponent.java.
|
private |
Maps direction to button.
Definition at line 83 of file DirectionComponent.java.
|
staticprivate |
Empty Insets.
Definition at line 65 of file DirectionComponent.java.
|
private |
Whether the buttons are currently enabled.
Definition at line 88 of file DirectionComponent.java.
Referenced by net.sf.gridarta.gui.utils.DirectionComponent.updateEnabled().
|
staticprivate |
The serial version UID.
Definition at line 53 of file DirectionComponent.java.