Find topicGeneral websWeb toolsHelp |
-- JonMorra - 01 Mar 2006
The way that data is passed around in all of the classes that extend AbstractGUI have now changed
Now everything that extends AbstractGUI takes in a Map with some basic parameters. Every AbstractGUI must have a Container and a GUIComponent, the same as before but now they are in a map with keys AbstractGUI.CONTAINER and AbstractGUI.COMPONENT. For example, java.util.Map inputs = new Hashtable(); inputs.put(AbstractGUI.CONTAINER, dialog); inputs.put(AbstractGUI.COMPONENT, getFrame());
Then, every class that extends AbstractGUI can define other things that its input map must have. For instance every EditModuleGUI has a module as inputs. So, in addition to the above code you would have to add the following in order to properly create an EditModuleGUI Whenever creating a new GUI class make sure to follow the convention of having all of the parameters that the GUI needs as public final static Strings as class variables. Therefore, whenever someone is trying to create this new GUI, they know what it needs (in addition to the requirements of all parent classes). The reason behind this change was to use the createObject method in edu.ucla.loni.Pipline so that the DialogManager could handle the creation of all possible GUIs. |