emn.fr.ascola.view
Class PrefuseViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by prefuse.Display
                  extended by emn.fr.ascola.view.PrefuseViewer
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
BasicCommunicationViewer, PrefuseBasicViewer

public abstract class PrefuseViewer
extends prefuse.Display

New viewer for architecture. Only binary communications else should use hyperlinks

Author:
jroyer 29/5/2009 1/6/2009 coloration for datatype/component type is the identifier MultiEdgeRenderer done for communications and composite TODO sur les nodes mettre les interfaces provided !!! et voir TODO Probleme de selection du multi edge a voir pb du itemEntered ?
See Also:
Serialized Form

Nested Class Summary
 class PrefuseViewer.ComponentRenderer
          Default label renderer for artefact: information and thickness adjustement.
 class PrefuseViewer.DashedEdgeRenderer
          Edge renderer for communications.
 class PrefuseViewer.DataRenderer
          Renderer for data type.
 class PrefuseViewer.DefaultForceDirectedLayout
           
 class PrefuseViewer.LongRadialTreeLayout
          Long fixe length for radial.
 
Nested classes/interfaces inherited from class prefuse.Display
prefuse.Display.InputEventCapturer
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
static prefuse.data.expression.Predicate communication
           
static prefuse.data.expression.Predicate component
           
static prefuse.data.expression.Predicate composite
           
static prefuse.data.expression.Predicate datatype
           
static int LABEL_MAX_SIZE
           
static java.lang.String linear
           
static java.lang.String linkSearch
           
static double MAX_NODE_SIZE
           
static double MIN_NODE_SIZE
           
static java.lang.String NULL_STRING
           
static java.lang.String START
           
static java.lang.String STOP
           
static java.lang.String STRING_BALLOON
           
static java.lang.String STRING_BASIC
           
static java.lang.String STRING_CIRCLE
           
static java.lang.String STRING_COMM
           
static java.lang.String STRING_COUNT
           
static java.lang.String STRING_EDGES
           
static java.lang.String STRING_GRAPH
           
static java.lang.String STRING_INNER
           
static java.lang.String STRING_KIND
           
static java.lang.String STRING_LEVEL
           
static java.lang.String STRING_MIDDLE
           
static java.lang.String STRING_NAME
           
static java.lang.String STRING_NODES
           
static java.lang.String STRING_PTYPES
           
static java.lang.String STRING_RADIAL
           
static java.lang.String STRING_RTYPE
           
static java.lang.String STRING_SMALL
           
static java.lang.String STRING_TYPE
           
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PrefuseViewer()
          Default constructor.
 
Method Summary
 int artefactAnalysis(java.lang.String type, int level, boolean data)
          Analyse an artefact, get its name, if already created and else create a new node for it.
abstract  void display()
          Display the view.
 void edgeCommunication(java.lang.String lname, java.lang.String from, java.lang.String to, java.lang.String ptypes, java.lang.String rtype)
          Create edges and add the count for MultiEdgeRenderer.
 void edgeCreation(boolean kind, java.lang.String lname, java.lang.String from, java.lang.String to)
          Edge creation
 prefuse.action.layout.Layout getLayout(java.lang.String key, int s)
          Choose the layout.
 void makeIt()
          Transform the architecture into Prefuse datas.
 void setRenderer()
          Define node and label renderer.
 void setTableCount()
          Initialize table for count before adding communications
 
Methods inherited from class prefuse.Display
addControlListener, addItemBoundsListener, addPaintListener, animatePan, animatePanAbs, animatePanAndZoomTo, animatePanAndZoomToAbs, animatePanTo, animatePanToAbs, animateZoom, animateZoomAbs, clearDamage, createToolTip, damageReport, damageReport, editText, editText, editText, findItem, getAbsoluteCoordinate, getCustomToolTip, getDisplayX, getDisplayY, getFrameRate, getInverseTransform, getItemBounds, getItemBounds, getItemSorter, getOffscreenBuffer, getPredicate, getScale, getTextEditor, getTransform, getVisibleItemCount, getVisualization, invalidate, isDamageRedraw, isHighQuality, isTranformInProgress, paintComponent, paintDisplay, pan, panAbs, panTo, panToAbs, removeControlListener, removeItemBoundsListener, removePaintListener, renderImmediate, repaintImmediate, reset, rotate, rotateAbs, saveImage, setBackgroundImage, setBackgroundImage, setBounds, setCustomToolTip, setDamageRedraw, setFont, setHighQuality, setItemSorter, setPredicate, setPredicate, setSize, setSize, setTextEditor, setTransform, setVisualization, stopEditing, update, zoom, zoomAbs
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING_GRAPH

