nl.tudelft.simulation.introspection.mapping
Class DefaultConfiguration

java.lang.Object
  extended by nl.tudelft.simulation.introspection.mapping.DefaultConfiguration
All Implemented Interfaces:
CellPresentationConfiguration

public class DefaultConfiguration
extends Object
implements CellPresentationConfiguration

A default implementation of the {see CellPresentationConfiguration} interface. Editors and renders are provided for the JComponent, Color and Font classes. Furthermore, a special editor is provided for the ExpandButton class, to implement the pop-up behaviour of the {see nl.tudelft.simulation.introspection.gui.ExpandButton}.

Author:
(c) 2003 Delft University of Technology , Delft, the Netherlands
Faculty of Technology, Policy and Management
Department of System Engineering
Main researcher : Dr. Ir. A. Verbraeck
Assistant researchers
Ir. P.H.M. Jacobs and Ir. N.A. Lang

Constructor Summary
DefaultConfiguration()
           
 
Method Summary
protected  void addEditor(Class cellType, Class editingClass)
          adds an editingClass to a cellType
protected  void addRenderer(Class cellType, Class renderingClass)
          adds a renderer to the configuration
static CellPresentationConfiguration getDefaultConfiguration()
           
 Class[][] getEditors()
          Returns all the cell-editor combinations available in this configuration
 Class[][] getRenderers()
          Returns all the cell-renderer combinations available in this configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfiguration

public DefaultConfiguration()
Method Detail

getDefaultConfiguration

public static CellPresentationConfiguration getDefaultConfiguration()
Returns:
Returns the defaultConfiguration

addRenderer

protected void addRenderer(Class cellType,
                           Class renderingClass)
adds a renderer to the configuration

Parameters:
cellType - the cellType
renderingClass - the renderingClass

addEditor

protected void addEditor(Class cellType,
                         Class editingClass)
adds an editingClass to a cellType

Parameters:
cellType - the cellType
editingClass - an editingClass

getRenderers

public Class[][] getRenderers()
Description copied from interface: CellPresentationConfiguration
Returns all the cell-renderer combinations available in this configuration

Specified by:
getRenderers in interface CellPresentationConfiguration
Returns:
A double class array of cardinality M-2. Tuple [i][j] defines M cell class - render class combinations, with 'i' identifying the row. 'j=0' identifies the cell class, 'j=1' identifies the renderer class.
See Also:
#getRenderers()

getEditors

public Class[][] getEditors()
Description copied from interface: CellPresentationConfiguration
Returns all the cell-editor combinations available in this configuration

Specified by:
getEditors in interface CellPresentationConfiguration
Returns:
A double class array of cardinality M-2. Tuple [i][j] defines M cell class - editor class combinations, with 'i' identifying the row. 'j=0' identifies the cell class, 'j=1' identifies the editor class.
See Also:
#getEditors()


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