Search this API

y.view
Class NodeLabel

java.lang.Object
  extended by y.view.YLabel
      extended by y.view.NodeLabel
All Implemented Interfaces:
LabelLayout, NodeLabelLayout

public class NodeLabel
extends YLabel
implements NodeLabelLayout

This class represents a label associated with a NodeRealizer.

NodeLabel has special label models and positions that are suitable for placing the label relative to a node.

 

Nested Class Summary
 
Nested classes/interfaces inherited from class y.view.YLabel
YLabel.BoundsProvider, YLabel.Factory, YLabel.Layout, YLabel.Painter, YLabel.SelectionChangeHandler, YLabel.UserDataHandler
 
Field Summary
static byte ANYWHERE
          Node label position specifier for label model FREE.
static byte AUTOSIZE_NODE_HEIGHT
          Automatic size calculation policy specifier.
static byte AUTOSIZE_NODE_SIZE
          Automatic size calculation policy specifier.
static byte AUTOSIZE_NODE_WIDTH
          Automatic size calculation policy specifier.
static byte BOTTOM
          Node label position specifier for label model INTERNAL.
static byte BOTTOM_LEFT
          Node label position specifier for label model INTERNAL.
static byte BOTTOM_RIGHT
          Node label position specifier for label model INTERNAL.
static byte CENTER
          Node label position specifier for label model INTERNAL.
static byte CENTER_X
          Deprecated.  
static byte CORNERS
          Node label model specifier.
static byte CUSTOM_LABEL_MODEL
          Node label model specifier that signals that a user-defined, custom NodeLabelModel is used.
static byte DYNAMIC
          Node label position specifier for label model EDGE_OPPOSITE.
static byte E
          Node label position specifier for label model SIDES and EIGHT_POS.
static byte EDGE_OPPOSITE
          Node label model specifier.
static byte EIGHT_POS
          Node label model specifier.
static byte FREE
          Node label model specifier.
static byte INTERNAL
          Node label model specifier.
static byte LEFT
          Node label position specifier for label model INTERNAL.
static byte N
          Node label position specifier for label model SIDES, SANDWICH and EIGHT_POS.
static byte NE
          Node label position specifier for label model CORNERS and EIGHT_POS.
static byte NW
          Node label position specifier for label model CORNERS and EIGHT_POS.
static byte RIGHT
          Node label position specifier for label model INTERNAL.
static byte S
          Node label position specifier for label model SIDES, SANDWICH and EIGHT_POS.
static byte SANDWICH
          Node label model specifier.
static byte SE
          Node label position specifier for label model CORNERS and EIGHT_POS.
static byte SIDES
          Node label model specifier.
static byte SW
          Node label position specifier for label model CORNERS and EIGHT_POS.
static byte TOP
          Node label position specifier for label model INTERNAL.
static byte TOP_LEFT
          Node label position specifier for label model INTERNAL.
static byte TOP_RIGHT
          Node label position specifier for label model INTERNAL.
static byte UNDEFINED
          Dummy node label position specifier.
static byte W
          Node label position specifier for label model SIDES and EIGHT_POS.
 
Fields inherited from class y.view.YLabel
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, AUTOSIZE_CONTENT, AUTOSIZE_NONE, BOTTOM_TEXT_POSITION, CENTER_TEXT_POSITION, contentHeight, contentWidth, defaultInsets, height, LEFT_ALIGNED_TEXT_POSITION, LEFT_TEXT_POSITION, model, offsetDirty, offsetRectangle, placement, RIGHT_ALIGNED_TEXT_POSITION, RIGHT_TEXT_POSITION, sizeDirty, TOP_TEXT_POSITION, width
 
Constructor Summary
NodeLabel()
          Instantiates a new NodeLabel.
NodeLabel(java.lang.String str)
          Instantiates a new NodeLabel with the given text and centered label position.
NodeLabel(java.lang.String st, byte mode)
          Instantiates a new NodeLabel with a given text and model.
 
Method Summary
 void adoptValues(YLabel label)
          Adopts the values from the given label.
