|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--NetVis
Class for visualizing net data. Generates a basic 2d-visualization of a graph (knots and edges), and uses this visualization as texture for a polygon in 3d. Then, additional information is visualized using cylinders based on this polygon and extending in z-direction.
Field Summary | |
(package private) float |
angle
|
(package private) static int |
BORDER
Size (in pixel) of border around 2D-visualization. |
(package private) javax.media.j3d.Canvas3D |
c3D
|
(package private) java.awt.Paint |
clearPaint
Paint used for clearing pies. |
(package private) static float |
CYLHEIGHT
Maximum height (in world-coordinates) of cylinders used for 3d-visualization. |
(package private) static float |
CYLRADIUS
Radius (in world-coordinates) of cylinders used for 3d-visualization. |
(package private) java.awt.Paint |
edgePaint
Paint used for visualizing edges. |
(package private) java.awt.Stroke |
edgeStroke
Stroke used for visualizing edges. |
(package private) static int |
KNOTSIZE
Size (in pixel) of circles representing knots in 2d-visualization. |
(package private) java.awt.Stroke |
knotStroke
Stroke used for visualizing knots. |
(package private) NetData |
netData
Data to be visualized. |
(package private) javax.media.j3d.TransformGroup |
objTrans
|
(package private) java.awt.Paint |
pie2Paint
Paint used for fill of pies. |
(package private) java.awt.Paint |
piePaint
Paint used for outline of pies. |
(package private) static int |
PIERADIUS
Size (in pixel) of pie-charts used in 2d-visualization. |
(package private) java.awt.Stroke |
pieStroke
Stroke used for visualizing pies. |
(package private) boolean |
show2dPies
Flag whether pies should be drawn. |
(package private) boolean |
show3dCapacity
Flag whether cylinders visualizing capacity data should be drawn. |
(package private) boolean |
show3dLoad
Flag whether cylinders visualizing load data should be drawn. |
(package private) javax.media.j3d.Switch |
sw
|
(package private) javax.media.j3d.Transform3D |
t3d3
|
(package private) javax.media.j3d.Texture |
tex
|
(package private) static int |
TEXTURESIZE
Size (in pixel) of generated 2d-visualization texture. |
(package private) javax.media.j3d.Transform3D |
trans
|
private com.sun.j3d.utils.universe.SimpleUniverse |
u
|
(package private) java.awt.image.BufferedImage |
vis2DImg
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
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 | |
NetVis()
Default constructor. |
Method Summary | |
javax.media.j3d.BranchGroup |
createSceneGraph()
Creates scene graph for Java3D. |
void |
reset3d()
Reset viewing transform of scene graph to initial value. |
void |
setNetData(NetData netData)
Set data to be visualized and update scene graph and 2d visualization. |
void |
setShow2dPies(boolean show)
Toggle visualization of 2d pies. |
void |
setShow3dCapacity(boolean show)
Toggle visualization of capacity data. |
void |
setShow3dLoad(boolean show)
Toggle visualization of load data. |
void |
setup()
Does basic setup of Java3D, create 2d visualization and 3d scene graph. |
protected void |
updateShow3d()
Update scene graph to show correct objects according to flags show3dLoad and
show3dCapacity . |
protected void |
visualize2D(java.awt.image.BufferedImage img)
Do 2d visualization of graph. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static final int BORDER
static final int TEXTURESIZE
static final int KNOTSIZE
static final int PIERADIUS
static final float CYLRADIUS
static final float CYLHEIGHT
java.awt.Stroke edgeStroke
java.awt.Paint edgePaint
java.awt.Stroke knotStroke
java.awt.Stroke pieStroke
java.awt.Paint clearPaint
java.awt.Paint piePaint
java.awt.Paint pie2Paint
boolean show2dPies
boolean show3dLoad
boolean show3dCapacity
NetData netData
javax.media.j3d.Canvas3D c3D
private com.sun.j3d.utils.universe.SimpleUniverse u
javax.media.j3d.TransformGroup objTrans
float angle
javax.media.j3d.Transform3D trans
javax.media.j3d.Transform3D t3d3
javax.media.j3d.Texture tex
java.awt.image.BufferedImage vis2DImg
javax.media.j3d.Switch sw
Constructor Detail |
public NetVis()
null
.
Method Detail |
public javax.media.j3d.BranchGroup createSceneGraph()
public void setup()
public void setNetData(NetData netData)
netData
- NetData object to be visualized.protected void visualize2D(java.awt.image.BufferedImage img)
img
- BufferedImg used for constructing the visualization.public void setShow3dLoad(boolean show)
show
- True if load data should be visualized.public void setShow3dCapacity(boolean show)
show
- True if capacity data should be visualized.protected void updateShow3d()
show3dLoad
and
show3dCapacity
.
public void setShow2dPies(boolean show)
show
- True if 2d pies should be visualized.public void reset3d()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |