Search this API

y.io.gml
Class LabelGraphicsParser

java.lang.Object
  extended by y.io.gml.ItemParser
      extended by 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.
static byte decodeHorizontalTextPosition(String htp)
          Decodes a GML horizontalTextPosition value to one of YLabel.CENTER_TEXT_POSITION, YLabel.RIGHT_TEXT_POSITION, YLabel.LEFT_TEXT_POSITION, YLabel.LEFT_ALIGNED_TEXT_POSITION or YLabel.RIGHT_ALIGNED_TEXT_POSITION
static byte decodeVerticalTextPosition(String htp)
          Decodes a GML verticalTextPosition value to one of YLabel.CENTER_TEXT_POSITION, YLabel.TOP_TEXT_POSITION or YLabel.BOTTOM_TEXT_POSITION.
 void resetItem()
          Resets the internally help attribute map.
 void setAttributes(Map attributes)
          Sets the internally used attribute 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 attribute 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.


decodeHorizontalTextPosition

public static byte decodeHorizontalTextPosition(String htp)
Decodes a GML horizontalTextPosition value to one of YLabel.CENTER_TEXT_POSITION, YLabel.RIGHT_TEXT_POSITION, YLabel.LEFT_TEXT_POSITION, YLabel.LEFT_ALIGNED_TEXT_POSITION or YLabel.RIGHT_ALIGNED_TEXT_POSITION


decodeVerticalTextPosition

public static byte decodeVerticalTextPosition(String htp)
Decodes a GML verticalTextPosition value to one of YLabel.CENTER_TEXT_POSITION, YLabel.TOP_TEXT_POSITION or YLabel.BOTTOM_TEXT_POSITION.


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-2013,
yWorks GmbH.
All rights reserved.