static java.util.Vector availablePositions(java.lang.Byte model)
          Returns a vector of all valid positions for the given model The positions are wrapped in Byte objects.
 void bindRealizer(NodeRealizer r)
          Binds the given node realizer to this label.
 void calculateOffset()
          Calculates the offset of this label.
 void calcUnionRect(java.awt.geom.Rectangle2D r)
          Enlarges the given rectangle such that it will contain the bounding box of this label.
 java.lang.Object clone()
          Creates an unbound copy of this NodeLabel.
 java.lang.Object getBestModelParameterForBounds(OrientedRectangle bounds)
          Returns the best model parameter for this label such that the label's oriented bounds will match the specified bounds as closely as possible within the label's current label model.
 double getDistance()
          Returns the distance of the label to the node.
static YLabel.Factory getFactory()
          Retrieves the factory instance that can be used to store different configurations of pluggable node label behaviors.
 Graph2D getGraph2D()
          Returns the graph this node label is bound to.
 NodeLabelModel getLabelModel()
          NodeLabelModel implementation.
 java.lang.Object getModelParameter()
          Returns the current parameter of the node label model.
static byte[] getModelPositions(byte model)
          Returns a byte array containing all valid positions for the given model specifier.
 Node getNode()
          Returns the node that is bound to this node label
 OrientedRectangle getOrientedBox()
          Returns the label's oriented bounding box.
 byte getPosition()
          Returns the position of this label.
 NodeRealizer getRealizer()
          Returns the node realizer that is bound to this node label.
 boolean hasFreePositioning()
          Determines whether or not this label has free positioning.
 boolean intersects(double x, double y, double width, double height)
          Returns true iff the bounding box of this label intersects with the given box.
 boolean isOffsetDirty()
          Returns true if the label offset is not valid yet.
static java.util.Map modelToStringMap()
          Returns a map that whose keys are the known label model specifiers wrapped in Byte objects.
static java.util.Map positionToStringMap()
          Returns a map that whose keys are the known label position specifiers wrapped in Byte objects.
 void read(java.io.ObjectInputStream in)
          Deprecated. Use the GraphML format instead.
 void repaint()
          Triggers a repaint of the bounds of this label in all views.
 void setAutoSizePolicy(byte autoSize)
          Sets the automatic size calculation policy for this label.
 void setConfiguration(java.lang.String name)
          Configures this instance to use the configuration specified by the given name.
 void setDistance(double _distance)
          Sets the distance of the label to the node.
 void setFreeOffset(double x, double y)
          Deprecated. Client code should not set a label's offset directly, but rather use getBestModelParameterForBounds(y.geom.OrientedRectangle) and setModelParameter(Object) to create and specify a parameter that represents the desired label position in the label's model.
 void setLabelModel(NodeLabelModel m)
          Deprecated. Use setLabelModel(y.layout.NodeLabelModel, Object) instead.
 void setLabelModel(NodeLabelModel m, java.lang.Object p)
          Sets the NodeLabelModel implementation and a suitable model parameter.
 void setModel(byte mo)
          Sets the label model.
 void setModelParameter(java.lang.Object param)
          Sets the current parameter for the node label model.
 void setOffset(double x, double y)
          Deprecated. Client code should not set a label's offset directly, but rather use getBestModelParameterForBounds(y.geom.OrientedRectangle) and setModelParameter(Object) to create and specify a parameter that represents the desired label position in the label's model.
 void setOffsetDirty()
          Marks the label offsets as dirty.
 void setPosition(byte p)
          Sets the position of this label.
 void setSizeDirty()
          Marks the size of the label as dirty
 void setText(java.lang.String text)
          Sets the text of this node label.
 void write(java.io.ObjectOutputStream out)
          Deprecated. Use the GraphML format instead.
 
Methods inherited from class y.view.YLabel
calculateSize, calculateSize, contains, getAlignment, getAutoSizePolicy, getBackgroundColor, getBox, getConfiguration, getContentBox, getContentHeight, getContentWidth, getFont, getFontName, getFontSize, getFontStyle, getHeight, getHorizontalTextPosition, getIcon, getIconBox, getIconLocation, getIconTextGap, getInsets, getLineColor, getLocation, getModel, getOffset, getOffsetX, getOffsetY, getRotationAngle, getText, getTextBox, getTextColor, getTextLocation, getUserData, getVerticalTextPosition, getWidth, internalSetAutoSizePolicy, internalSetOffsetDirty, internalSetSizeDirty, isFractionMetricsForSizeCalculationEnabled, isSelected, isSizeDirty, isUnderlinedTextEnabled, isVisible, paint, paintBox, paintContent, paintImpl, setAlignment, setBackgroundColor, setContentHeight, setContentSize, setContentWidth, setFont, setFontName, setFontSize, setFontStyle, setFractionMetricsForSizeCalculationEnabled, setHorizontalTextPosition, setHTMLRenderingEnabled, setIcon, setIconTextGap, setInsets, setLineColor, setOffset, setOffsetX, setOffsetY, setRotationAngle, setSelected, setTextColor, setUnderlinedTextEnabled, setUserData, setVerticalTextPosition, setVisible, toString, transformCTW
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface y.layout.LabelLayout
getBox
 

