Package org.apache.commons.collections15.iterators

Examples of org.apache.commons.collections15.iterators.ObjectGraphIterator


        final ImageIcon icon = mapIcon;

        Dimension layoutSize = new Dimension(2000,1000);
       
        Layout<String,Number> layout = new StaticLayout<String,Number>(graph,
            new ChainedTransformer(new Transformer[]{
                new CityTransformer(map),
                new LatLonPixelTransformer(new Dimension(2000,1000))
            }));
         
        layout.setSize(layoutSize);
View Full Code Here


public class TestModelAnalysisUtils extends TestCase{

 
  public void testCreateStateGraph() throws Exception
  {
     ChainedTransformer transformer = new ChainedTransformer( new Transformer[]{ExceptionTransformer.getInstance(), new ChainedTransformer(new Transformer[]{}), new ConstantTransformer("hallo") });
    
     Graph stateGraph = ModelAnalysisBoostUtils.createStateGraph(transformer);
    
     Window display = JungGraphBoostUtils.displayGraph(stateGraph, JFrame.DISPOSE_ON_CLOSE);
    
View Full Code Here

        ewcs =
            new EdgeWeightStrokeFunction<Number>(edge_weight);
        vsh = new VertexStrokeHighlight<Integer,Number>(g, picked_state);
        vff = new VertexFontTransformer<Integer>();
        eff = new EdgeFontTransformer<Number>();
        vs_none = new ConstantTransformer(null);
        es_none = new ConstantTransformer(null);
        vssa = new VertexShapeSizeAspect<Integer,Number>(g, voltages);
        show_edge = new DirectionDisplayPredicate<Integer,Number>(true, true);
        show_arrow = new DirectionDisplayPredicate<Integer,Number>(true, false);
        show_vertex = new VertexDisplayPredicate<Integer,Number>(false);

        // uses a gradient edge if unpicked, otherwise uses picked selection
        edgeDrawPaint =
            new GradientPickedEdgePaintFunction<Integer,Number>(
                    new PickableEdgePaintTransformer<Number>(
                            vv.getPickedEdgeState(),Color.black,Color.cyan), vv);
        edgeFillPaint =
            new GradientPickedEdgePaintFunction<Integer,Number>(
                    new PickableEdgePaintTransformer<Number>(
                            vv.getPickedEdgeState(),Color.black,Color.cyan), vv);
       
        vv.getRenderContext().setVertexFillPaintTransformer(seedFillColor);
        vv.getRenderContext().setVertexDrawPaintTransformer(seedDrawColor);
        vv.getRenderContext().setVertexStrokeTransformer(vsh);
        vv.getRenderContext().setVertexLabelTransformer(vs_none);
        vv.getRenderContext().setVertexFontTransformer(vff);
        vv.getRenderContext().setVertexShapeTransformer(vssa);
        vv.getRenderContext().setVertexIncludePredicate(show_vertex);
       
        vv.getRenderContext().setEdgeDrawPaintTransformer( edgeDrawPaint );
        vv.getRenderContext().setEdgeLabelTransformer(es_none);
        vv.getRenderContext().setEdgeFontTransformer(eff);
        vv.getRenderContext().setEdgeStrokeTransformer(ewcs);
        vv.getRenderContext().setEdgeIncludePredicate(show_edge);
        vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line<Integer,Number>());
        vv.getRenderContext().setEdgeArrowPredicate(show_arrow);
       
        vv.getRenderContext().setArrowFillPaintTransformer(new ConstantTransformer(Color.lightGray));
        vv.getRenderContext().setArrowDrawPaintTransformer(new ConstantTransformer(Color.black));
        JPanel jp = new JPanel();
        jp.setLayout(new BorderLayout());
       
        vv.setBackground(Color.white);
        GraphZoomScrollPane scrollPane = new GraphZoomScrollPane(vv);
View Full Code Here

        else if (source == fill_edges)
        {
          if(source.isSelected()) {
            vv.getRenderContext().setEdgeFillPaintTransformer( edgeFillPaint );
          } else {
            vv.getRenderContext().setEdgeFillPaintTransformer( new ConstantTransformer(null) );
          }
//            edgePaint.useFill(source.isSelected());
        }
        vv.repaint();
    }
View Full Code Here

                    } else {
                        return Color.BLACK;
                    }
                }
            });
            vv.getRenderContext().setEdgeDrawPaintTransformer(new ConstantTransformer(Color.lightGray));
            vv.getRenderContext().setArrowFillPaintTransformer(new ConstantTransformer(Color.lightGray));
            vv.getRenderContext().setArrowDrawPaintTransformer(new ConstantTransformer(Color.lightGray));

            // add my listeners for ToolTips
            vv.setVertexToolTipTransformer(new ToStringLabeller<String>() {
            });
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  public BetweennessCentrality(Graph<V, E> graph)
  {
    initialize(graph);
    computeBetweenness(new LinkedList<V>(), new ConstantTransformer(1));
  }
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public HITSWithPriors(Hypergraph<V,E> g,
          Transformer<V, HITS.Scores> vertex_priors, double alpha)
    {
      super(g, new ConstantTransformer(1.0), vertex_priors, alpha);
        disappearing_potential = new HITS.Scores(0,0);
    }
View Full Code Here

     *
     * @param g     the graph on which distances will be calculated
     */
    @SuppressWarnings("unchecked")
    public DijkstraDistance(Graph<V,E> g) {
        this(g, new ConstantTransformer(1), true);
    }
View Full Code Here

     * @param g     the graph on which distances will be calculated
     * @param cached    specifies whether the results are to be cached
     */
    @SuppressWarnings("unchecked")
    public DijkstraDistance(Graph<V,E> g, boolean cached) {
        this(g, new ConstantTransformer(1), cached);
    }
View Full Code Here

     * dimension--the input knows how big the graph is. Defaults to the unit
     * length function.
     */
    @SuppressWarnings("unchecked")
    public SpringLayout(Graph<V,E> g) {
        this(g, new ConstantTransformer(30));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections15.iterators.ObjectGraphIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.