vooga.levelEditor.model
Class ObjectBrowserModel

java.lang.Object
  extended by java.util.Observable
      extended by vooga.levelEditor.model.ObjectBrowserModel

public class ObjectBrowserModel
extends java.util.Observable

This is the data model for the Game Object Browser. It includes a TreeModel that contains a hierarchical tree of GameItems, as well as methods for creating and modifying the tree.

Author:
Phil Puryear

Constructor Summary
ObjectBrowserModel()
          Constructs a new ObjectBrowserModel.
 
Method Summary
 void buildClassTree(java.util.Set<java.lang.Class<? extends GameItem>> classes, LevelEditorModel leModel)
          Constructs a new tree model that organizes all of the classes in classes hierarchically according to their inheritance structure, with GameItem as the root.
 javax.swing.tree.TreeModel getObjectTreeModel()
          Returns the current tree model.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectBrowserModel

public ObjectBrowserModel()
Constructs a new ObjectBrowserModel. The tree model initially contains no data.

Method Detail

getObjectTreeModel

public javax.swing.tree.TreeModel getObjectTreeModel()
Returns the current tree model.


buildClassTree

public void buildClassTree(java.util.Set<java.lang.Class<? extends GameItem>> classes,
                           LevelEditorModel leModel)
Constructs a new tree model that organizes all of the classes in classes hierarchically according to their inheritance structure, with GameItem as the root. Notifies any observers when done.

Parameters:
classes - A list of classes extending from GameItem.