Gridarta 9263
API Documentation

net.sf.gridarta.gui.dialog.gameobjectattributes
Class TypesBoxItemListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>

java.lang.Object
  extended by net.sf.gridarta.gui.dialog.gameobjectattributes.TypesBoxItemListener<G,A,R>
All Implemented Interfaces:
ItemListener, EventListener

public class TypesBoxItemListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends Object
implements ItemListener

ItemListener for the type-selection box on the attribute-dialog.

Author:
Christian Hujer, Andreas Kirschbaum

Field Summary
private  ArchetypeType archetypeType
          Reference to the type data.
private  ArchetypeTypeSet archetypeTypeSet
          The ArchetypeTypeSet to display.
private  String deselected
          The latest deselected item.
private  Collection<DialogAttribute<G,A,R,?>> dialogAttributes
          The DialogAttributes to update.
private  GameObject<G,A,R> gameObject
          The game object which has the error to be added.
private  GameObjectAttributesDialog<G,A,R> gameObjectAttributesDialog
          The attribute dialog main frame.
private  boolean ignoreEvent
          While true, this listener ignores all events.
private  int type
          The position of this type in the type list.
private  JComboBox typeComboBox
          The selection box for the type.
 
Constructor Summary
TypesBoxItemListener(GameObjectAttributesDialog<G,A,R> frameNew, GameObject<G,A,R> gameObject, int type, ArchetypeTypeSet archetypeTypeSet, Collection<DialogAttribute<G,A,R,?>> dialogAttributes, JComboBox typeComboBox, ArchetypeType archetypeType)
          Creates a new instance.
 
Method Summary
 ArchetypeType getArchetypeType()
          Returns a reference to the type data.
 void itemStateChanged(ItemEvent e)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gameObjectAttributesDialog

@NotNull
private final GameObjectAttributesDialog<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> gameObjectAttributesDialog
The attribute dialog main frame.


gameObject

@NotNull
private final GameObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> gameObject
The game object which has the error to be added.


archetypeTypeSet

@NotNull
private final ArchetypeTypeSet archetypeTypeSet
The ArchetypeTypeSet to display.


dialogAttributes

@NotNull
private final Collection<DialogAttribute<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,?>> dialogAttributes
The DialogAttributes to update.


typeComboBox

@NotNull
private final JComboBox typeComboBox
The selection box for the type.


archetypeType

@NotNull
private ArchetypeType archetypeType
Reference to the type data.


deselected

@Nullable
private String deselected
The latest deselected item.


ignoreEvent

private boolean ignoreEvent
While true, this listener ignores all events.


type

private int type
The position of this type in the type list. This differs from the GameObject if the type is undefined.

Constructor Detail

TypesBoxItemListener

public TypesBoxItemListener(@NotNull
                            GameObjectAttributesDialog<G,A,R> frameNew,
                            @NotNull
                            GameObject<G,A,R> gameObject,
                            int type,
                            @NotNull
                            ArchetypeTypeSet archetypeTypeSet,
                            @NotNull
                            Collection<DialogAttribute<G,A,R,?>> dialogAttributes,
                            @NotNull
                            JComboBox typeComboBox,
                            @NotNull
                            ArchetypeType archetypeType)
Creates a new instance.

Parameters:
frameNew - the attribute dialog main frame
gameObject - the game object which has the error to be added
type - the initially selected type
archetypeTypeSet - the archetype type set to display
dialogAttributes - the dialog attributes to update
typeComboBox - the selection box for the type
archetypeType - the references to the data type
Method Detail

itemStateChanged

public void itemStateChanged(ItemEvent e)

Specified by:
itemStateChanged in interface ItemListener

getArchetypeType

@NotNull
public ArchetypeType getArchetypeType()
Returns a reference to the type data.

Returns:
the reference

Gridarta 9263
API Documentation

SourceForge.net Logo Support This Project freshmeat.net Valid CSS! Feedback: webmaster