Cytoscape 2.8.0 API

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.

Author:
kono

Enum Constant Summary
BACKWARD_SLASH
           
CONTIGUOUS_ARROW
           
DASH_DOT
           
DOT
           
EQUAL_DASH
           
FORWARD_SLASH
           
LONG_DASH
           
PARALLEL_LINES
           
SEPARATE_ARROW
           
SINEWAVE
           
SOLID
           
VERTICAL_SLASH
           
ZIGZAG
           
 
Method Summary
static LineStyle extractLineStyle(Stroke s)
          Will attempt to find the LineStyle based on the type of stroke.
static Map<Object,Icon> getIconSet()
          Returns a map of Icons that can be used for user interfaces.
 Stroke getStroke(float width)
          Creates a new stroke of this LineStyle with the specified width.
static LineStyle parse(String val)
          Attempts to parse a LineStyle object from a string.
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 are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, 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

EQUAL_DASH

public static final LineStyle EQUAL_DASH

DASH_DOT

public static final LineStyle DASH_DOT

DOT

public static final LineStyle DOT

ZIGZAG

public static final LineStyle ZIGZAG

SINEWAVE

public static final LineStyle SINEWAVE

VERTICAL_SLASH

public static final LineStyle VERTICAL_SLASH

FORWARD_SLASH

public static final LineStyle FORWARD_SLASH

BACKWARD_SLASH

public static final LineStyle BACKWARD_SLASH

PARALLEL_LINES

public static final LineStyle PARALLEL_LINES

CONTIGUOUS_ARROW

public static final LineStyle CONTIGUOUS_ARROW

SEPARATE_ARROW

public static final LineStyle SEPARATE_ARROW
Method Detail

values

public static LineStyle[] values()
Returns an array containing the constants of this enum type, in the order they are 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 are 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
NullPointerException - if the argument is null

parse

public static LineStyle parse(String val)
Attempts to parse a LineStyle object from a string. If the string does not match any LineStyle.toString() value exactly, then it attempts a regular expression match on regex pattern defined in this Enum. The regex support exists primarily to support legacy file formats.


extractLineStyle

public static LineStyle extractLineStyle(Stroke s)
Will attempt to find the LineStyle based on the type of stroke. If it doesn't match a known stroke, it will return SOLID.

Returns:
the LineStyle guessed from the stroke.

getStroke

public Stroke getStroke(float width)
Creates a new stroke of this LineStyle with the specified width.


getIconSet

public static Map<Object,Icon> getIconSet()
Returns a map of Icons that can be used for user interfaces.


Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.