Field Detail

CENTER

public static final byte CENTER
Node label position specifier for label model INTERNAL. Places the label in the center of the node.

See Also:
Constant Field Values

BOTTOM

public static final byte BOTTOM
Node label position specifier for label model INTERNAL. Places the label inside the node at the bottom of it.

See Also:
Constant Field Values

TOP

public static final byte TOP
Node label position specifier for label model INTERNAL. Places the label inside the node at the top of it.

See Also:
Constant Field Values

TOP_LEFT

public static final byte TOP_LEFT
Node label position specifier for label model INTERNAL. Places the label in the top left corner of a node.

See Also:
Constant Field Values

TOP_RIGHT

public static final byte TOP_RIGHT
Node label position specifier for label model INTERNAL. Places the label in the top right corner of a node.

See Also:
Constant Field Values

BOTTOM_LEFT

public static final byte BOTTOM_LEFT
Node label position specifier for label model INTERNAL. Places the label in the bottom left corner of a node.

See Also:
Constant Field Values

BOTTOM_RIGHT

public static final byte BOTTOM_RIGHT
Node label position specifier for label model INTERNAL. Places the label in the bottom right corner of a node.

See Also:
Constant Field Values

LEFT

public static final byte LEFT
Node label position specifier for label model INTERNAL. Places the label inside the node to the left of it.

See Also:
Constant Field Values

RIGHT

public static final byte RIGHT
Node label position specifier for label model INTERNAL. Places the label inside the node at the right of it.

See Also:
Constant Field Values

CENTER_X

public static final byte CENTER_X
Deprecated. 
Node label position specifier for label model INTERNAL. UNCLEAR YET.

See Also:
Constant Field Values

NW

public static final byte NW
Node label position specifier for label model CORNERS and EIGHT_POS. Places the label north west of the node.

See Also:
Constant Field Values

NE

public static final byte NE
Node label position specifier for label model CORNERS and EIGHT_POS. Places the label north east of the node.

See Also:
Constant Field Values

SE

public static final byte SE
Node label position specifier for label model CORNERS and EIGHT_POS. Places the label south east of the node.

See Also:
Constant Field Values

SW

public static final byte SW
Node label position specifier for label model CORNERS and EIGHT_POS. Places the label south west of the node.

See Also:
Constant Field Values

N

public static final byte N
Node label position specifier for label model SIDES, SANDWICH and EIGHT_POS. Places the label north of the node.

See Also:
Constant Field Values

S

public static final byte S
Node label position specifier for label model SIDES, SANDWICH and EIGHT_POS. Places the label south of the node.

See Also:
Constant Field Values

E

public static final byte E
Node label position specifier for label model SIDES and EIGHT_POS. Places the label east of the node.

See Also:
Constant Field Values

W

public static final byte W
Node label position specifier for label model SIDES and EIGHT_POS. Places the label west of the node.

See Also:
Constant Field Values

DYNAMIC

public static final byte DYNAMIC
Node label position specifier for label model EDGE_OPPOSITE. Places the label dynamically.

See Also:
Constant Field Values

ANYWHERE

public static final byte ANYWHERE
Node label position specifier for label model FREE. Places the label at an arbitrary position.

See Also:
Constant Field Values

UNDEFINED

public static final byte UNDEFINED
Dummy node label position specifier.

See Also:
Constant Field Values

CORNERS

public static final byte CORNERS
Node label model specifier. This model places the labels at the corner locations around the node. It accepts NW, NE, SE, SW as valid positions.

See Also:
setModel(byte), Constant Field Values

INTERNAL

public static final byte INTERNAL
Node label model specifier. This model places the labels inside the node. It accepts CENTER, BOTTOM, TOP, LEFT, RIGHT, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, and BOTTOM_RIGHT as valid positions.

