com.yworks.yfiles.server.graphml.flexio.compat
Class Stroke

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.flexio.compat.Stroke
All Implemented Interfaces:
ISharedInstanceProvider, IStroke
Direct Known Subclasses:
AdvancedStroke

public class Stroke
extends java.lang.Object
implements IStroke, ISharedInstanceProvider

Compatibility class for the yFiles FLEX GraphML format.

This class represents a basic stroke.

On Flex side the basic stroke is represented by mx.graphics.Stroke or mx.graphics.SolidColorStroke depending on the value set to setUseSolidColorStroke(boolean).


Constructor Summary
Stroke()
           
Stroke(java.awt.Color color, double weight)
           
 
Method Summary
 java.awt.Color getColor()
          Returns the stroke's color.
 java.util.Collection getSharedInstances()
          Returns an Collection for objects that shall be shared.
 double getWeight()
          Returns the stroke's weight.
 boolean isUseSolidColorStroke()
          Returns whether the stroke should be deserialized as mx.graphics.SolidColorStroke at Flex side.
 void setColor(java.awt.Color color)
          Sets the stroke's color.
 void setUseSolidColorStroke(boolean useSolidColorStroke)
          Sets whether the stroke should be deserialized as mx.graphics.SolidColorStroke at Flex side.
 void setWeight(double weight)
          Sets the stroke's weight.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stroke

public Stroke(java.awt.Color color,
              double weight)

Stroke

public Stroke()
Method Detail

getColor

public java.awt.Color getColor()
Returns the stroke's color.


setColor

public void setColor(java.awt.Color color)
Sets the stroke's color.

Parameters:
color -

getWeight

public double getWeight()
Returns the stroke's weight.

Specified by:
getWeight in interface IStroke

setWeight

public void setWeight(double weight)
Sets the stroke's weight.

Specified by:
setWeight in interface IStroke
Parameters:
weight -

isUseSolidColorStroke

public boolean isUseSolidColorStroke()
Returns whether the stroke should be deserialized as mx.graphics.SolidColorStroke at Flex side.

If set to true the stroke will be deserialized as mx.graphics.SolidColorStroke, otherwise as mx.graphics.Stroke.

Default is false.

Returns:
true if the stroke should be deserialized as mx.graphics.SolidColorStroke.

setUseSolidColorStroke

public void setUseSolidColorStroke(boolean useSolidColorStroke)
Sets whether the stroke should be deserialized as mx.graphics.SolidColorStroke at Flex side.

If set to true the stroke will be deserialized as mx.graphics.SolidColorStroke, otherwise as mx.graphics.Stroke.

Default is false.

Parameters:
useSolidColorStroke - true if the stroke should be deserialized as mx.graphics.SolidColorStroke.

getSharedInstances

public java.util.Collection getSharedInstances()
Description copied from interface: ISharedInstanceProvider
Returns an Collection for objects that shall be shared.

Specified by:
getSharedInstances in interface ISharedInstanceProvider
Returns:


Copyright © 2000-2013 yWorks GmbH. All rights reserved