y.io.gml
Class LabelGraphicsParser

java.lang.Object
  |
  +--y.io.gml.ItemParser
        |
        +--y.io.gml.LabelGraphicsParser
All Implemented Interfaces:
GMLTokenizer.Callback

public class LabelGraphicsParser
extends ItemParser

This class will collect the general attributes from the LabelGraphics section in a GML file.


Field Summary
static Map edgeLabelModelMap
           
static Map edgeLabelPosMap
           
static Map edgeLabelPrefMap
           
static Map externalNodeLabelPosMap
           
static Map internalNodeLabelPosMap
           
static Map nodeLabelModelMap
           
 
Fields inherited from class y.io.gml.ItemParser
attributes, childMap, delegate, level
 
Constructor Summary
LabelGraphicsParser()
           
 
Method Summary
 void commitValues(YLabel label)
          Commits the parsed values to a YLabel instance.
static byte decodeAlignment(String alignment)
          Decodes a GML text alignment value to one of YLabel.ALIGN_LEFT, YLabel.ALIGN_CENTER or YLabel.ALIGN_RIGHT,
static byte decodeAutoSizePolicy(String policy)
          Decodes a GML value to one of the auto-size policy constants defined in class NodeLabel.
static int decodeFontStyle(String fontStyle)
          Decodes a GML font-style value to one of Font.BOLD, Font.ITALIC or Font.PLAIN.
 void resetItem()
          Resets the internally help attribute map.
 void setAttributes(Map attributes)
          Sets the internally used attibute map.
 
Methods inherited from class y.io.gml.ItemParser
addAttribute, addChild, attribute, attribute, begin, beginScope, childFinished, end, endScope, getAttributes, getBoolean, getDouble, getDouble, getInt, getInt, getItem, getLevel, getString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

externalNodeLabelPosMap

public static final Map externalNodeLabelPosMap

internalNodeLabelPosMap

public static final Map internalNodeLabelPosMap

nodeLabelModelMap

public static final Map nodeLabelModelMap

edgeLabelModelMap

public static final Map edgeLabelModelMap

edgeLabelPosMap

public static final Map edgeLabelPosMap

edgeLabelPrefMap

public static final Map edgeLabelPrefMap
Constructor Detail

LabelGraphicsParser

public LabelGraphicsParser()
Method Detail

setAttributes

public void setAttributes(Map attributes)
Sets the internally used attibute map.


resetItem

public void resetItem()
Resets the internally help attribute map.


commitValues

public void commitValues(YLabel label)
Commits the parsed values to a YLabel instance.


decodeAutoSizePolicy

public static byte decodeAutoSizePolicy(String policy)
Decodes a GML value to one of the auto-size policy constants defined in class NodeLabel.


decodeFontStyle

public static int decodeFontStyle(String fontStyle)
Decodes a GML font-style value to one of Font.BOLD, Font.ITALIC or Font.PLAIN.


decodeAlignment

public static byte decodeAlignment(String alignment)
Decodes a GML text alignment value to one of YLabel.ALIGN_LEFT, YLabel.ALIGN_CENTER or YLabel.ALIGN_RIGHT,


© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003