org.neuroph.easyneurons
Class NeuralGraphRenderer

java.lang.Object
  extended by org.neuroph.easyneurons.NeuralGraphRenderer
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class NeuralGraphRenderer
extends java.lang.Object
implements java.awt.event.ActionListener


Nested Class Summary
 class NeuralGraphRenderer.GradientPickedEdgePaintFunction<V,E>
           
protected  class NeuralGraphRenderer.PopupGraphMousePlugin
          a GraphMousePlugin that offers popup menu support
 class NeuralGraphRenderer.VoltageTips<E>
           
 
Field Summary
protected static java.lang.Object ACTIVATION_KEY
           
protected  org.apache.commons.collections15.Transformer affineTransformer
           
protected  javax.swing.JRadioButton e_bent
           
protected  javax.swing.JCheckBox e_color
           
protected  javax.swing.JRadioButton e_cubic
           
protected  javax.swing.JCheckBox e_darrow_pred
           
protected  javax.swing.JCheckBox e_labels
           
protected  javax.swing.JRadioButton e_line
           
protected  javax.swing.JRadioButton e_quad
           
protected  javax.swing.JCheckBox e_show_d
           
protected  javax.swing.JCheckBox e_show_u
           
protected  javax.swing.JCheckBox e_uarrow_pred
           
protected  javax.swing.JRadioButton e_wedge
           
protected  java.util.Map<org.neuroph.core.Connection,java.lang.Number> edge_weight
           
protected  NeuralGraphRenderer.GradientPickedEdgePaintFunction<org.neuroph.core.Neuron,org.neuroph.core.Connection> edgeDrawPaint
           
protected  NeuralGraphRenderer.GradientPickedEdgePaintFunction<org.neuroph.core.Neuron,org.neuroph.core.Connection> edgeFillPaint
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.EdgeFontTransformer<org.neuroph.core.Connection> eff
           
protected  org.apache.commons.collections15.Transformer<org.neuroph.core.Connection,java.lang.String> es
           
protected  org.apache.commons.collections15.Transformer<org.neuroph.core.Connection,java.lang.String> es_none
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.EdgeWeightStrokeFunction<org.neuroph.core.Connection> ewcs
           
protected  javax.swing.JCheckBox fill_edges
           
protected  javax.swing.JCheckBox font
           
protected static int gradient_level
           
protected static int GRADIENT_NONE
           
protected  javax.swing.JRadioButton gradient_relative
           
protected static int GRADIENT_RELATIVE
           
protected  edu.uci.ics.jung.graph.Graph<org.neuroph.core.Neuron,org.neuroph.core.Connection> graph
           
protected  edu.uci.ics.jung.visualization.control.DefaultModalGraphMouse<org.neuroph.core.Neuron,org.neuroph.core.Connection> graphMouse
           
protected  javax.swing.JPanel graphPanel
           
protected  edu.uci.ics.jung.algorithms.layout.Layout<org.neuroph.core.Neuron,org.neuroph.core.Connection> layout
           
protected  javax.swing.JRadioButton layout_Circle
           
protected  javax.swing.JRadioButton layout_FR
           
protected  javax.swing.JRadioButton layout_KK
           
protected  javax.swing.JComboBox layoutCombo
           
protected  org.neuroph.core.NeuralNetwork neuralNet
           
protected  javax.swing.JRadioButton no_gradient
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.SeedDrawColor<org.neuroph.core.Neuron> seedDrawColor
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.SeedFillColor<org.neuroph.core.Neuron> seedFillColor
           
protected  java.util.Set<org.neuroph.core.Neuron> seedVertices
           
protected  org.apache.commons.collections15.Predicate<edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<org.neuroph.core.Neuron,org.neuroph.core.Connection>,org.neuroph.core.Connection>> self_loop
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.DirectionDisplayPredicate<org.neuroph.core.Neuron,org.neuroph.core.Connection> show_arrow
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.DirectionDisplayPredicate<org.neuroph.core.Neuron,org.neuroph.core.Connection> show_edge
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.VertexDisplayPredicate<org.neuroph.core.Neuron,org.neuroph.core.Connection> show_vertex
           
protected  org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.awt.geom.Point2D> staticTranformer
           
protected  java.util.Map<org.neuroph.core.Neuron,org.neuroph.core.Connection> transparency
           
protected static java.lang.Object TRANSPARENCY
           
protected  javax.swing.JCheckBox v_aspect
           
protected  javax.swing.JCheckBox v_color
           
protected  javax.swing.JCheckBox v_labels
           
protected  javax.swing.JCheckBox v_shape
           
protected  javax.swing.JCheckBox v_size
           
protected  javax.swing.JCheckBox v_small
           
protected  javax.swing.JCheckBox v_stroke
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.VertexFontTransformer<org.neuroph.core.Neuron> vff
           
protected  org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.lang.Double> voltages
           
protected  org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.lang.String> vs
           
protected  org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.lang.String> vs_none
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.VertexStrokeHighlight<org.neuroph.core.Neuron,org.neuroph.core.Connection> vsh
           
protected  org.neuroph.easyneurons.NeuralGraphRenderer.VertexShapeSizeAspect<org.neuroph.core.Neuron,org.neuroph.core.Connection> vssa
           
protected  edu.uci.ics.jung.visualization.VisualizationViewer vv
           
protected static java.lang.Object WEIGHT_KEY
           
protected  javax.swing.JCheckBox zoom_at_mouse
           
 
Constructor Summary
NeuralGraphRenderer(org.neuroph.core.NeuralNetwork neuralNet)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void addControls(javax.swing.JPanel jp)
           
 edu.uci.ics.jung.graph.Graph createGraph()
          Generates a mixed-mode random graph, runs VoltageRanker on it, and returns the resultant graph.
 void createGraphPanel()
           
 javax.swing.JPanel getGraphPanel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

v_color

protected javax.swing.JCheckBox v_color

e_color

protected javax.swing.JCheckBox e_color

v_stroke

protected javax.swing.JCheckBox v_stroke

e_uarrow_pred

protected javax.swing.JCheckBox e_uarrow_pred

e_darrow_pred

protected javax.swing.JCheckBox e_darrow_pred

v_shape

protected javax.swing.JCheckBox v_shape

v_size

protected javax.swing.JCheckBox v_size

v_aspect

protected javax.swing.JCheckBox v_aspect

v_labels

protected javax.swing.JCheckBox v_labels

e_line

protected javax.swing.JRadioButton e_line

e_bent

protected javax.swing.JRadioButton e_bent

e_wedge

protected javax.swing.JRadioButton e_wedge

e_quad

protected javax.swing.JRadioButton e_quad

e_cubic

protected javax.swing.JRadioButton e_cubic

e_labels

protected javax.swing.JCheckBox e_labels

font

protected javax.swing.JCheckBox font

e_show_d

protected javax.swing.JCheckBox e_show_d

e_show_u

protected javax.swing.JCheckBox e_show_u

v_small

protected javax.swing.JCheckBox v_small

zoom_at_mouse

protected javax.swing.JCheckBox zoom_at_mouse

fill_edges

protected javax.swing.JCheckBox fill_edges

layout_FR

protected javax.swing.JRadioButton layout_FR

layout_KK

protected javax.swing.JRadioButton layout_KK

layout_Circle

protected javax.swing.JRadioButton layout_Circle

layoutCombo

protected javax.swing.JComboBox layoutCombo

no_gradient

protected javax.swing.JRadioButton no_gradient

gradient_relative

protected javax.swing.JRadioButton gradient_relative

GRADIENT_NONE

protected static final int GRADIENT_NONE
See Also:
Constant Field Values

GRADIENT_RELATIVE

protected static final int GRADIENT_RELATIVE
See Also:
Constant Field Values

gradient_level

protected static int gradient_level

seedFillColor

protected org.neuroph.easyneurons.NeuralGraphRenderer.SeedFillColor<org.neuroph.core.Neuron> seedFillColor

seedDrawColor

protected org.neuroph.easyneurons.NeuralGraphRenderer.SeedDrawColor<org.neuroph.core.Neuron> seedDrawColor

ewcs

protected org.neuroph.easyneurons.NeuralGraphRenderer.EdgeWeightStrokeFunction<org.neuroph.core.Connection> ewcs

vsh

protected org.neuroph.easyneurons.NeuralGraphRenderer.VertexStrokeHighlight<org.neuroph.core.Neuron,org.neuroph.core.Connection> vsh

vs

protected org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.lang.String> vs

vs_none

protected org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.lang.String> vs_none

es

protected org.apache.commons.collections15.Transformer<org.neuroph.core.Connection,java.lang.String> es

es_none

protected org.apache.commons.collections15.Transformer<org.neuroph.core.Connection,java.lang.String> es_none

vff

protected org.neuroph.easyneurons.NeuralGraphRenderer.VertexFontTransformer<org.neuroph.core.Neuron> vff

eff

protected org.neuroph.easyneurons.NeuralGraphRenderer.EdgeFontTransformer<org.neuroph.core.Connection> eff

vssa

protected org.neuroph.easyneurons.NeuralGraphRenderer.VertexShapeSizeAspect<org.neuroph.core.Neuron,org.neuroph.core.Connection> vssa

show_edge

protected org.neuroph.easyneurons.NeuralGraphRenderer.DirectionDisplayPredicate<org.neuroph.core.Neuron,org.neuroph.core.Connection> show_edge

show_arrow

protected org.neuroph.easyneurons.NeuralGraphRenderer.DirectionDisplayPredicate<org.neuroph.core.Neuron,org.neuroph.core.Connection> show_arrow

show_vertex

protected org.neuroph.easyneurons.NeuralGraphRenderer.VertexDisplayPredicate<org.neuroph.core.Neuron,org.neuroph.core.Connection> show_vertex

self_loop

protected org.apache.commons.collections15.Predicate<edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<org.neuroph.core.Neuron,org.neuroph.core.Connection>,org.neuroph.core.Connection>> self_loop

edgeDrawPaint

protected NeuralGraphRenderer.GradientPickedEdgePaintFunction<org.neuroph.core.Neuron,org.neuroph.core.Connection> edgeDrawPaint

edgeFillPaint

protected NeuralGraphRenderer.GradientPickedEdgePaintFunction<org.neuroph.core.Neuron,org.neuroph.core.Connection> edgeFillPaint

ACTIVATION_KEY

protected static final java.lang.Object ACTIVATION_KEY

WEIGHT_KEY

protected static final java.lang.Object WEIGHT_KEY

TRANSPARENCY

protected static final java.lang.Object TRANSPARENCY

vv

protected edu.uci.ics.jung.visualization.VisualizationViewer vv

graphMouse

protected edu.uci.ics.jung.visualization.control.DefaultModalGraphMouse<org.neuroph.core.Neuron,org.neuroph.core.Connection> graphMouse

seedVertices

protected java.util.Set<org.neuroph.core.Neuron> seedVertices

affineTransformer

protected org.apache.commons.collections15.Transformer affineTransformer

voltages

protected org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.lang.Double> voltages

transparency

protected java.util.Map<org.neuroph.core.Neuron,org.neuroph.core.Connection> transparency

edge_weight

protected java.util.Map<org.neuroph.core.Connection,java.lang.Number> edge_weight

graph

protected edu.uci.ics.jung.graph.Graph<org.neuroph.core.Neuron,org.neuroph.core.Connection> graph

neuralNet

protected org.neuroph.core.NeuralNetwork neuralNet

graphPanel

protected javax.swing.JPanel graphPanel

layout

protected edu.uci.ics.jung.algorithms.layout.Layout<org.neuroph.core.Neuron,org.neuroph.core.Connection> layout

staticTranformer

protected org.apache.commons.collections15.Transformer<org.neuroph.core.Neuron,java.awt.geom.Point2D> staticTranformer
Constructor Detail

NeuralGraphRenderer

public NeuralGraphRenderer(org.neuroph.core.NeuralNetwork neuralNet)
Method Detail

getGraphPanel

public javax.swing.JPanel getGraphPanel()

createGraphPanel

public void createGraphPanel()

createGraph

public edu.uci.ics.jung.graph.Graph createGraph()
Generates a mixed-mode random graph, runs VoltageRanker on it, and returns the resultant graph.


addControls

protected void addControls(javax.swing.JPanel jp)
Parameters:
jp - panel to which controls will be added

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener