JGraphpad Pro
v6.0.5.0


com.jgraph.pad.factory
Class JGraphpadComboBox.ColorComboFactoryMethod

java.lang.Object
  extended bycom.jgraph.editor.factory.JGraphEditorFactoryMethod
      extended bycom.jgraph.pad.factory.JGraphpadComboBox.ColorComboFactoryMethod
Enclosing class:
JGraphpadComboBox

public static class JGraphpadComboBox.ColorComboFactoryMethod
extends JGraphEditorFactoryMethod

Provides a factory method to construct a color combo box.


Field Summary
static String NAME
          Defines the default name for factory methods of this kind.
protected  int type
          Specifies the type of the color combo box.
 
Fields inherited from class com.jgraph.editor.factory.JGraphEditorFactoryMethod
name
 
Constructor Summary
JGraphpadComboBox.ColorComboFactoryMethod()
          Constructs a color combo box of type JGraphpadComboBox.TYPE_BACKGROUND using NAME.
JGraphpadComboBox.ColorComboFactoryMethod(String name, int type)
          Constructs a color combo box of the specified type.
 
Method Summary
 Component createInstance(Node configuration)
          Returns a new component for the specified configuration.
protected  void setColor(Map m, Color color)
          Sets the specified color in map according to the type of the combo box.
 
Methods inherited from class com.jgraph.editor.factory.JGraphEditorFactoryMethod
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static String NAME
Defines the default name for factory methods of this kind.


type

protected int type
Specifies the type of the color combo box.

Constructor Detail

JGraphpadComboBox.ColorComboFactoryMethod

public JGraphpadComboBox.ColorComboFactoryMethod()
Constructs a color combo box of type JGraphpadComboBox.TYPE_BACKGROUND using NAME.


JGraphpadComboBox.ColorComboFactoryMethod

public JGraphpadComboBox.ColorComboFactoryMethod(String name,
                                                 int type)
Constructs a color combo box of the specified type.

Parameters:
type - The type of the combo box to be created.
Method Detail

createInstance

public Component createInstance(Node configuration)
Description copied from class: JGraphEditorFactoryMethod
Returns a new component for the specified configuration.

Specified by:
createInstance in class JGraphEditorFactoryMethod
Parameters:
configuration - The configuration to create the component with.
Returns:
Returns a new component.

setColor

protected void setColor(Map m,
                        Color color)
Sets the specified color in map according to the type of the combo box.

Parameters:
m - The map to set the color in.
color - The color to be set.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.