|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.SelectionPortPainter
public class SelectionPortPainter
A decorator for NodePort.Painter implementation that draws
a special "is selected" marker.
| Field Summary | |
|---|---|
static byte |
STYLE_FRAMED
Selection style that draws a black rectangle around the selected node port. |
static byte |
STYLE_SMOOTHED
Selection style that draws a black and rounded rectangle around the selected node port. |
static byte |
STYLE_WEDGES
Selection style that draws four black wedges around the selected node port. |
| Constructor Summary | |
|---|---|
SelectionPortPainter(NodePort.Painter painter)
Initializes a new SelectionPortPainter instance. |
|
| Method Summary | |
|---|---|
byte |
getStyle()
Determines the selection style to highlight selected node ports. |
protected boolean |
initializeLine(NodeRealizer context,
NodePort port,
Graphics2D g)
Initializes the graphics context for the drawing of the selection marker of the specified port. |
void |
paint(NodePort port,
Graphics2D g)
Paints the specified port. |
void |
setStyle(byte style)
Specifies the selection style to highlight selected node ports. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte STYLE_WEDGES
setStyle(byte),
getStyle(),
Constant Field Valuespublic static final byte STYLE_FRAMED
setStyle(byte),
getStyle(),
Constant Field Valuespublic static final byte STYLE_SMOOTHED
setStyle(byte),
getStyle(),
Constant Field Values| Constructor Detail |
|---|
public SelectionPortPainter(NodePort.Painter painter)
SelectionPortPainter instance.
painter - the decorated painter implementation.| Method Detail |
|---|
public byte getStyle()
The default selection style is STYLE_WEDGES.
STYLE_WEDGES, STYLE_FRAMED, and
STYLE_SMOOTHED.setStyle(byte)public void setStyle(byte style)
The default selection style is STYLE_WEDGES.
IllegalArgumentException - if the specified style does not equal one
of the aforementioned style constants.style - on of STYLE_WEDGES, STYLE_FRAMED, and
STYLE_SMOOTHED.getStyle()
public void paint(NodePort port,
Graphics2D g)
NodePort.Painter
Callback method for NodePort.paint(java.awt.Graphics2D).
paint in interface NodePort.Painterport - the port instance to paint.g - the graphics context to paint upon.
protected boolean initializeLine(NodeRealizer context,
NodePort port,
Graphics2D g)
false no marker should be drawn.
Called from paint.
context - the realizer whose NodePorts are painted.port - the NodePort instance that is painted.g - the graphics context to paint upon.
true if the selection marker of the specified port
should be drawn; false otherwise.paint(NodePort, java.awt.Graphics2D)
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||