Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.visual
Enum LineStyle

java.lang.Object
  extended by java.lang.Enum<LineStyle>
      extended by cytoscape.visual.LineStyle
All Implemented Interfaces:
Serializable, Comparable<LineStyle>

public enum LineStyle
extends Enum<LineStyle>

Define line stroke. TODO: need to modify rendering engine to fully support dash lines.

Author:
kono

Enum Constant Summary
LONG_DASH
           
SOLID
           
 
Method Summary
static LineStyle extractLineStyle(Stroke stroke)
          A method that attempts to figure out if a stroke is dashed or not.
 float[] getDashDef()
           
static Map<Object,Icon> getIconSet()
           
 Stroke getStroke(float width)
          DOCUMENT ME!
static LineStyle parse(String val)
           
static float parseWidth(String s)
          This method attempts to extract a width from a string that has a number in it like "dashed1" or "line2".
static LineStyle valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LineStyle[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SOLID

public static final LineStyle SOLID

LONG_DASH

public static final LineStyle LONG_DASH
Method Detail

values

public static final LineStyle[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(LineStyle c : LineStyle.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static LineStyle valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

parse

public static LineStyle parse(String val)

parseWidth

public static float parseWidth(String s)
This method attempts to extract a width from a string that has a number in it like "dashed1" or "line2". This exists to support old-style line type definitions.

Returns:
The parsed value or if something doesn't match, 1.0

extractLineStyle

public static LineStyle extractLineStyle(Stroke stroke)
A method that attempts to figure out if a stroke is dashed or not. If the Stroke object is not a BasicStroke, it will return SOLID by default.

Returns:
the LineStyle guessed based on the BasicStroke dash array.

getStroke

public Stroke getStroke(float width)
DOCUMENT ME!

Parameters:
width - DOCUMENT ME!
Returns:
DOCUMENT ME!

getDashDef

public float[] getDashDef()

getIconSet

public static Map<Object,Icon> getIconSet()

www.cytoscape.org