|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wGmdh.jGmdh.gui.GuiManager
public class GuiManager
GMDH network visualization. Nodes are represented by JComponents, while their links are only drawn on the JPanel. 3 additional worker threads are used, one for highlighting and unhighlighting a node when mouse pointer enters the region of the node, one that arms and disarms a node and one used when a node is dragged to find its parents and children Note: no generic solutions are provided to i.e. zooming and connecting Nodes; problems were solved as they came. Also there is no abstracion to implement to get a graphical representation of GMDH. Make your own from scrap.
Nested Class Summary | |
---|---|
protected class |
GuiManager.SimulatedAnnealingRelocation
|
protected class |
GuiManager.ZoomableLinks
Zooming stuffz |
class |
GuiManager.ZoomSlider
|
Field Summary | |
---|---|
protected java.util.List<NodeGraphics> |
armedNodes
|
protected java.lang.Object |
armLock
|
int |
borderX
|
int |
borderY
|
protected javax.swing.JPanel |
controlPanel
|
protected int |
currentlyDisplayed
|
protected javax.swing.JButton |
cycleButton
|
protected java.lang.Object |
dragLock
|
protected javax.swing.JFrame |
frame
|
int |
height
|
protected javax.swing.JEditorPane |
infoArea
|
protected javax.swing.JEditorPane |
infoArea2
|
protected javax.swing.JPanel |
infoButtonPanel
|
protected javax.swing.JPanel |
infoPanel
|
protected javax.swing.JScrollPane |
infoScrollPane
|
protected javax.swing.JScrollPane |
infoScrollPane2
|
protected javax.swing.JEditorPane |
instructionArea
|
protected javax.swing.JScrollPane |
instructionScrollPane
|
java.util.ArrayList<java.util.ArrayList<? extends Node>> |
layers
|
protected java.lang.Object |
mouseOverLock
|
protected javax.swing.JButton |
namespaceButton
|
protected java.util.List<NodeGraphics> |
nodesToArm
|
protected java.util.List<NodeGraphics> |
nodesToUnarm
|
protected GuiManager.ZoomableLinks |
overlay
|
protected NodebuttonPanel |
panel
|
int |
recursionCount
Preorder traversal. |
protected SubpixelScrollPane |
scrollPane
|
protected javax.swing.JLabel |
sliderLabel
|
protected javax.swing.JButton |
snapToGridJB
|
protected javax.swing.JButton |
sortByErrorJB
|
java.util.ArrayList<java.util.ArrayList<NodeGraphics>> |
visible
|
int |
width
|
protected java.lang.Object |
zoomIsDirtyLock
|
protected GuiManager.ZoomSlider |
zoomSlider
|
Constructor Summary | |
---|---|
GuiManager(java.util.ArrayList<java.util.ArrayList<? extends Node>> layers,
int x,
int y,
int borderX,
int borderY)
|
|
GuiManager(int x,
int y,
int borderX,
int borderY)
|
Method Summary | |
---|---|
protected void |
drawLinksWhenDragged(NodeGraphics dragged)
When dragging is through, this method is used to superpose direct links of dragged node onto the armed buffer. |
protected void |
executeAfterdragRunnable()
|
protected void |
executeArmingTask()
|
protected void |
executeDraggedRunnable()
|
protected void |
executeHighlightRunnable(NodeGraphics ng)
|
protected void |
executeRelinkHighlightedRunnable()
|
protected void |
executeUnhighlightRunnable()
|
protected void |
executeUnhiglightRunnableAndWait()
|
void |
fullRepaint()
|
java.util.concurrent.ExecutorService |
getArmingExecutor()
|
org.pbjar.jxlayer.plaf.ext.transform.DefaultTransformModel |
getDefaultTransformModel()
|
java.util.concurrent.ExecutorService |
getFirstDragExecutor()
|
java.util.concurrent.ExecutorService |
getHighlightingExecutor()
|
java.awt.Dimension |
getLastRedrawnDimension()
|
GuiManager.ZoomableLinks |
getOverlay()
|
protected void |
initializeModelGraphics(Model model)
|
void |
launchGUI(java.util.List<Model> modelsToAdd)
Sets everything up for display: initializes and displays the layer of attributes and all models listed in modelsToAdd |
void |
onFrameClosing()
|
protected java.awt.Graphics2D |
redrawNative(boolean repaints)
|
protected void |
representAllModels()
Iterates through layers, initializes their NodeGraphics and adds them to JPanel. |
protected void |
representAttributes()
|
protected void |
representModels(java.util.List<? extends Model> toDraw)
|
void |
SnapToGrid()
|
void |
SortByError()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int height
public int width
public int borderX
public int borderY
public java.util.ArrayList<java.util.ArrayList<? extends Node>> layers
public java.util.ArrayList<java.util.ArrayList<NodeGraphics>> visible
protected javax.swing.JFrame frame
protected final NodebuttonPanel panel
protected SubpixelScrollPane scrollPane
protected javax.swing.JButton snapToGridJB
protected javax.swing.JButton sortByErrorJB
protected java.util.List<NodeGraphics> armedNodes
protected java.util.List<NodeGraphics> nodesToArm
protected java.util.List<NodeGraphics> nodesToUnarm
protected int currentlyDisplayed
protected final java.lang.Object armLock
protected final java.lang.Object mouseOverLock
protected final java.lang.Object dragLock
protected final java.lang.Object zoomIsDirtyLock
protected javax.swing.JLabel sliderLabel
protected GuiManager.ZoomSlider zoomSlider
protected javax.swing.JPanel controlPanel
protected javax.swing.JPanel infoPanel
protected javax.swing.JPanel infoButtonPanel
protected javax.swing.JEditorPane infoArea
protected javax.swing.JEditorPane instructionArea
protected javax.swing.JScrollPane instructionScrollPane
protected javax.swing.JScrollPane infoScrollPane
protected javax.swing.JEditorPane infoArea2
protected javax.swing.JScrollPane infoScrollPane2
protected javax.swing.JButton cycleButton
protected javax.swing.JButton namespaceButton
public int recursionCount
protected GuiManager.ZoomableLinks overlay
Constructor Detail |
---|
public GuiManager(java.util.ArrayList<java.util.ArrayList<? extends Node>> layers, int x, int y, int borderX, int borderY)
public GuiManager(int x, int y, int borderX, int borderY)
Method Detail |
---|
public void fullRepaint()
public java.util.concurrent.ExecutorService getHighlightingExecutor()
public java.util.concurrent.ExecutorService getArmingExecutor()
public java.util.concurrent.ExecutorService getFirstDragExecutor()
public java.awt.Dimension getLastRedrawnDimension()
public org.pbjar.jxlayer.plaf.ext.transform.DefaultTransformModel getDefaultTransformModel()
protected void representAllModels()
protected void representAttributes()
protected void representModels(java.util.List<? extends Model> toDraw)
protected void initializeModelGraphics(Model model)
public void SnapToGrid()
public void SortByError()
public GuiManager.ZoomableLinks getOverlay()
protected java.awt.Graphics2D redrawNative(boolean repaints)
public void onFrameClosing()
public void launchGUI(java.util.List<Model> modelsToAdd)
modelsToAdd
- if zero, displays all models listed in this.layersprotected void executeAfterdragRunnable()
protected void executeHighlightRunnable(NodeGraphics ng)
protected void executeRelinkHighlightedRunnable()
protected void executeUnhighlightRunnable()
protected void executeArmingTask()
protected void executeUnhiglightRunnableAndWait()
protected void executeDraggedRunnable()
protected void drawLinksWhenDragged(NodeGraphics dragged)
dragged
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |