Gridarta Editor
net.sf.gridarta.mainactions.MassChangeDialog Class Reference

Displays a dialog asking for parameters for the "mass change" function. More...

+ Collaboration diagram for net.sf.gridarta.mainactions.MassChangeDialog:

Public Member Functions

String [] getArchNames ()
 Returns the arch names to affect. More...
 
String getChanges ()
 Returns the actual changes to apply. More...
 
Integer [] getLayers ()
 Returns the layers to affect. More...
 
String [] getNames ()
 Returns the object names to affect. More...
 
Integer [] getSubLayers ()
 Returns the sub-layers to affect. More...
 
void massChangeCancel ()
 Action method to close the dialog with "Cancel". More...
 
 MassChangeDialog ()
 Creates a new instance. More...
 
void massChangeOkay ()
 Action method to close the dialog with "OK". More...
 
boolean showMassChangeDialog (@NotNull final Component parent)
 Displays the mass change 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 JTextComponent archNamesTextField = new JTextField(50)
 The text field for specifying the arch names to match. More...
 
final JButton cancelButton = new JButton(ACTION_BUILDER.createAction(false, "massChangeCancel", this))
 The "Cancel" button. More...
 
final JTextArea changesTextArea = new JTextArea()
 The text area for specifying the changes to add. More...
 
JDialog dialog
 The javax.swing.JDialog instance or. More...
 
final JTextComponent layersTextField = new JTextField(50)
 The text field for specifying the layers to match. More...
 
final JTextComponent namesTextField = new JTextField(50)
 The text field for specifying the object names to match. More...
 
final JButton okButton = new JButton(ACTION_BUILDER.createAction(false, "massChangeOkay", this))
 The "OK" button. More...
 
final JOptionPane optionPane = new JOptionPane()
 The javax.swing.JOptionPane instance used to create dialogs. More...
 
final JTextComponent subLayersTextField = new JTextField(50)
 The text field for specifying the sub-layers to match. More...
 
final WindowListener windowListener
 The java.awt.event.WindowListener attached to dialog to call javax.swing.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...
 

Detailed Description

Displays a dialog asking for parameters for the "mass change" function.

Author
Alex Tokar

Definition at line 55 of file MassChangeDialog.java.

Constructor & Destructor Documentation

◆ MassChangeDialog()

Member Function Documentation

◆ getArchNames()

String [] net.sf.gridarta.mainactions.MassChangeDialog.getArchNames ( )

Returns the arch names to affect.

Returns
the arch names.

Definition at line 287 of file MassChangeDialog.java.

Referenced by net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doMassChange().

+ Here is the caller graph for this function:

◆ getChanges()

String net.sf.gridarta.mainactions.MassChangeDialog.getChanges ( )

Returns the actual changes to apply.

Returns
the changes.

Definition at line 351 of file MassChangeDialog.java.

Referenced by net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doMassChange().

+ Here is the caller graph for this function:

◆ getLayers()

Integer [] net.sf.gridarta.mainactions.MassChangeDialog.getLayers ( )

Returns the layers to affect.

Returns
the layers.

Definition at line 319 of file MassChangeDialog.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 >.doMassChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNames()

String [] net.sf.gridarta.mainactions.MassChangeDialog.getNames ( )

Returns the object names to affect.

Returns
the object names.

Definition at line 303 of file MassChangeDialog.java.

Referenced by net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doMassChange().

+ Here is the caller graph for this function:

◆ getSubLayers()

Integer [] net.sf.gridarta.mainactions.MassChangeDialog.getSubLayers ( )

Returns the sub-layers to affect.

Returns
the sub-layers.

Definition at line 335 of file MassChangeDialog.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 >.doMassChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isOkButtonEnabled()

boolean net.sf.gridarta.mainactions.MassChangeDialog.isOkButtonEnabled ( )
private

Returns whether the "OK" button is enabled.

Returns
whether the "OK" button is enabled

Definition at line 278 of file MassChangeDialog.java.

Referenced by net.sf.gridarta.mainactions.MassChangeDialog.massChangeOkay(), net.sf.gridarta.mainactions.MassChangeDialog.showMassChangeDialog(), and net.sf.gridarta.mainactions.MassChangeDialog.updateOkButton().

+ Here is the caller graph for this function:

◆ massChangeCancel()

void net.sf.gridarta.mainactions.MassChangeDialog.massChangeCancel ( )

Action method to close the dialog with "Cancel".

Definition at line 270 of file MassChangeDialog.java.

◆ massChangeOkay()

void net.sf.gridarta.mainactions.MassChangeDialog.massChangeOkay ( )

Action method to close the dialog with "OK".

Definition at line 260 of file MassChangeDialog.java.

References net.sf.gridarta.mainactions.MassChangeDialog.isOkButtonEnabled().

+ Here is the call graph for this function:

◆ showMassChangeDialog()

boolean net.sf.gridarta.mainactions.MassChangeDialog.showMassChangeDialog ( @NotNull final Component  parent)

Displays the mass change dialog.

Parameters
parentthe parent component for the dialog
Returns
whether the dialog was closed with "OK"

Definition at line 236 of file MassChangeDialog.java.

References net.sf.gridarta.mainactions.MassChangeDialog.dialog, net.sf.gridarta.utils.ActionBuilderUtils.getString(), net.sf.gridarta.mainactions.MassChangeDialog.isOkButtonEnabled(), and net.sf.gridarta.mainactions.MassChangeDialog.okButton.

Referenced by net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doMassChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateOkButton()

void net.sf.gridarta.mainactions.MassChangeDialog.updateOkButton ( )
private

Updates the enabled state of the "OK" button depending on the dialog's contents.

Definition at line 227 of file MassChangeDialog.java.

References net.sf.gridarta.mainactions.MassChangeDialog.isOkButtonEnabled().

Referenced by net.sf.gridarta.mainactions.MassChangeDialog.MassChangeDialog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ ACTION_BUILDER

final ActionBuilder net.sf.gridarta.mainactions.MassChangeDialog.ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta")
staticprivate

Action Builder to create Actions.

Definition at line 61 of file MassChangeDialog.java.

◆ archNamesTextField

final JTextComponent net.sf.gridarta.mainactions.MassChangeDialog.archNamesTextField = new JTextField(50)
private

The text field for specifying the arch names to match.

Definition at line 85 of file MassChangeDialog.java.

◆ cancelButton

final JButton net.sf.gridarta.mainactions.MassChangeDialog.cancelButton = new JButton(ACTION_BUILDER.createAction(false, "massChangeCancel", this))
private

The "Cancel" button.

Definition at line 79 of file MassChangeDialog.java.

◆ changesTextArea

final JTextArea net.sf.gridarta.mainactions.MassChangeDialog.changesTextArea = new JTextArea()
private

The text area for specifying the changes to add.

Definition at line 116 of file MassChangeDialog.java.

◆ dialog

JDialog net.sf.gridarta.mainactions.MassChangeDialog.dialog
private

The javax.swing.JDialog instance or.

null

if not yet created.

Definition at line 110 of file MassChangeDialog.java.

Referenced by net.sf.gridarta.mainactions.MassChangeDialog.showMassChangeDialog().

◆ layersTextField

final JTextComponent net.sf.gridarta.mainactions.MassChangeDialog.layersTextField = new JTextField(50)
private

The text field for specifying the layers to match.

Definition at line 97 of file MassChangeDialog.java.

◆ namesTextField

final JTextComponent net.sf.gridarta.mainactions.MassChangeDialog.namesTextField = new JTextField(50)
private

The text field for specifying the object names to match.

Definition at line 91 of file MassChangeDialog.java.

◆ okButton

final JButton net.sf.gridarta.mainactions.MassChangeDialog.okButton = new JButton(ACTION_BUILDER.createAction(false, "massChangeOkay", this))
private

◆ optionPane

final JOptionPane net.sf.gridarta.mainactions.MassChangeDialog.optionPane = new JOptionPane()
private

The javax.swing.JOptionPane instance used to create dialogs.

Definition at line 67 of file MassChangeDialog.java.

◆ subLayersTextField

final JTextComponent net.sf.gridarta.mainactions.MassChangeDialog.subLayersTextField = new JTextField(50)
private

The text field for specifying the sub-layers to match.

Definition at line 103 of file MassChangeDialog.java.

◆ windowListener

final WindowListener net.sf.gridarta.mainactions.MassChangeDialog.windowListener
private

The java.awt.event.WindowListener attached to dialog to call javax.swing.JOptionPane#selectInitialValue() after the dialog has been shown.

Definition at line 182 of file MassChangeDialog.java.


The documentation for this class was generated from the following file: