|
Gridarta Editor
|
Displays a dialog asking for parameters for the "random fill" function. More...
Collaboration diagram for net.sf.gridarta.mainactions.RandomFillDialog:Public Member Functions | |
| int | getFillDensity () |
| Returns the fill density. More... | |
| boolean | isRandomFillSkipAdjacentSquares () |
| Action method for "skip adjacent squares" action. More... | |
| void | randomFillCancel () |
| Action method to close the dialog with "Cancel". More... | |
| RandomFillDialog () | |
| Creates a new instance. More... | |
| void | randomFillOkay () |
| Action method to close the dialog with "OK". More... | |
| void | setRandomFillSkipAdjacentSquares (final boolean skipAdjacentSquares) |
| Action method for "skip adjacent squares" action. More... | |
| boolean | showRandomFillDialog (@NotNull final Component parent) |
| Displays the random fill dialog. More... | |
Private Member Functions | |
| boolean | isOkButtonEnabled () |
| Returns whether the "OK" button is enabled. More... | |
| void | updateOkButton () |
| Updates the enabled state of the "OK" button depending on the dialog's contents. More... | |
Private Attributes | |
| final JButton | cancelButton = new JButton(ACTION_BUILDER.createAction(false, "randomFillCancel", this)) |
| The "Cancel" button. More... | |
| JDialog | dialog |
| The JDialog instance or. More... | |
| final JTextComponent | fillDensityTextField = new JTextField(16) |
| The text field for specifying the fill density. More... | |
| final JButton | okButton = new JButton(ACTION_BUILDER.createAction(false, "randomFillOkay", this)) |
| The "OK" button. More... | |
| final JOptionPane | optionPane = new JOptionPane() |
| The JOptionPane instance used to create dialogs. More... | |
| boolean | skipAdjacentSquares |
| Whether adjacent squares are checked. More... | |
| final WindowListener | windowListener |
| The WindowListener attached to dialog to call JOptionPane#selectInitialValue() after the dialog has been shown. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| Action Builder to create Actions. More... | |
Displays a dialog asking for parameters for the "random fill" function.
Definition at line 51 of file RandomFillDialog.java.
| net.sf.gridarta.mainactions.RandomFillDialog.RandomFillDialog | ( | ) |
Creates a new instance.
Definition at line 97 of file RandomFillDialog.java.
References net.sf.gridarta.gui.utils.GUIConstants.DIALOG_BORDER, net.sf.gridarta.utils.ActionBuilderUtils.getString(), net.sf.gridarta.utils.ActionBuilderUtils.newLabel(), net.sf.gridarta.mainactions.RandomFillDialog.okButton, net.sf.gridarta.gui.utils.TextComponentUtils.setAutoSelectOnFocus(), and net.sf.gridarta.mainactions.RandomFillDialog.updateOkButton().
Here is the call graph for this function:| int net.sf.gridarta.mainactions.RandomFillDialog.getFillDensity | ( | ) |
Returns the fill density.
Definition at line 260 of file RandomFillDialog.java.
References net.sf.gridarta.utils.NumberUtils.parseInt().
Referenced by net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.fillRandom(), and net.sf.gridarta.mainactions.RandomFillDialog.isOkButtonEnabled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Returns whether the "OK" button is enabled.
Definition at line 251 of file RandomFillDialog.java.
References net.sf.gridarta.mainactions.RandomFillDialog.getFillDensity().
Referenced by net.sf.gridarta.mainactions.RandomFillDialog.randomFillOkay(), net.sf.gridarta.mainactions.RandomFillDialog.showRandomFillDialog(), and net.sf.gridarta.mainactions.RandomFillDialog.updateOkButton().
Here is the call graph for this function:
Here is the caller graph for this function:| boolean net.sf.gridarta.mainactions.RandomFillDialog.isRandomFillSkipAdjacentSquares | ( | ) |
Action method for "skip adjacent squares" action.
Definition at line 226 of file RandomFillDialog.java.
References net.sf.gridarta.mainactions.RandomFillDialog.skipAdjacentSquares.
Here is the caller graph for this function:| void net.sf.gridarta.mainactions.RandomFillDialog.randomFillCancel | ( | ) |
Action method to close the dialog with "Cancel".
Definition at line 243 of file RandomFillDialog.java.
| void net.sf.gridarta.mainactions.RandomFillDialog.randomFillOkay | ( | ) |
Action method to close the dialog with "OK".
Definition at line 215 of file RandomFillDialog.java.
References net.sf.gridarta.mainactions.RandomFillDialog.isOkButtonEnabled().
Here is the call graph for this function:| void net.sf.gridarta.mainactions.RandomFillDialog.setRandomFillSkipAdjacentSquares | ( | final boolean | skipAdjacentSquares | ) |
Action method for "skip adjacent squares" action.
| skipAdjacentSquares | whether the checkbox is checked |
Definition at line 235 of file RandomFillDialog.java.
References net.sf.gridarta.mainactions.RandomFillDialog.skipAdjacentSquares.
| boolean net.sf.gridarta.mainactions.RandomFillDialog.showRandomFillDialog | ( | @NotNull final Component | parent | ) |
Displays the random fill dialog.
| parent | the parent component for the dialog |
Definition at line 193 of file RandomFillDialog.java.
References net.sf.gridarta.mainactions.RandomFillDialog.dialog, net.sf.gridarta.utils.ActionBuilderUtils.getString(), net.sf.gridarta.mainactions.RandomFillDialog.isOkButtonEnabled(), and net.sf.gridarta.mainactions.RandomFillDialog.okButton.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Updates the enabled state of the "OK" button depending on the dialog's contents.
Definition at line 184 of file RandomFillDialog.java.
References net.sf.gridarta.mainactions.RandomFillDialog.isOkButtonEnabled().
Referenced by net.sf.gridarta.mainactions.RandomFillDialog.RandomFillDialog().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Action Builder to create Actions.
Definition at line 57 of file RandomFillDialog.java.
|
private |
The "Cancel" button.
Definition at line 75 of file RandomFillDialog.java.
|
private |
The JDialog instance or.
if not yet created.
Definition at line 87 of file RandomFillDialog.java.
Referenced by net.sf.gridarta.mainactions.RandomFillDialog.showRandomFillDialog().
|
private |
The text field for specifying the fill density.
Definition at line 81 of file RandomFillDialog.java.
|
private |
The "OK" button.
Definition at line 69 of file RandomFillDialog.java.
Referenced by net.sf.gridarta.mainactions.RandomFillDialog.RandomFillDialog(), and net.sf.gridarta.mainactions.RandomFillDialog.showRandomFillDialog().
|
private |
The JOptionPane instance used to create dialogs.
Definition at line 63 of file RandomFillDialog.java.
|
private |
Whether adjacent squares are checked.
Definition at line 92 of file RandomFillDialog.java.
Referenced by net.sf.gridarta.mainactions.RandomFillDialog.isRandomFillSkipAdjacentSquares(), and net.sf.gridarta.mainactions.RandomFillDialog.setRandomFillSkipAdjacentSquares().
|
private |
The WindowListener attached to dialog to call JOptionPane#selectInitialValue() after the dialog has been shown.
Definition at line 139 of file RandomFillDialog.java.