net.kwfgrid.gwui.graphview
Class TransitionNodePainter

java.lang.Object
  extended by net.kwfgrid.gwui.graphview.TransitionNodePainter
All Implemented Interfaces:
NodePainter

public class TransitionNodePainter
extends java.lang.Object
implements NodePainter

The painter for TransitionNodes.
This painter has the following properties which can be configured via the application's theme:


Nested Class Summary
protected  class TransitionNodePainter.TransitionTextPainter
           
 
Field Summary
protected  NodePainter BLACK
          Painter for abstraction level BLACK.
protected static java.awt.Color BLACK_BORDER_COLOR
           
protected static java.lang.String BLACK_BORDER_COLOR_KEY
           
protected static java.awt.Paint BLACK_PAINT
           
protected static java.lang.String BLACK_PAINT_KEY
           
protected static java.awt.Dimension BLACK_SIZE
           
protected static java.lang.String BLACK_SIZE_KEY
           
protected static java.awt.Stroke BLACK_STROKE
           
protected static java.lang.String BLACK_STROKE_KEY
           
protected static java.awt.Color BLACK_TEXT_COLOR
           
protected static java.lang.String BLACK_TEXT_COLOR_KEY
           
protected  NodePainter BLUE
          Painter for abstraction level BLUE.
protected static java.awt.Color BLUE_BORDER_COLOR
           
protected static java.lang.String BLUE_BORDER_COLOR_KEY
           
protected static java.awt.Paint BLUE_PAINT
           
protected static java.lang.String BLUE_PAINT_KEY
           
protected static java.awt.Color BLUE_TEXT_COLOR
           
protected static java.lang.String BLUE_TEXT_COLOR_KEY
           
protected static java.awt.Font BOLD_FONT
           
protected static java.lang.String BOLD_FONT_KEY
           
protected static java.awt.Stroke DEFAULT_BORDER_STROKE
           
protected static java.lang.String DEFAULT_BORDER_STROKE_KEY
           
protected static java.awt.Font DEFAULT_FONT
           
protected static java.lang.String DEFAULT_FONT_KEY
           
protected  NodePainter GREEN
          Painter for abstraction level GREEN.
protected static java.awt.Color GREEN_BORDER_COLOR
           
protected static java.lang.String GREEN_BORDER_COLOR_KEY
           
protected static java.awt.Paint GREEN_PAINT
           
protected static java.lang.String GREEN_PAINT_KEY
           
protected static java.awt.Color GREEN_TEXT_COLOR
           
protected static java.lang.String GREEN_TEXT_COLOR_KEY
           
protected static java.awt.Color GREY_BORDER_COLOR
           
protected static java.lang.String GREY_BORDER_COLOR_KEY
           
protected static java.awt.Paint GREY_PAINT
           
protected static java.lang.String GREY_PAINT_KEY
           
protected static java.awt.Color GREY_TEXT_COLOR
           
protected static java.lang.String GREY_TEXT_COLOR_KEY
           
protected static java.awt.Insets INSETS
           
protected static java.lang.String INSETS_KEY
           
static TransitionNodePainter INSTANCE
          An instance.
protected  NodePainter RED
          Painter for abstraction level RED.
protected static java.awt.Color RED_BORDER_COLOR
           
protected static java.lang.String RED_BORDER_COLOR_KEY
           
protected static java.awt.Paint RED_PAINT
           
protected static java.lang.String RED_PAINT_KEY
           
protected static java.awt.Color RED_TEXT_COLOR
           
protected static java.lang.String RED_TEXT_COLOR_KEY
           
protected  NodePainter YELLOW
          Painter for abstraction level YELLOW.
protected static java.awt.Color YELLOW_BORDER_COLOR
           
protected static java.lang.String YELLOW_BORDER_COLOR_KEY
           
protected static java.awt.Paint YELLOW_PAINT
           
protected static java.lang.String YELLOW_PAINT_KEY
           
protected static java.awt.Color YELLOW_TEXT_COLOR
           
protected static java.lang.String YELLOW_TEXT_COLOR_KEY
           
 
Constructor Summary
TransitionNodePainter()
           
 
Method Summary
 void getNodeScreenBounds(JGraphPane gpane, Node node, java.awt.Rectangle bounds)
          Returns the outer rectangle of the node on screen.
protected  NodePainter getState(TransitionNode node)
           
 java.lang.String getToolTipText(JGraphPane gpane, Node node, java.awt.Point point)
          Retruns the tool-tip for given point.
 boolean isInNode(JGraphPane gpane, Node node, java.awt.Point point)
          Checks whether given point is inside the node.
 void paintNode(JGraphPane gpane, java.awt.Graphics2D g, Node node)
          Paints the supplied node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSETS_KEY

protected static final java.lang.String INSETS_KEY
See Also:
Constant Field Values

INSETS

protected static final java.awt.Insets INSETS

DEFAULT_FONT_KEY

protected static final java.lang.String DEFAULT_FONT_KEY
See Also:
Constant Field Values

DEFAULT_FONT

protected static final java.awt.Font DEFAULT_FONT

BOLD_FONT_KEY

protected static final java.lang.String BOLD_FONT_KEY
See Also:
Constant Field Values

BOLD_FONT

protected static final java.awt.Font BOLD_FONT

DEFAULT_BORDER_STROKE_KEY

protected static final java.lang.String DEFAULT_BORDER_STROKE_KEY
See Also:
Constant Field Values

DEFAULT_BORDER_STROKE

protected static final java.awt.Stroke DEFAULT_BORDER_STROKE

BLACK_STROKE_KEY

protected static final java.lang.String BLACK_STROKE_KEY
See Also:
Constant Field Values

BLACK_BORDER_COLOR_KEY

protected static final java.lang.String BLACK_BORDER_COLOR_KEY
See Also:
Constant Field Values

BLACK_PAINT_KEY

protected static final java.lang.String BLACK_PAINT_KEY
See Also:
Constant Field Values

BLACK_TEXT_COLOR_KEY

protected static final java.lang.String BLACK_TEXT_COLOR_KEY
See Also:
Constant Field Values

BLACK_SIZE_KEY

protected static final java.lang.String BLACK_SIZE_KEY
See Also:
Constant Field Values

BLACK_STROKE

protected static final java.awt.Stroke BLACK_STROKE

BLACK_BORDER_COLOR

protected static final java.awt.Color BLACK_BORDER_COLOR

BLACK_PAINT

protected static final java.awt.Paint BLACK_PAINT

BLACK_TEXT_COLOR

protected static final java.awt.Color BLACK_TEXT_COLOR

BLACK_SIZE

protected static final java.awt.Dimension BLACK_SIZE

RED_BORDER_COLOR_KEY

protected static final java.lang.String RED_BORDER_COLOR_KEY
See Also:
Constant Field Values

RED_PAINT_KEY

protected static final java.lang.String RED_PAINT_KEY
See Also:
Constant Field Values

RED_TEXT_COLOR_KEY

protected static final java.lang.String RED_TEXT_COLOR_KEY
See Also:
Constant Field Values

RED_BORDER_COLOR

protected static final java.awt.Color RED_BORDER_COLOR

RED_PAINT

protected static final java.awt.Paint RED_PAINT

RED_TEXT_COLOR

protected static final java.awt.Color RED_TEXT_COLOR

YELLOW_BORDER_COLOR_KEY

protected static final java.lang.String YELLOW_BORDER_COLOR_KEY
See Also:
Constant Field Values

YELLOW_PAINT_KEY

protected static final java.lang.String YELLOW_PAINT_KEY
See Also:
Constant Field Values

YELLOW_TEXT_COLOR_KEY

protected static final java.lang.String YELLOW_TEXT_COLOR_KEY
See Also:
Constant Field Values

YELLOW_BORDER_COLOR

protected static final java.awt.Color YELLOW_BORDER_COLOR

YELLOW_PAINT

protected static final java.awt.Paint YELLOW_PAINT

YELLOW_TEXT_COLOR

protected static final java.awt.Color YELLOW_TEXT_COLOR

GREEN_BORDER_COLOR_KEY

protected static final java.lang.String GREEN_BORDER_COLOR_KEY
See Also:
Constant Field Values

GREEN_PAINT_KEY

protected static final java.lang.String GREEN_PAINT_KEY
See Also:
Constant Field Values

GREEN_TEXT_COLOR_KEY

protected static final java.lang.String GREEN_TEXT_COLOR_KEY
See Also:
Constant Field Values

GREEN_BORDER_COLOR

protected static final java.awt.Color GREEN_BORDER_COLOR

GREEN_PAINT

protected static final java.awt.Paint GREEN_PAINT

GREEN_TEXT_COLOR

protected static final java.awt.Color GREEN_TEXT_COLOR

BLUE_BORDER_COLOR_KEY

protected static final java.lang.String BLUE_BORDER_COLOR_KEY
See Also:
Constant Field Values

BLUE_PAINT_KEY

protected static final java.lang.String BLUE_PAINT_KEY
See Also:
Constant Field Values

BLUE_TEXT_COLOR_KEY

protected static final java.lang.String BLUE_TEXT_COLOR_KEY
See Also:
Constant Field Values

BLUE_BORDER_COLOR

protected static final java.awt.Color BLUE_BORDER_COLOR

BLUE_PAINT

protected static final java.awt.Paint BLUE_PAINT

BLUE_TEXT_COLOR

protected static final java.awt.Color BLUE_TEXT_COLOR

GREY_BORDER_COLOR_KEY

protected static final java.lang.String GREY_BORDER_COLOR_KEY
See Also:
Constant Field Values

GREY_PAINT_KEY

protected static final java.lang.String GREY_PAINT_KEY
See Also:
Constant Field Values

GREY_TEXT_COLOR_KEY

protected static final java.lang.String GREY_TEXT_COLOR_KEY
See Also:
Constant Field Values

GREY_BORDER_COLOR

protected static final java.awt.Color GREY_BORDER_COLOR

GREY_PAINT

protected static final java.awt.Paint GREY_PAINT

GREY_TEXT_COLOR

protected static final java.awt.Color GREY_TEXT_COLOR

INSTANCE

public static final TransitionNodePainter INSTANCE
An instance.


BLACK

protected NodePainter BLACK
Painter for abstraction level BLACK.


RED

protected NodePainter RED
Painter for abstraction level RED.


YELLOW

protected NodePainter YELLOW
Painter for abstraction level YELLOW.


BLUE

protected NodePainter BLUE
Painter for abstraction level BLUE.


GREEN

protected NodePainter GREEN
Painter for abstraction level GREEN.

Constructor Detail

TransitionNodePainter

public TransitionNodePainter()
Method Detail

paintNode

public void paintNode(JGraphPane gpane,
                      java.awt.Graphics2D g,
                      Node node)
Description copied from interface: NodePainter
Paints the supplied node.

Specified by:
paintNode in interface NodePainter
Parameters:
gpane - the graph pane
g - the graphics
node - the node to paint

isInNode

public boolean isInNode(JGraphPane gpane,
                        Node node,
                        java.awt.Point point)
Description copied from interface: NodePainter
Checks whether given point is inside the node.

Specified by:
isInNode in interface NodePainter
Parameters:
gpane - the graph pane
node - the node
point - the point
Returns:
true if the point is in the node

getNodeScreenBounds

public void getNodeScreenBounds(JGraphPane gpane,
                                Node node,
                                java.awt.Rectangle bounds)
Description copied from interface: NodePainter
Returns the outer rectangle of the node on screen.

Specified by:
getNodeScreenBounds in interface NodePainter
Parameters:
gpane - the graph pane
node - the node
bounds - the rectangle receiving the node's coordinates

getToolTipText

public java.lang.String getToolTipText(JGraphPane gpane,
                                       Node node,
                                       java.awt.Point point)
Description copied from interface: NodePainter
Retruns the tool-tip for given point.

Specified by:
getToolTipText in interface NodePainter
Parameters:
gpane - the graph pane
node - the node
point - the point
Returns:
the tool-tip at given point (or null)

getState

protected NodePainter getState(TransitionNode node)


Copyright © 2005-2010 The K-Wf Grid Consortium. All Rights Reserved.