JGraph X 1.4.1.0


com.mxgraph.io.gml
Class mxGmlKey

java.lang.Object
  extended by com.mxgraph.io.gml.mxGmlKey

public class mxGmlKey
extends Object

Represents a Key element in the GML Structure.


Nested Class Summary
static class mxGmlKey.keyForValues
          Possibles values for the keyFor Attribute
static class mxGmlKey.keyTypeValues
          Possibles values for the keyType Attribute.
 
Constructor Summary
mxGmlKey(Element keyElement)
          Construct a key from a xml key element.
mxGmlKey(String keyId, mxGmlKey.keyForValues keyFor, String keyName, mxGmlKey.keyTypeValues keyType)
          Construct a key with the given parameters.
 
Method Summary
 mxGmlKey.keyForValues enumForValue(String value)
          Converts a String value in its corresponding enum value for the keyFor attribute.
 mxGmlKey.keyTypeValues enumTypeValue(String value)
          Converts a String value in its corresponding enum value for the keyType attribute.
 Element generateElement(Document document)
          Generates a Key Element from this class.
 String getKeyDefault()
           
 mxGmlKey.keyForValues getKeyFor()
           
 String getKeyId()
           
 String getKeyName()
           
 mxGmlKey.keyTypeValues getKeyType()
           
 void setKeyDefault(String keyDefault)
           
 void setKeyFor(mxGmlKey.keyForValues keyFor)
           
 void setKeyId(String keyId)
           
 void setKeyName(String keyName)
           
 void setKeyType(mxGmlKey.keyTypeValues keyType)
           
 String stringForValue(mxGmlKey.keyForValues value)
          Converts a enum value in its corresponding String value for the keyFor attribute.
 String stringTypeValue(mxGmlKey.keyTypeValues value)
          Converts a enum value in its corresponding string value for the keyType attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

mxGmlKey

public mxGmlKey(String keyId,
                mxGmlKey.keyForValues keyFor,
                String keyName,
                mxGmlKey.keyTypeValues keyType)
Construct a key with the given parameters.

Parameters:
keyId - Key's ID
keyFor - Scope of the key.
keyName - Key Name
keyType - Type of the values represented for this key.

mxGmlKey

public mxGmlKey(Element keyElement)
Construct a key from a xml key element.

Parameters:
keyElement - Xml key element.
Method Detail

getKeyDefault

public String getKeyDefault()

setKeyDefault

public void setKeyDefault(String keyDefault)

getKeyFor

public mxGmlKey.keyForValues getKeyFor()

setKeyFor

public void setKeyFor(mxGmlKey.keyForValues keyFor)

getKeyId

public String getKeyId()

setKeyId

public void setKeyId(String keyId)

getKeyName

public String getKeyName()

setKeyName

public void setKeyName(String keyName)

getKeyType

public mxGmlKey.keyTypeValues getKeyType()

setKeyType

public void setKeyType(mxGmlKey.keyTypeValues keyType)

generateElement

public Element generateElement(Document document)
Generates a Key Element from this class.

Parameters:
document - Document where the key Element will be inserted.
Returns:
Returns the generated Elements.

enumForValue

public mxGmlKey.keyForValues enumForValue(String value)
Converts a String value in its corresponding enum value for the keyFor attribute.

Parameters:
value - Value in String representation.
Returns:
Returns the value in its enum representation.

stringForValue

public String stringForValue(mxGmlKey.keyForValues value)
Converts a enum value in its corresponding String value for the keyFor attribute.

Parameters:
value - Value in enum representation.
Returns:
Returns the value in its String representation.

enumTypeValue

public mxGmlKey.keyTypeValues enumTypeValue(String value)
Converts a String value in its corresponding enum value for the keyType attribute.

Parameters:
value - Value in String representation.
Returns:
Returns the value in its enum representation.

stringTypeValue

public String stringTypeValue(mxGmlKey.keyTypeValues value)
Converts a enum value in its corresponding string value for the keyType attribute.

Parameters:
value - Value in enum representation.
Returns:
Returns the value in its String representation.

JGraph X 1.4.1.0


Copyright (c) 2010 Gaudenz Alder. All rights reserved.