|
||||||||||
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 | +--javax.swing.JPanel | +--DrawingJPanel | +--NodeAndLinkAnimatingJPanel
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
static int |
DEFAULT_DELAY
The default delay for animation (90). |
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 | |
NodeAndLinkAnimatingJPanel()
Sole Constructor for the JPanel that paints the node using the AnimatingTree drawNode method. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Listens to action events. |
protected void |
animate(java.awt.Graphics2D g2)
Method actually called to complete the drawing of the panel. |
void |
drawLines(java.awt.Graphics2D g2)
Draws the lines in the given panel using the Graphics2D. |
DrawingTree |
getAnimatingNode()
Gets the head of the tree currently drawn in the Panel. |
protected javax.swing.Timer |
getAnimationTimer()
Gets the animation timer for the animation of the panel. |
java.awt.Paint |
getLeftLinePaint()
Gets the paint for the left line drawing. |
java.awt.Paint |
getRightLinePaint()
Gets the paint for the right line drawing. |
boolean |
isDrawingLines()
Gets whether the animation is drawing lines or a node. |
protected void |
makeDrawTreeGraphics()
Makes the drawing graphics. |
void |
paintComponent(java.awt.Graphics g)
Overides paintComponenet and is called whenever the Panel needs to be painted. |
void |
setAnimatingNode(DrawingTree animatingNode)
Set the node for drawing. |
protected void |
setAnimationTimer(javax.swing.Timer animationTimer)
Sets the animation timer for the animation of the panel. |
void |
setComponentShown(boolean componentShown)
Sets whether the tree is shown or not. |
void |
setDelayRate(int t)
Sets the delay rate for the timer for the animation. |
void |
setDrawingLines(boolean drawingLines)
Sets whether the animation is drawing lines or a node. |
void |
setLeftLinePaint(java.awt.Paint leftLinePaint)
Sets the paint for the left line drawing. |
void |
setRightLinePaint(java.awt.Paint rightLinePaint)
Sets the paint for the right line drawing. |
Methods inherited from class DrawingJPanel |
componentHidden, componentMoved, componentResized, componentShown, draw, drawTree, getDrawingArea, getDrawTreeGraphics, getDrawTreeImage, isComponentShown, isDrawTree, makeDrawTreeImage, setDrawingArea, setDrawTree, setDrawTreeGraphics, setDrawTreeImage |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
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, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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 |
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 |
public static final int DEFAULT_DELAY
Constructor Detail |
public NodeAndLinkAnimatingJPanel()
Method Detail |
public boolean isDrawingLines()
public DrawingTree getAnimatingNode()
protected javax.swing.Timer getAnimationTimer()
public java.awt.Paint getRightLinePaint()
public java.awt.Paint getLeftLinePaint()
public void setDrawingLines(boolean drawingLines)
drawingLines
- true if the panel is drawing lines.public void setRightLinePaint(java.awt.Paint rightLinePaint)
rightLinePaint
- right Line Paint.public void setLeftLinePaint(java.awt.Paint leftLinePaint)
leftLinePaint
- left Line Paint.public void setDelayRate(int t)
protected void setAnimationTimer(javax.swing.Timer animationTimer)
animationTimer
- javax.swing.Timer defining the steps of animation.public void setAnimatingNode(DrawingTree animatingNode)
public void setComponentShown(boolean componentShown)
setComponentShown
in class DrawingJPanel
componentShown
- boolean flag as to whether the tree is shown.protected void makeDrawTreeGraphics()
makeDrawTreeGraphics
in class DrawingJPanel
protected void animate(java.awt.Graphics2D g2)
g2
- Graphics2D to animate the node within.public void drawLines(java.awt.Graphics2D g2)
g2
- Graphics2D to draw the lines within.public void paintComponent(java.awt.Graphics g)
paintComponent
in class DrawingJPanel
g
- Graphics to which the component is drawn.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- ActionEvent that contains information about the tree.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |