![]() |
Gridarta Editor
|
Dialog used to ask the user the properties for the new level. More...
Public Member Functions | |
void | mapCancel () |
Action method for cancel. More... | |
void | mapOkay () |
Action method for okay. More... | |
void | setValue (@Nullable final Object newValue) |
Protected Member Functions | |
AbstractNewMapDialog () | |
Constructs a new map dialog. More... | |
void | addDocumentListener (@NotNull final JTextComponent textComponent) |
Watches for text changes in a text component and enables the "OK" button accordingly. More... | |
abstract void | addFields (@NotNull JPanel panel, @NotNull GridBagConstraints gbcLabel, @NotNull GridBagConstraints gbcField) |
Adds additional fields to the dialog. More... | |
abstract JPanel | createMapNamePanel () |
JPanel | createMapParametersPanel () |
abstract boolean | createNew () |
Checks the given values and creates a new map. More... | |
void | init1 (@NotNull final Component parentComponent, @NotNull final String dialogTitle) |
Initializes the dialog. More... | |
void | init2 () |
Initializes the dialog. More... | |
boolean | isOkButtonEnabled () |
Returns whether the "OK" button is enabled depending on the dialog's contents. More... | |
void | updateOkButton () |
Updates the enabled state of the "OK" button depending on the dialog's contents. More... | |
Static Protected Attributes | |
static final Preferences | PREFERENCES = Preferences.userNodeForPackage(MainControl.class) |
Preferences. More... | |
Private Member Functions | |
JPanel | createPanel () |
Private Attributes | |
final JButton | cancelButton = new JButton(ACTION_BUILDER.createAction(false, "mapCancel", this)) |
JButton for cancel. More... | |
JDialog | dialog |
final DocumentListener | documentListener |
The DocumentListener attached to input fields for detecting changes. More... | |
final JButton | okButton = new JButton(ACTION_BUILDER.createAction(false, "mapOkay", this)) |
JButton for ok. More... | |
Static Private Attributes | |
static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
Action Builder. More... | |
static final long | serialVersionUID = 1L |
Serial Version UID. More... | |
Dialog used to ask the user the properties for the new level.
Contains a tabbed pane for creating a level either based on a template or from a scratch.
Definition at line 62 of file AbstractNewMapDialog.java.
|
protected |
Constructs a new map dialog.
Builds the dialog UI.
Definition at line 123 of file AbstractNewMapDialog.java.
|
protected |
Watches for text changes in a text component and enables the "OK" button accordingly.
textComponent | the text component to watch |
Definition at line 250 of file AbstractNewMapDialog.java.
|
abstractprotected |
Adds additional fields to the dialog.
Will be called once when the dialog is created.
panel | the panel to add the fields to |
gbcLabel | the grid bag constraints for the label part |
gbcField | the grid bag constraints for the input field |
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.createMapParametersPanel().
|
abstractprotected |
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.createPanel().
|
protected |
Definition at line 170 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.createPanel().
|
abstractprotected |
Checks the given values and creates a new map.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.mapOkay().
|
private |
Definition at line 154 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.init1().
|
protected |
Initializes the dialog.
parentComponent | the parent component of this dialog |
dialogTitle | the dialog's title |
Definition at line 131 of file AbstractNewMapDialog.java.
|
protected |
Initializes the dialog.
Definition at line 148 of file AbstractNewMapDialog.java.
|
protected |
Returns whether the "OK" button is enabled depending on the dialog's contents.
Definition at line 241 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.mapOkay(), and net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.updateOkButton().
void net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapCancel | ( | ) |
Action method for cancel.
Definition at line 209 of file AbstractNewMapDialog.java.
void net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapOkay | ( | ) |
Action method for okay.
Definition at line 199 of file AbstractNewMapDialog.java.
void net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setValue | ( | @Nullable final Object | newValue | ) |
Definition at line 214 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.mapCancel(), and net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.mapOkay().
|
protected |
Updates the enabled state of the "OK" button depending on the dialog's contents.
Definition at line 232 of file AbstractNewMapDialog.java.
|
staticprivate |
Action Builder.
Definition at line 73 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.createMapParametersPanel().
|
private |
JButton for cancel.
Definition at line 91 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.init1(), and net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.mapCancel().
|
private |
Definition at line 94 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.init1(), net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.init2(), and net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.setValue().
|
private |
The DocumentListener attached to input fields for detecting changes.
Definition at line 101 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.addDocumentListener().
|
private |
JButton for ok.
Definition at line 85 of file AbstractNewMapDialog.java.
Referenced by net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.init1(), net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.mapOkay(), and net.sf.gridarta.gui.dialog.newmap.AbstractNewMapDialog< G, A, R >.updateOkButton().
|
staticprotected |
Preferences.
Definition at line 79 of file AbstractNewMapDialog.java.
|
staticprivate |
Serial Version UID.
Definition at line 67 of file AbstractNewMapDialog.java.