Gridarta Editor
net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Class Template Reference

A dialog that displays archetypes. More...

+ Inheritance diagram for net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:

Public Member Functions

void browseArchetypesAddAttribute ()
 Action method for "add attribute". More...
 
 BrowseArchetypesDialog (@NotNull final Component parentComponent, @NotNull final ArchetypeChooserControl< G, A, R > archetypeChooserControl, @NotNull final ObjectChooser< G, A, R > objectChooser, @NotNull final ArchetypeSet< G, A, R > archetypeSet, @NotNull final ImageIcon closingIcon)
 Creates a new instance. More...
 
void browseArchetypesSave ()
 Action method for saving the current list to a CSV file. More...
 
void showDialog ()
 Opens the dialog. More...
 

Private Member Functions

JPanel createPanel ()
 Creates the GUI. More...
 
boolean doAddAttribute (final boolean performAction)
 Adds an attribute to the table. More...
 
void highlightSelectedEntry ()
 Highlights the selected row from archetypesTable in the insertion object chooser. More...
 
void updateActions ()
 Updates the actions' states to reflect the current selection. More...
 
void updateComboBox ()
 Updates the contents of addAttributeComboBoxModel. More...
 

Private Attributes

final JButton addAttributeButton
 The button for adding the selected attribute to archetypesTable. More...
 
final JComboBox< String > addAttributeComboBox
 The attribute to add to archetypesTable if {} is selected. More...
 
final DefaultComboBoxModel< String > addAttributeComboBoxModel = new DefaultComboBoxModel<>()
 The model of addAttributeComboBox. More...
 
final ArchetypeChooserControl< G, A, R > archetypeChooserControl
 The archetype set to search. More...
 
final JTable archetypesTable
 The JTable showing the selected archetypes. More...
 
final BrowseArchetypesTableModel< G, A, R > archetypesTableModel
 The model of archetypesTable. More...
 
final Collection< String > availableAttributes = new TreeSet<>()
 The attribute names currently not shown. More...
 
final JFileChooser chooser = new JFileChooser()
 The JFileChooser for saving CSV files. More...
 
final JDialog dialog
 The dialog. More...
 
final ObjectChooser< G, A, R > objectChooser
 The insertion object chooser to use when selecting search results. More...
 

Static Private Attributes

static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta")
 The ActionBuilder. More...
 
static final long serialVersionUID = 1L
 The serial Version UID. More...
 

Detailed Description

A dialog that displays archetypes.

Author
Andreas Kirschbaum

Definition at line 69 of file BrowseArchetypesDialog.java.

Constructor & Destructor Documentation

◆ BrowseArchetypesDialog()

net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.BrowseArchetypesDialog ( @NotNull final Component  parentComponent,
@NotNull final ArchetypeChooserControl< G, A, R >  archetypeChooserControl,
@NotNull final ObjectChooser< G, A, R >  objectChooser,
@NotNull final ArchetypeSet< G, A, R >  archetypeSet,
@NotNull final ImageIcon  closingIcon 
)

Creates a new instance.

Parameters
parentComponentthe parent component for the dialog
archetypeChooserControlthe archetype chooser control to to search
objectChooserthe object chooser to use when selecting search results
archetypeSetthe archetype set to show
closingIconthe icon to display in the closing buttons of the table

Whether the mouse button is currently pressed.

Definition at line 157 of file BrowseArchetypesDialog.java.

Member Function Documentation

◆ browseArchetypesAddAttribute()

void net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.browseArchetypesAddAttribute ( )

Action method for "add attribute".

Definition at line 294 of file BrowseArchetypesDialog.java.

◆ browseArchetypesSave()

void net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.browseArchetypesSave ( )

Action method for saving the current list to a CSV file.

Definition at line 302 of file BrowseArchetypesDialog.java.

◆ createPanel()

JPanel net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createPanel ( )
private

Creates the GUI.

Returns
the panel containing the GUI

Definition at line 277 of file BrowseArchetypesDialog.java.

Referenced by net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G, A, R >.BrowseArchetypesDialog().

+ Here is the caller graph for this function:

◆ doAddAttribute()

boolean net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddAttribute ( final boolean  performAction)
private

Adds an attribute to the table.

Parameters
performActionwhether the action should be performed
Returns
whether the action can or was performed

Definition at line 325 of file BrowseArchetypesDialog.java.

Referenced by net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G, A, R >.browseArchetypesAddAttribute(), and net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G, A, R >.updateActions().

+ Here is the caller graph for this function:

◆ highlightSelectedEntry()

void net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.highlightSelectedEntry ( )
private

Highlights the selected row from archetypesTable in the insertion object chooser.

Definition at line 369 of file BrowseArchetypesDialog.java.

Referenced by net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G, A, R >.BrowseArchetypesDialog().

+ Here is the caller graph for this function:

◆ showDialog()

void net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.showDialog ( )

◆ updateActions()

void net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions ( )
private

Updates the actions' states to reflect the current selection.

Definition at line 349 of file BrowseArchetypesDialog.java.

Referenced by net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G, A, R >.BrowseArchetypesDialog(), and net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G, A, R >.doAddAttribute().

+ Here is the caller graph for this function:

◆ updateComboBox()

void net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateComboBox ( )
private

Member Data Documentation

◆ ACTION_BUILDER

final ActionBuilder net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta")
staticprivate

◆ addAttributeButton

◆ addAttributeComboBox

◆ addAttributeComboBoxModel

◆ archetypeChooserControl

◆ archetypesTable

◆ archetypesTableModel

◆ availableAttributes

◆ chooser

◆ dialog

◆ objectChooser

◆ serialVersionUID

final long net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.serialVersionUID = 1L
staticprivate

The serial Version UID.

Definition at line 74 of file BrowseArchetypesDialog.java.


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