Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.ui.hypergraph_visualizer.HyperGraphViewer Class Reference
Inheritance diagram for joshua.ui.hypergraph_visualizer.HyperGraphViewer:
[legend]
Collaboration diagram for joshua.ui.hypergraph_visualizer.HyperGraphViewer:
[legend]

List of all members.

Public Member Functions

 HyperGraphViewer (JungHyperGraph g)

Static Public Member Functions

static void visualizeHypergraphInFrame (HyperGraph hg)
static void main (String[] argv)

Static Public Attributes

static final int DEFAULT_HEIGHT = 500
static final int DEFAULT_WIDTH = 500
static final Color SRC = Color.WHITE
static final Color TGT = Color.RED
static final String USAGE = "USAGE: HyperGraphViewer <items file> <rules file> <first sentence> <last sentence>"
static final double EDGE_ELLIPSE_SIZE = 10

Package Attributes

JungHyperGraph graph
JList edgeList

Private Member Functions

Transformer< Vertex, String > toStringTransformer ()
Transformer< Vertex, String > toolTipTransformer ()
Transformer< Vertex, Paint > vertexPainter ()

Static Private Attributes

static Transformer< Edge, Stroke > es
static Transformer< Vertex, Shape > ns

Constructor & Destructor Documentation

Here is the call graph for this function:


Member Function Documentation

static void joshua.ui.hypergraph_visualizer.HyperGraphViewer.main ( String[]  argv) [static]

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Transformer<Edge, Stroke> joshua.ui.hypergraph_visualizer.HyperGraphViewer.es [static, private]
Initial value:
 new Transformer<Edge, Stroke>() {
    public Stroke transform(Edge e) {
      if (e.isHighlighted())
        return new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f,
            new float[] {10.0f}, 0.0f);
      else
        return new BasicStroke(1.0f);
    }
  }
Transformer<Vertex, Shape> joshua.ui.hypergraph_visualizer.HyperGraphViewer.ns [static, private]
Initial value:
 new Transformer<Vertex, Shape>() {
    public Shape transform(Vertex v) {
      
      double len = 20; 
      double margin = 5.0;
      if (v instanceof NodeVertex || v instanceof LeafVertex)
        return new Rectangle2D.Double((len + margin) / (-2), 0, len + 2 * margin, 20);
      else
        return new Ellipse2D.Double(-.5 * EDGE_ELLIPSE_SIZE, -.5 * EDGE_ELLIPSE_SIZE,
            EDGE_ELLIPSE_SIZE, EDGE_ELLIPSE_SIZE);
    }
  }
final Color joshua.ui.hypergraph_visualizer.HyperGraphViewer.SRC = Color.WHITE [static]
final Color joshua.ui.hypergraph_visualizer.HyperGraphViewer.TGT = Color.RED [static]
final String joshua.ui.hypergraph_visualizer.HyperGraphViewer.USAGE = "USAGE: HyperGraphViewer <items file> <rules file> <first sentence> <last sentence>" [static]