public static final java.lang.String STRING_GRAPH
See Also:
Constant Field Values

STRING_NODES

public static final java.lang.String STRING_NODES
See Also:
Constant Field Values

STRING_EDGES

public static final java.lang.String STRING_EDGES
See Also:
Constant Field Values

STRING_TYPE

public static final java.lang.String STRING_TYPE
See Also:
Constant Field Values

STRING_NAME

public static final java.lang.String STRING_NAME
See Also:
Constant Field Values

STRING_KIND

public static final java.lang.String STRING_KIND
See Also:
Constant Field Values

STRING_LEVEL

public static final java.lang.String STRING_LEVEL
See Also:
Constant Field Values

STRING_PTYPES

public static final java.lang.String STRING_PTYPES
See Also:
Constant Field Values

STRING_RTYPE

public static final java.lang.String STRING_RTYPE
See Also:
Constant Field Values

STRING_COUNT

public static final java.lang.String STRING_COUNT
See Also:
Constant Field Values

STRING_COMM

public static final java.lang.String STRING_COMM
See Also:
Constant Field Values

linkSearch

public static final java.lang.String linkSearch
See Also:
Constant Field Values

LABEL_MAX_SIZE

public static final int LABEL_MAX_SIZE
See Also:
Constant Field Values

STOP

public static final java.lang.String STOP
See Also:
Constant Field Values

START

public static final java.lang.String START
See Also:
Constant Field Values

MAX_NODE_SIZE

public static final double MAX_NODE_SIZE
See Also:
Constant Field Values

MIN_NODE_SIZE

public static final double MIN_NODE_SIZE
See Also:
Constant Field Values

NULL_STRING

public static final java.lang.String NULL_STRING
See Also:
Constant Field Values

STRING_INNER

public static final java.lang.String STRING_INNER
See Also:
Constant Field Values

STRING_BASIC

public static final java.lang.String STRING_BASIC
See Also:
Constant Field Values

STRING_SMALL

public static final java.lang.String STRING_SMALL
See Also:
Constant Field Values

STRING_MIDDLE

public static final java.lang.String STRING_MIDDLE
See Also:
Constant Field Values

STRING_RADIAL

public static final java.lang.String STRING_RADIAL
See Also:
Constant Field Values

STRING_CIRCLE

public static final java.lang.String STRING_CIRCLE
See Also:
Constant Field Values

STRING_BALLOON

public static final java.lang.String STRING_BALLOON
See Also:
Constant Field Values

linear

public static final java.lang.String linear
See Also:
Constant Field Values

communication

public static final prefuse.data.expression.Predicate communication

composite

public static final prefuse.data.expression.Predicate composite

datatype

public static final prefuse.data.expression.Predicate datatype

component

public static final prefuse.data.expression.Predicate component
Constructor Detail

PrefuseViewer

public PrefuseViewer()
Default constructor.

Method Detail

display

public abstract void display()
Display the view.


makeIt

public void makeIt()
Transform the architecture into Prefuse datas. Should be called between instance creation and display TODO node size action ?


artefactAnalysis

public int artefactAnalysis(java.lang.String type,
                            int level,
                            boolean data)
Analyse an artefact, get its name, if already created and else create a new node for it. HYPO component names are unique !!!!!!

Parameters:
art -
Returns:

edgeCreation

public void edgeCreation(boolean kind,
                         java.lang.String lname,
                         java.lang.String from,
                         java.lang.String to)
Edge creation

Parameters:
kind - true for composite
name -
from -
to -

setTableCount

public void setTableCount()
Initialize table for count before adding communications


edgeCommunication

public void edgeCommunication(java.lang.String lname,
                              java.lang.String from,
                              java.lang.String to,
                              java.lang.String ptypes,
                              java.lang.String rtype)
Create edges and add the count for MultiEdgeRenderer. this is only for communications Used withe PrefuseBasicViewer


setRenderer

public void setRenderer()
Define node and label renderer.

Parameters:
artefactumbering -
linkNumbering -

getLayout

public prefuse.action.layout.Layout getLayout(java.lang.String key,
                                              int s)
Choose the layout.

Parameters:
the - key of strength
s - size