wGmdh.jGmdh.gui
Class NodeGraphics

java.lang.Object
  extended by wGmdh.jGmdh.gui.NodeGraphics
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.ChangeListener

public class NodeGraphics
extends java.lang.Object
implements javax.swing.event.ChangeListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener

A class used for graphic representation of models/networks. A Node object must exist before NodeGraphics is instantiated.


Nested Class Summary
 class NodeGraphics.GraphCoordinates
           
 class NodeGraphics.NodeButton
          Custom lightweight button.
 
Field Summary
static java.awt.Color armedColor
           
 NodeGraphics.NodeButton button
           
static int buttonHeight
           
static int buttonWidth
           
static java.awt.Font font
           
static java.awt.Color fontColor
           
static java.awt.Color highlightedColor
           
 Node node
           
static java.awt.Color perimeterColor
           
static java.awt.Color pressedColor
           
static int textX
           
static int textY
           
 
Constructor Summary
NodeGraphics(Node node)
           
NodeGraphics(Node node, int x, int y, int sizeX, int sizeY)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 NodeGraphics.NodeButton getButton()
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
          MouseMotionListener's overrides
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void onMouseClicked(NodebuttonPanel parent, GuiManager manager)
           
 void onMouseEntered(boolean forceUnhighlighting)
           
protected  void onMouseExited()
           
protected  void onMouseReleased()
           
 void stateChanged(javax.swing.event.ChangeEvent e)
          ChangeListener's implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

font

public static final java.awt.Font font

fontColor

public static final java.awt.Color fontColor

textX

public static final int textX
See Also:
Constant Field Values

textY

public static final int textY
See Also:
Constant Field Values

perimeterColor

public static final java.awt.Color perimeterColor

highlightedColor

public static final java.awt.Color highlightedColor

armedColor

public static final java.awt.Color armedColor

pressedColor

public static final java.awt.Color pressedColor

buttonWidth

public static final int buttonWidth
See Also:
Constant Field Values

buttonHeight

public static final int buttonHeight
See Also:
Constant Field Values

node

public Node node

button

public NodeGraphics.NodeButton button
Constructor Detail

NodeGraphics

public NodeGraphics(Node node)

NodeGraphics

public NodeGraphics(Node node,
                    int x,
                    int y,
                    int sizeX,
                    int sizeY)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

onMouseEntered

public void onMouseEntered(boolean forceUnhighlighting)
Parameters:
forceUnhighlighting -

onMouseClicked

public void onMouseClicked(NodebuttonPanel parent,
                           GuiManager manager)

onMouseExited

protected void onMouseExited()

onMouseReleased

protected void onMouseReleased()

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
ChangeListener's implementations.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
event -

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
MouseMotionListener's overrides

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

getButton

public NodeGraphics.NodeButton getButton()