|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.gml.ItemParser y.io.gml.LabelGraphicsParser
public class LabelGraphicsParser
This class will collect the general attributes from the LabelGraphics section in a GML file.
Field Summary | |
---|---|
static java.util.Map |
edgeLabelModelMap
|
static java.util.Map |
edgeLabelPosMap
|
static java.util.Map |
edgeLabelPrefMap
|
static java.util.Map |
externalNodeLabelPosMap
|
static java.util.Map |
internalNodeLabelPosMap
|
static java.util.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(java.lang.String alignment)
Decodes a GML text alignment value to one of YLabel.ALIGN_LEFT ,
YLabel.ALIGN_CENTER or YLabel.ALIGN_RIGHT , |
static byte |
decodeAutoSizePolicy(java.lang.String policy)
Decodes a GML value to one of the auto-size policy constants defined in class NodeLabel . |
static int |
decodeFontStyle(java.lang.String fontStyle)
Decodes a GML font-style value to one of Font.BOLD , Font.ITALIC
or Font.PLAIN . |
static byte |
decodeHorizontalTextPosition(java.lang.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 |
protected java.lang.String |
decodeType(java.lang.String externalName)
Returns the qualified class name for the given external name. |
static byte |
decodeVerticalTextPosition(java.lang.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(java.util.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 |
---|
public static final java.util.Map externalNodeLabelPosMap
public static final java.util.Map internalNodeLabelPosMap
public static final java.util.Map nodeLabelModelMap
public static final java.util.Map edgeLabelModelMap
public static final java.util.Map edgeLabelPosMap
public static final java.util.Map edgeLabelPrefMap
Constructor Detail |
---|
public LabelGraphicsParser()
Method Detail |
---|
public void setAttributes(java.util.Map attributes)
public void resetItem()
public void commitValues(YLabel label)
protected java.lang.String decodeType(java.lang.String externalName)
By default, this method delegates to YGFIOHandler.decode(String)
.
Note: To prevent obfuscation from breaking user data serialization, an explicit class name encoding should be specified for user data types.
YGFIOHandler.addEncoding(String, String)
,
LabelGraphicsEncoder.encodeType(String)
public static byte decodeAutoSizePolicy(java.lang.String policy)
NodeLabel
.
public static int decodeFontStyle(java.lang.String fontStyle)
Font.BOLD
, Font.ITALIC
or Font.PLAIN
.
public static byte decodeHorizontalTextPosition(java.lang.String htp)
YLabel.CENTER_TEXT_POSITION
, YLabel.RIGHT_TEXT_POSITION
,
YLabel.LEFT_TEXT_POSITION
, YLabel.LEFT_ALIGNED_TEXT_POSITION
or YLabel.RIGHT_ALIGNED_TEXT_POSITION
public static byte decodeVerticalTextPosition(java.lang.String htp)
YLabel.CENTER_TEXT_POSITION
, YLabel.TOP_TEXT_POSITION
or
YLabel.BOTTOM_TEXT_POSITION
.
public static byte decodeAlignment(java.lang.String alignment)
YLabel.ALIGN_LEFT
,
YLabel.ALIGN_CENTER
or YLabel.ALIGN_RIGHT
,
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |