|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
treebolic.view.View
public class View
View
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static int |
ANIMATIONSTARTDELAY
Animation start delay |
private static int |
ANIMATIONTIMESLICE
Animation time slice |
private boolean |
focusOnHover
Whether hovering on nodes triggers gaining focus |
private boolean |
hasTooltip
Whether it has tooltip |
private static int |
HOTNODETIMESLICE
Hot node time slice |
private boolean |
invalidatePainterGraphics
Full redraw flag |
private static long |
serialVersionUID
|
private Animator |
theAnimator
Animator |
private java.awt.Image |
theCache
Drawing cache |
private INode |
theFocusNode
Focus node |
private INode |
theHotNode
Hot node |
private AbstractLayerOut |
theLayerOut
LayerOut |
private Model |
theModel
Data model |
private MouseAdapter |
theMouseAdapter
Mouse adapter |
private AbstractPainter |
thePainter
Painter |
private java.awt.Dimension |
theSize
View size |
private javax.swing.Timer |
theTimer
Timer |
private static int |
theTooltipLineSpan
Tooltip break |
private Transformer |
theTransformer
Transformer |
boolean |
tooltipDisplaysContent
Whether tooltips display contents |
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.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 | |
---|---|
View()
Constructor |
Method Summary | |
---|---|
private void |
animate(Complex thisFrom,
Complex thisTo,
boolean now)
Animate tree. |
void |
animateTo(INode thisNode,
Complex thisDestination,
boolean now)
Animate node to destination location |
void |
animateToCenter(INode thisNode,
boolean now)
Animate to unit circle center |
void |
apply(Settings theseSettings)
Set view behaviour |
void |
applyComposedTransform(HyperTransform thisTransform)
Compose this transform with current and apply |
void |
applyInitialTransform()
Apply initial transform |
void |
applyNullTransform()
Apply null transform |
void |
applyTransform(HyperTransform thisTransform)
Apply transform |
void |
composeRotate(Complex thisStart,
Complex thisEnd)
Compose delta rotation |
void |
composeTranslate(Complex thisStart,
Complex thisEnd)
Compose delta translation |
void |
connect(AbstractLayerOut thisLayerOut)
Connect layout agent |
void |
connect(Controller thisController)
Connect controller |
void |
connect(Model thisModel)
Set model |
void |
enterDrag()
Drag notification hook |
INode |
findNode(int vx,
int vy)
Find node given view location |
INode |
getFocusNode()
Get focused node |
private void |
invalidateAndRepaint()
Invalidate graphics and repaint |
void |
leaveDrag()
Leave drag notification hook |
void |
mount(INode thisMountedRoot)
Mount notification hook |
void |
moveTo(INode thisNode,
Complex thisDestination)
Translate node to point |
void |
moveToCenter(INode thisNode)
Translate node to unit circle center |
void |
paint(java.awt.Graphics thisScreenGraphics)
|
void |
repaint()
|
void |
resetTransform()
|
void |
setFocusOnHover(java.lang.Boolean thisFlag)
Control whether hovering on node triggers gaining focus |
void |
setHasTooltip(java.lang.Boolean thisFlag)
Enable/disable tooltips |
void |
setHoverCursor(boolean linkCursor)
Set default cursor |
void |
setHyperbolicEdges(java.lang.Boolean thisFlag)
Set linear/hyperbolic rendering of edges |
void |
setImages(java.awt.Image thisBackgroundImage,
java.awt.Image thisDefaultNodeImage,
java.awt.Image thisDefaultTreeEdgeImage,
java.awt.Image thisDefaultEdgeImage)
Set images |
void |
setPopUpMenu(java.lang.Boolean thisFlag)
Control whether view has popup menu |
void |
setPreserveOrientation(java.lang.Boolean thisFlag)
Preserve orientation |
void |
setShift(double cx,
double cy,
boolean xinc,
boolean yinc)
Set shift |
void |
setToolTip(INode thisNode)
Set tooltip to contain information about this node |
void |
setTooltipDisplaysContent(java.lang.Boolean thisFlag)
Enable/disable displaying content in tooltips |
void |
setZoomFactor(double f)
Set zoom factor |
private void |
translate(Complex thisStart,
Complex thisEnd)
Translate tree according to vector |
void |
umount(INode thisMountingRoot)
Unmount notification hook |
Complex |
viewToUnitCircle(int vx,
int vy)
Convert from view coordinates to unit circle euclidian coordinates |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 |
---|
private static final long serialVersionUID
private Model theModel
private final AbstractPainter thePainter
private final Transformer theTransformer
private final Animator theAnimator
private AbstractLayerOut theLayerOut
private MouseAdapter theMouseAdapter
private javax.swing.Timer theTimer
private boolean invalidatePainterGraphics
private java.awt.Dimension theSize
private java.awt.Image theCache
private INode theHotNode
private INode theFocusNode
private boolean focusOnHover
private boolean hasTooltip
public boolean tooltipDisplaysContent
private static int theTooltipLineSpan
private static final int ANIMATIONTIMESLICE
private static final int ANIMATIONSTARTDELAY
private static final int HOTNODETIMESLICE
Constructor Detail |
---|
public View()
Method Detail |
---|
public void connect(Controller thisController)
thisController
- controllerpublic void connect(Model thisModel)
thisModel
- data modelpublic void connect(AbstractLayerOut thisLayerOut)
thisLayerOut
- layout agentpublic void repaint()
repaint
in class java.awt.Component
public void paint(java.awt.Graphics thisScreenGraphics)
paint
in class javax.swing.JComponent
private void invalidateAndRepaint()
public void setHoverCursor(boolean linkCursor)
linkCursor
- whether to use 'link' cursorpublic void enterDrag()
public void leaveDrag()
public void mount(INode thisMountedRoot)
thisMountedRoot
- mounted nodepublic void umount(INode thisMountingRoot)
public void setFocusOnHover(java.lang.Boolean thisFlag)
thisFlag
- whether hovering on node triggers gaining focus (null toggles value)public void setPreserveOrientation(java.lang.Boolean thisFlag)
thisFlag
- whether transformations preserve orientation (null toggles value)public void setShift(double cx, double cy, boolean xinc, boolean yinc)
cx
- x shiftcy
- y shiftxinc
- whether to add to current x shiftyinc
- whether to add to current y shiftpublic void setZoomFactor(double f)
f
- zoom factorpublic void setHyperbolicEdges(java.lang.Boolean thisFlag)
thisFlag
- whether edges are rendered in hyperbolic way (null toggles value)public void setHasTooltip(java.lang.Boolean thisFlag)
thisFlag
- whether to display tooltip (null toggles value)public void setTooltipDisplaysContent(java.lang.Boolean thisFlag)
thisFlag
- whether tooltip displays content (null toggles value)public void setToolTip(INode thisNode)
thisNode
- nodepublic void setPopUpMenu(java.lang.Boolean thisFlag)
thisFlag
- whether view has popup menu (null toggles value)public void apply(Settings theseSettings)
theseSettings
- settingspublic void setImages(java.awt.Image thisBackgroundImage, java.awt.Image thisDefaultNodeImage, java.awt.Image thisDefaultTreeEdgeImage, java.awt.Image thisDefaultEdgeImage)
thisBackgroundImage
- background imagethisDefaultNodeImage
- default node imagethisDefaultTreeEdgeImage
- default tree edge imagethisDefaultEdgeImage
- default edge imagepublic void resetTransform()
public void applyComposedTransform(HyperTransform thisTransform)
thisTransform
- transform to compose with current transformpublic void applyTransform(HyperTransform thisTransform)
thisTransform
- transformpublic void applyNullTransform()
public void applyInitialTransform()
public void composeTranslate(Complex thisStart, Complex thisEnd)
thisStart
- unit circle delta vector startthisEnd
- unit circle delta vector startpublic void composeRotate(Complex thisStart, Complex thisEnd)
thisStart
- unit circle delta vector startthisEnd
- unit circle delta vector endprivate void translate(Complex thisStart, Complex thisEnd)
thisStart
- unit circle vector startthisEnd
- unit circle vector endpublic void moveTo(INode thisNode, Complex thisDestination)
thisNode
- nodethisDestination
- unit circle destination locationpublic void moveToCenter(INode thisNode)
thisNode
- nodepublic void animateToCenter(INode thisNode, boolean now)
thisNode
- nodenow
- whether to start nowpublic void animateTo(INode thisNode, Complex thisDestination, boolean now)
thisNode
- nodethisDestination
- unit circle destination locationnow
- whether to start nowprivate void animate(Complex thisFrom, Complex thisTo, boolean now)
thisFrom
- unit circle vector startthisTo
- unit circle vector endnow
- whether to start nowpublic INode findNode(int vx, int vy)
vx
- view x locationvy
- view y location
public INode getFocusNode()
public Complex viewToUnitCircle(int vx, int vy)
vx
- view x-coordinatevy
- view x-coordinate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |