Search this API

y.io.gml
Class LabelGraphicsEncoder

java.lang.Object
  extended by y.io.gml.LabelGraphicsEncoder
All Implemented Interfaces:
ObjectEncoder
Direct Known Subclasses:
EdgeLabelGraphicsEncoder, NodeLabelGraphicsEncoder

public class LabelGraphicsEncoder
extends Object
implements ObjectEncoder

This class can encode YLabels in valid GML


Constructor Summary
LabelGraphicsEncoder()
           
 
Method Summary
 void encode(Object item, GMLEncoder enc)
          This method will try to encode the given object using the GMLEncoder
static String encodeAlignment(byte alignment)
          Encodes a YLabel YLabel.getAlignment() to a string.
static String encodeFontStyle(int style)
          Encodes the Font.getStyle() to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelGraphicsEncoder

public LabelGraphicsEncoder()
Method Detail

encode

public void encode(Object item,
                   GMLEncoder enc)
            throws IOException
Description copied from interface: ObjectEncoder
This method will try to encode the given object using the GMLEncoder

Specified by:
encode in interface ObjectEncoder
Throws:
IOException - in the case of an I/O exception
Parameters:
item - the object to be encoded
enc - an encoder

encodeFontStyle

public static String encodeFontStyle(int style)
Encodes the Font.getStyle() to a string.


encodeAlignment

public static String encodeAlignment(byte alignment)
Encodes a YLabel YLabel.getAlignment() to a string.


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