Declarativa Declarativa
 

 

Entrada

Produtos

Serviços

Inquiridor
Aplicações internet à medida
Auditoria informática
Subcontratação para I&D

Plataforma de conteúdos

Tecnologia

Web Information Systems
Web Application Maker
InterProlog

A empresa

Apresentação institucional

Class GraphPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----GraphPanel

public class GraphPanel
extends Panel
implements Runnable, MouseListener, MouseMotionListener
A panel representing and showing a directed graph. Graph layout is performed by an iterative algorithm in a background thread


Variable Index

 o delay
Delay between each layout iteration
 o firstSpreadDone
 o nIterations
Number of layout iterations since the last spreadNodes() of nodes
 o random
 o relaxer
The Thread object providing background processing
 o stress

Method Index

 o getMinimumSize()
 o getPreferredSize()
Guess the space we may need
 o mouseClicked(MouseEvent)
 o mouseDragged(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mouseMoved(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o processMouseEvent(MouseEvent)
 o run()
 o start()
Randomize the nodes so the algorithm may later converge, and start the layout/redraw thread
 o stop()
 o update(Graphics)
Draws the graph, asking help to Edge and Node.

Variables

 o nIterations
 public long nIterations
Number of layout iterations since the last spreadNodes() of nodes

 o relaxer
 protected Thread relaxer
The Thread object providing background processing

 o stress
 public boolean stress
 o random
 public boolean random
 o delay
 public long delay
Delay between each layout iteration

 o firstSpreadDone
 protected boolean firstSpreadDone

Methods

 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Container
 o getPreferredSize
 public Dimension getPreferredSize()
Guess the space we may need

Overrides:
getPreferredSize in class Container
 o run
 public void run()
 o update
 public synchronized void update(Graphics g)
Draws the graph, asking help to Edge and Node. Done here instead of paint() to avoid flickering

Overrides:
update in class Container
 o mouseEntered
 public void mouseEntered(MouseEvent e)
 o mousePressed
 public synchronized void mousePressed(MouseEvent e)
 o processMouseEvent
 public void processMouseEvent(MouseEvent e)
Overrides:
processMouseEvent in class Component
 o mouseClicked
 public void mouseClicked(MouseEvent e)
 o mouseDragged
 public synchronized void mouseDragged(MouseEvent e)
 o mouseMoved
 public void mouseMoved(MouseEvent e)
 o mouseReleased
 public synchronized void mouseReleased(MouseEvent e)
 o mouseExited
 public void mouseExited(MouseEvent e)
 o start
 public void start()
Randomize the nodes so the algorithm may later converge, and start the layout/redraw thread

 o stop
 public void stop()

 Declarativa - Serviços de Informática, Lda.
  www.declarativa.com, info@declarativa.com  fax: +351-22-030-1511  tel: +351-22-030-1580
UPTEC - Parque de Ciência e Tecnologia da Universidade do Porto (GoogleMap)
Rua Actor Ferreira da Silva 100 4200-298 Porto Portugal