See Also:
setModel(byte), Constant Field Values

SANDWICH

public static final byte SANDWICH
Node label model specifier. This model places the labels above or below the node. It accepts N and S as valid positions.

See Also:
setModel(byte), Constant Field Values

SIDES

public static final byte SIDES
Node label model specifier. This model places the labels at the side locations around the node. It accepts N, E, S, W as valid positions.

See Also:
setModel(byte), Constant Field Values

FREE

public static final byte FREE
Node label model specifier. This model places the labels by a specified offset. It accepts ANYWHERE as valid position.

See Also:
setModel(byte), Constant Field Values

EIGHT_POS

public static final byte EIGHT_POS
Node label model specifier. This model places the labels at the corner and side locations around the node. It accepts all positions valid for the models SIDES and CORNERS

See Also:
setModel(byte), Constant Field Values

EDGE_OPPOSITE

public static final byte EDGE_OPPOSITE
Node label model specifier. This model places the label such that it lies opposite of the directional vector defined by the sum of all adjacent edges of the node.

See Also:
setModel(byte), Constant Field Values

CUSTOM_LABEL_MODEL

public static final byte CUSTOM_LABEL_MODEL
Node label model specifier that signals that a user-defined, custom NodeLabelModel is used. This specifier should not be used directly, rather a custom NodeLabelModel should be set using setLabelModel(y.layout.NodeLabelModel,java.lang.Object).

Note: When copying/cloning a node label (via adoptValues(YLabel)}), custom label models are copied by reference. I.e. the original/prototype label instance and the copied label instance will share the custom model instance.

See Also:
Constant Field Values

AUTOSIZE_NODE_WIDTH

public static final byte AUTOSIZE_NODE_WIDTH
Automatic size calculation policy specifier. Indicates that the width of the label should be at least the width of the node that owns the label. The height of the label will be determined by the height of the text and icon.

See Also:
Constant Field Values

AUTOSIZE_NODE_SIZE

public static final byte AUTOSIZE_NODE_SIZE
Automatic size calculation policy specifier. Indicates that the width and height of the label should be at least the width and height of the node that owns the label.

See Also:
Constant Field Values

AUTOSIZE_NODE_HEIGHT

public static final byte AUTOSIZE_NODE_HEIGHT
Automatic size calculation policy specifier. Indicates that the height of the label should be at least the height of the node that owns the label. The width of the label will be determined by the width of the text and icon.

See Also:
Constant Field Values
Constructor Detail

NodeLabel

public NodeLabel(java.lang.String st,
                 byte mode)
Instantiates a new NodeLabel with a given text and model. Default for external is north west. Default for internal is center.


NodeLabel

public NodeLabel(java.lang.String str)
Instantiates a new NodeLabel with the given text and centered label position.


NodeLabel

public NodeLabel()
Instantiates a new NodeLabel.

Method Detail

setAutoSizePolicy

public void setAutoSizePolicy(byte autoSize)
Sets the automatic size calculation policy for this label. By default YLabel.AUTOSIZE_CONTENT is set.

Overrides:
setAutoSizePolicy in class YLabel
Parameters:
autoSize - one of the specifiers YLabel.AUTOSIZE_CONTENT, AUTOSIZE_NODE_WIDTH, AUTOSIZE_NODE_SIZE, YLabel.AUTOSIZE_NONE or AUTOSIZE_NODE_HEIGHT.

setConfiguration

public void setConfiguration(java.lang.String name)
Description copied from class: YLabel
Configures this instance to use the configuration specified by the given name. A configuration must have been registered with the factory previously in order to work. This can be done by using the factory instances provided by getFactory() and EdgeLabel.getFactory() respectively.

Specified by:
setConfiguration in class YLabel
Parameters:
name - the name of the configuration as it has been specified in YLabel.Factory.addConfiguration(String, java.util.Map)
See Also:
YLabel.Factory, YLabel.Factory.addConfiguration(String, java.util.Map)

getFactory

public static YLabel.Factory getFactory()
Retrieves the factory instance that can be used to store different configurations of pluggable node label behaviors.

Returns:
the factory singleton instance that can be used to register different configurations for node labels.
See Also:
YLabel.Factory.addConfiguration(String, java.util.Map), setConfiguration(String)

clone

public java.lang.Object clone()
Creates an unbound copy of this NodeLabel.

Overrides:
clone in class java.lang.Object

adoptValues

public void adoptValues(YLabel label)
Adopts the values from the given label.

Overrides:
adoptValues in class YLabel

setOffset

public void setOffset(double x,
                      double y)
Deprecated. Client code should not set a label's offset directly, but rather use getBestModelParameterForBounds(y.geom.OrientedRectangle) and setModelParameter(Object) to create and specify a parameter that represents the desired label position in the label's model.

Sets the positional offset for this label. Offsets are measured relative to the location of the corresponding node, as returned by NodeRealizer.getX() and NodeRealizer.getY(). Invoking this method is equivalent to calling
setOffset(new OrientedRectangle(x, y + height, width, height));

Overrides:
setOffset in class YLabel
Parameters:
x - the x-offset of the upper left corner of a paraxial rectangle relative to NodeRealizer.getX().
y - the y-offset of the upper left corner of a paraxial rectangle relative to NodeRealizer.getY().

setOffsetDirty

public void setOffsetDirty()
Description copied from class: YLabel
Marks the label offsets as dirty.

Overrides:
setOffsetDirty in class YLabel

setSizeDirty

public void setSizeDirty()
Description copied from class: YLabel
Marks the size of the label as dirty

Overrides:
setSizeDirty in class YLabel

setText

public void setText(java.lang.String text)
Sets the text of this node label. If this label is bound to a Graph2D the a Graph2DEvent with this label as the subject will be emitted to all registered Graph2DListeners.

Overrides:
setText in class YLabel

setDistance

public void setDistance(double _distance)
Sets the distance of the label to the node. If the current label model is an instance of DiscreteNodeLabelModel this method calls the model's setDistance method with the given distance value. All other types of label models (including SmartNodeLabelModel) are ignored.


getDistance

public double getDistance()
Returns the distance of the label to the node.


getLabelModel

public NodeLabelModel getLabelModel()
NodeLabelModel implementation. Returns the node label model used.

Specified by:
getLabelModel in interface NodeLabelLayout
Returns:
the NodeLabelModel associated with this NodeLabelLayout

setLabelModel

public void setLabelModel(NodeLabelModel m)
Deprecated. Use setLabelModel(y.layout.NodeLabelModel, Object) instead.

Sets the NodeLabelModel implementation.

Additionally, this realizer's model property is updated according to the specified NodeLabelModel:

For all other NodeLabelModel implementations (including subclasses of the above mentioned types), the model property will be set to CUSTOM_LABEL_MODEL.

Parameters:
m - the NodeLabelModel implementation to be used.

setLabelModel

public void setLabelModel(NodeLabelModel m,
                          java.lang.Object p)
Sets the NodeLabelModel implementation and a suitable model parameter.

Additionally, this realizer's model property is updated according to the specified NodeLabelModel:

For all other NodeLabelModel implementations (including subclasses of the above mentioned types), the model property will be set to CUSTOM_LABEL_MODEL.

Parameters:
m - the NodeLabelModel implementation to be used.
p - a model parameter suitable for the specified label model.

getModelParameter

public java.lang.Object getModelParameter()
Returns the current parameter of the node label model.

Specified by:
getModelParameter in interface LabelLayout
Returns:
the model parameter that determines the placement of this label instance.
See Also:
LabelLayout.setModelParameter(Object)

setModelParameter

public void setModelParameter(java.lang.Object param)
Sets the current parameter for the node label model.

Specified by:
setModelParameter in interface LabelLayout
Specified by:
setModelParameter in class YLabel
Parameters:
param - the model parameter that determines the placement of this label instance.

getBestModelParameterForBounds

public java.lang.Object getBestModelParameterForBounds(OrientedRectangle bounds)
Returns the best model parameter for this label such that the label's oriented bounds will match the specified bounds as closely as possible within the label's current label model. This method will return null if no suitable parameter can be determined (e.g. if this label is not bound to a realizer).

Specified by:
getBestModelParameterForBounds in class YLabel
Parameters:
bounds - the desired label bounds in absolute world coordinates.
Returns:
the model parameter that encodes the best match for the specified absolute bounds or null if no suitable model parameter could be determined.

setModel

public void setModel(byte mo)
Sets the label model. If the current positioning is not part of the new model, a valid default positioning will be used.

