|
||||||||||
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 wGmdh.jGmdh.gui.NodebuttonPanel
public final class NodebuttonPanel
Nested Class Summary | |
---|---|
static class |
NodebuttonPanel.ArmButtonRunnable
|
static class |
NodebuttonPanel.DrawLineRunnable
A Runnable that draws lines on Graphics. |
static class |
NodebuttonPanel.HighlightButtonRunnable
|
static class |
NodebuttonPanel.UnarmButtonRunnable
|
class |
NodebuttonPanel.UnhighlightButtonRunnable
|
static class |
NodebuttonPanel.UnpressButtonRunnable
|
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 |
---|
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 |
Method Summary | |
---|---|
void |
addNodeAsButton(NodeGraphics nodeGr,
boolean visible)
|
protected NodeGraphics |
armModelIteration(java.awt.Graphics2D g2,
NodeGraphics visited,
int index)
Used to draw model links on Graphics + arming, performs one iteration of non-recursive, breadth-first traversal, using a (FIFO) queue. |
protected NodeGraphics |
armModelIterationHelper(java.awt.Graphics2D g2,
NodeGraphics visited,
int index)
Used to draw model links on Graphics + arming, performs one iteration of non-recursive, breadth-first traversal, using a (FIFO) queue. |
void |
armModelIterative(java.awt.Graphics g,
NodeGraphics root)
Called from the arming thread, (painting also gets done from there). |
protected NodeGraphics |
fakeLinkModelIteration(java.awt.Graphics g2,
NodeGraphics graphNode,
int index)
Used in conjunction with relinkArmed. |
void |
finalize()
|
GuiManager |
getGuiManager()
|
protected NodeGraphics |
highlightModelIteration(java.awt.Graphics2D g2,
NodeGraphics visited)
Used to draw model links on Graphics, performs one iteration of non-recursive, breadth-first traversal, using a (FIFO) queue. |
java.lang.String |
highlightModelIterative(java.awt.Graphics g,
NodeGraphics root)
Called from the highlighting thread, repaints after each iteration. |
protected NodeGraphics |
linkModelIteration(java.awt.Graphics g2,
NodeGraphics graphNode,
int index)
Used to draw model links on Graphics. |
protected void |
linkModelIterative(java.awt.Graphics g,
int index)
Call it from the arming thread. |
void |
paintChildren(java.awt.Graphics g)
|
void |
paintComponent(java.awt.Graphics g)
TODO: Provided we have a good graph traversal algorithm for drawing the links/vertices, if we have multiple models to draw, treat them as one graph, thus avoiding unneccessary multiple traversals. |
void |
relinkArmed(java.awt.Graphics buffer)
Call it from the arming thread and sync with overlay. |
protected boolean |
relinkHighlighted(java.awt.Graphics g)
Traverses mgr.highlightedNodes and draws links to their children |
protected NodeGraphics |
removeFakeEntries(NodeGraphics graphNode,
int index)
Used in conjunction with relinkArmed. |
void |
setGuiManager(GuiManager mgr)
|
java.lang.String |
toString(double[] d)
Array of doubles to html, without parts. |
protected NodeGraphics |
unarmModelIteration(java.awt.Graphics g,
NodeGraphics graphNode,
int index)
|
void |
unarmModelIterative(java.awt.Graphics g,
NodeGraphics root)
Unarms the buttons and clears links, if neccessary. |
void |
unhighlightModel(java.awt.Graphics g)
Unhighlights the buttons. |
protected NodeGraphics |
whenDraggedIteration(java.awt.Graphics2D g2,
NodeGraphics visited,
NodeGraphics dragged)
Invoked by whenDraggedIterative |
void |
whenDraggedIterative(java.awt.Graphics g,
NodeGraphics root,
NodeGraphics dragged)
This method gets invoked on every armed GMDH network when user starts dragging of a button. |
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, paint, paintBorder, 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, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void setGuiManager(GuiManager mgr)
public GuiManager getGuiManager()
public void paintChildren(java.awt.Graphics g)
paintChildren
in class javax.swing.JComponent
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void addNodeAsButton(NodeGraphics nodeGr, boolean visible)
public java.lang.String toString(double[] d)
d
-
protected NodeGraphics highlightModelIteration(java.awt.Graphics2D g2, NodeGraphics visited)
g2
- Image to draw to.visited
- Model to process.
public java.lang.String highlightModelIterative(java.awt.Graphics g, NodeGraphics root) throws TooBig
g
- root
-
TooBig
public void unhighlightModel(java.awt.Graphics g)
g2
- Image to draw to.graphNode
- Model to draw.public void whenDraggedIterative(java.awt.Graphics g, NodeGraphics root, NodeGraphics dragged)
g
- root
- dragged
- protected NodeGraphics whenDraggedIteration(java.awt.Graphics2D g2, NodeGraphics visited, NodeGraphics dragged)
g2
- visited
- dragged
-
protected NodeGraphics armModelIteration(java.awt.Graphics2D g2, NodeGraphics visited, int index)
g2
- Image to draw to.graphNode
- Model to draw.index
- Index of root of this GMDH network which it's
stored under in armedNodes
protected NodeGraphics armModelIterationHelper(java.awt.Graphics2D g2, NodeGraphics visited, int index)
g2
- Image to draw to.visited
- index
- Index of root of this GMDH network which it's
stored under in armedNodes
public void armModelIterative(java.awt.Graphics g, NodeGraphics root)
g
- root
- protected NodeGraphics linkModelIteration(java.awt.Graphics g2, NodeGraphics graphNode, int index)
g2
- Graphics to draw to.graphNode
- index
-
protected NodeGraphics fakeLinkModelIteration(java.awt.Graphics g2, NodeGraphics graphNode, int index)
g2
- Graphics to draw to.graphNode
- index
- fake directReferences index, same as
directReferences.size()-1
protected void linkModelIterative(java.awt.Graphics g, int index)
g
- index
- public void relinkArmed(java.awt.Graphics buffer)
buffer
- protected NodeGraphics removeFakeEntries(NodeGraphics graphNode, int index)
graphNode
- index
- index to remove
protected boolean relinkHighlighted(java.awt.Graphics g)
g
-
protected NodeGraphics unarmModelIteration(java.awt.Graphics g, NodeGraphics graphNode, int index)
public void unarmModelIterative(java.awt.Graphics g, NodeGraphics root)
g
- Image to draw to.root
- Model to draw.public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |