public class PsymConnector extends java.lang.Object implements Enumeration, Displayable
Modifier and Type | Field and Description |
---|---|
static PsymConnector |
DASHES |
static PsymConnector |
DASHFINE |
static PsymConnector |
DOTDASHES |
static PsymConnector |
DOTFINE |
static PsymConnector |
DOTS |
static PsymConnector |
NONE |
static PsymConnector |
SOLID |
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D g,
java.awt.geom.GeneralPath path,
float width) |
void |
drawLine(java.awt.Graphics2D g,
double x1,
double y1,
double x2,
double y2,
float width)
See draw( Graphics2D, GeneralPath, float ) for drawing traces.
|
void |
drawListIcon(java.awt.Graphics2D g,
int x,
int y)
implement this to provide nice drawing of icon on printing graphics context.
|
javax.swing.Icon |
getListIcon()
An icon can be provided that will be shown in a list
along with the textual description of the element.
|
java.lang.String |
getListLabel()
return a
String that will help the user
identify this item when choosing from a list. |
protected java.awt.Stroke |
getStroke(float width) |
java.lang.String |
toString()
Type-safe Enumerations implementing this interface
should override the toString() method to return a
String that will be helpful to the user
when choosing this as an option from a list. |
public static final PsymConnector NONE
public static final PsymConnector SOLID
public static final PsymConnector DOTFINE
public static final PsymConnector DASHFINE
public static final PsymConnector DASHES
public static final PsymConnector DOTDASHES
public static final PsymConnector DOTS
protected java.awt.Stroke getStroke(float width)
public void draw(java.awt.Graphics2D g, java.awt.geom.GeneralPath path, float width)
public final void drawLine(java.awt.Graphics2D g, double x1, double y1, double x2, double y2, float width)
g
- x1
- y1
- x2
- y2
- width
- public javax.swing.Icon getListIcon()
Enumeration
null
if there
is no icon available.getListIcon
in interface Displayable
getListIcon
in interface Enumeration
public void drawListIcon(java.awt.Graphics2D g, int x, int y)
Displayable
drawListIcon
in interface Displayable
g
- the graphics context.x
- the x position, typically 0.y
- the y position, typically 0.public java.lang.String getListLabel()
Displayable
String
that will help the user
identify this item when choosing from a list.getListLabel
in interface Displayable
public java.lang.String toString()
Enumeration
String
that will be helpful to the user
when choosing this as an option from a list.toString
in interface Enumeration
toString
in class java.lang.Object