Note: Client code should not use CUSTOM_LABEL_MODEL here. Custom node label models should be set using setLabelModel(y.layout.NodeLabelModel,java.lang.Object).

Overrides:
setModel in class YLabel
Parameters:
mo - one of

hasFreePositioning

public boolean hasFreePositioning()
Determines whether or not this label has free positioning. To specify the position for a label with free positioning use
label.setModelParameter(label.getBestModelParameterForBounds(newBounds));
with an OrientedRectangle newBounds that specifies the desired position (and orientation) for the label.


setPosition

public void setPosition(byte p)
Sets the position of this label. The given position has to be valid in the current label model.

Overrides:
setPosition in class YLabel

getPosition

public byte getPosition()
Returns the position of this label.

Overrides:
getPosition in class YLabel

setFreeOffset

public void setFreeOffset(double x,
                          double y)
Deprecated. Client code should not set a label's offset directly, but rather use getBestModelParameterForBounds(y.geom.OrientedRectangle) and setModelParameter(Object) to create and specify a parameter that represents the desired label position in the label's model.

Sets the free offset for this label. The model of this label must be FREE.

Parameters:
x - the x-offset relative to NodeRealizer.getX().
y - the y-offset relative to NodeRealizer.getY().

modelToStringMap

public static java.util.Map modelToStringMap()
Returns a map that whose keys are the known label model specifiers wrapped in Byte objects. The value for each key is a String representation of the specifier.


positionToStringMap

public static java.util.Map positionToStringMap()
Returns a map that whose keys are the known label position specifiers wrapped in Byte objects. The value for each key is a String representation of the specifier.


getModelPositions

public static byte[] getModelPositions(byte model)
Returns a byte array containing all valid positions for the given model specifier.


availablePositions

public static java.util.Vector availablePositions(java.lang.Byte model)
Returns a vector of all valid positions for the given model The positions are wrapped in Byte objects.


isOffsetDirty

public boolean isOffsetDirty()
Returns true if the label offset is not valid yet.

Overrides:
isOffsetDirty in class YLabel

calculateOffset

public void calculateOffset()
Description copied from class: YLabel
Calculates the offset of this label.

Specified by:
calculateOffset in class YLabel

getNode

public Node getNode()
Returns the node that is bound to this node label


getRealizer

public NodeRealizer getRealizer()
Returns the node realizer that is bound to this node label.

See Also:
NodeRealizer.addLabel(NodeLabel), bindRealizer(NodeRealizer)

getGraph2D

public Graph2D getGraph2D()
Returns the graph this node label is bound to.


bindRealizer

public void bindRealizer(NodeRealizer r)
Binds the given node realizer to this label.

Parameters:
r - the realizer to which this label will be associated.

getOrientedBox

public OrientedRectangle getOrientedBox()
Returns the label's oriented bounding box. The oriented box is determined by interpreting the label's offset relative to the location of the label's associated realizer. The oriented box is given in absolute world coordinates.

Specified by:
getOrientedBox in interface LabelLayout
Specified by:
getOrientedBox in class YLabel
Returns:
the label's oriented bounding box.
See Also:
YLabel.getContentBox()

repaint

public void repaint()
Triggers a repaint of the bounds of this label in all views.

Specified by:
repaint in class YLabel
See Also:
YLabel.getBox(), View.updateView(double, double, double, double)

intersects

public boolean intersects(double x,
                          double y,
                          double width,
                          double height)
Description copied from class: YLabel
Returns true iff the bounding box of this label intersects with the given box.

Overrides:
intersects in class YLabel

calcUnionRect

public void calcUnionRect(java.awt.geom.Rectangle2D r)
Description copied from class: YLabel
Enlarges the given rectangle such that it will contain the bounding box of this label. This implementation delegates to the YLabel.BoundsProvider instance registered with this instance's configuration.

Overrides:
calcUnionRect in class YLabel

write

public void write(java.io.ObjectOutputStream out)
           throws java.io.IOException
Deprecated. Use the GraphML format instead.

Writes out this label in a serialized form.

Overrides:
write in class YLabel
Throws:
java.io.IOException

read

public void read(java.io.ObjectInputStream in)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
Deprecated. Use the GraphML format instead.

Reads in the serialized form of this label. The label must have been written out before by it's write(ObjectOutputStream) method.

Overrides:
read in class YLabel
Throws:
java.io.IOException
java.lang.ClassNotFoundException

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