org.gscg.gameleader.dialogs.components
Class DialogPanelFactory

java.lang.Object
  extended byorg.gscg.gameleader.dialogs.components.DialogPanelFactory

public final class DialogPanelFactory
extends java.lang.Object

The DialogPanelFactory is used to create customized JPanels based on the object given to the factory. If the factory is not able to process the selected object, null is returned.

Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl . The source code and binary code of this software is proprietary information of Delft University of Technology.

Since:
1.0.3
Version:
$Revision: 1.1 $ $Date: 2005/06/16 12:34:09 $
Author:
Stijn-Pieter van Houten

Method Summary
static boolean addFactory(java.lang.Class clazz, DialogInterface dialogInterface)
          Method addFactory allows the adding of panel factories.
static javax.swing.JTabbedPane getPanel(java.lang.Object object)
          Method getPanel returns an panel based on the given object
static void setSimulator(nl.tudelft.simulation.dsol.simulators.SimulatorInterface simulator)
          Method setSimulator sets the simulator to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setSimulator

public static void setSimulator(nl.tudelft.simulation.dsol.simulators.SimulatorInterface simulator)
Method setSimulator sets the simulator to use.

Parameters:
simulator - the simulator to use

getPanel

public static javax.swing.JTabbedPane getPanel(java.lang.Object object)
Method getPanel returns an panel based on the given object

Parameters:
object - the selected object
Returns:
returns an initialized JPanel if the class of the actor is known, null otherwise

addFactory

public static boolean addFactory(java.lang.Class clazz,
                                 DialogInterface dialogInterface)
Method addFactory allows the adding of panel factories. Based on the class, a lookup is performed to determine the correct position of the factory in the list of factories. If there was no factory present for the given class, the factory is added and true is returned. If there is already a factory present, false is returned.

Parameters:
clazz - the class to add the factory for
dialogInterface - the dialogInterface
Returns:
returns false if the factory could not be added, e.g. when there is already a factory present for the given class


Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.