Package org.apache.commons.collections15.comparators

Examples of org.apache.commons.collections15.comparators.BooleanComparator


        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

    }

    @SuppressWarnings("unchecked")
  public AbstractVertexShapeTransformer()
    {
        this(new ConstantTransformer(DEFAULT_SIZE),
                new ConstantTransformer(DEFAULT_ASPECT_RATIO));
    }
View Full Code Here

            new GradientVertexRenderer<String,Number>(
                Color.white, Color.red,
                Color.white, Color.blue,
                vv.getPickedVertexState(),
                false));
        vv.getRenderContext().setEdgeDrawPaintTransformer(new ConstantTransformer(Color.lightGray));
        vv.getRenderContext().setArrowFillPaintTransformer(new ConstantTransformer(Color.lightGray));
        vv.getRenderContext().setArrowDrawPaintTransformer(new ConstantTransformer(Color.lightGray));
       
        vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
        vv.getRenderer().getVertexLabelRenderer().setPositioner(new InsidePositioner());
        vv.getRenderer().getVertexLabelRenderer().setPosition(Renderer.VertexLabel.Position.AUTO);
View Full Code Here

     * 10 and a constant aspect ratio of 1.
     */
    @SuppressWarnings("unchecked")
  public VertexShapeFactory()
    {
        this(new ConstantTransformer(10),
            new ConstantTransformer(1.0f));
    }
View Full Code Here

          TestGraphs.getDemoGraph();
       
        MinimumSpanningForest2<String,Number> prim =
          new MinimumSpanningForest2<String,Number>(graph,
            new DelegateForest<String,Number>(), DelegateTree.<String,Number>getFactory(),
            new ConstantTransformer(1.0));
       
        tree = prim.getForest();
       
        // create two layouts for the one graph, one layout for each model
        Layout<String,Number> layout0 = new KKLayout<String,Number>(graph);
View Full Code Here

        vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line());
        vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
        vv.getRenderContext().setVertexShapeTransformer(new ClusterVertexShapeFunction());
        // add a listener for ToolTips
        vv.setVertexToolTipTransformer(new ToStringLabeller());
        vv.getRenderContext().setArrowFillPaintTransformer(new ConstantTransformer(Color.lightGray));
        rings = new Rings();

        Container content = getContentPane();
        final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv);
        content.add(panel);
View Full Code Here

        vv2 = new VisualizationViewer<String,Number>(visualizationModel, preferredSize);
        vv3 = new VisualizationViewer<String,Number>(visualizationModel, preferredSize);
       
        vv1.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line<String,Number>());
        vv2.getRenderContext().setVertexShapeTransformer(
            new ConstantTransformer(new Rectangle2D.Float(-6,-6,12,12)));

        vv2.getRenderContext().setEdgeShapeTransformer(new EdgeShape.QuadCurve<String,Number>());
       
        vv3.getRenderContext().setEdgeShapeTransformer(new EdgeShape.CubicCurve<String,Number>());
View Full Code Here

        vv.setBackground(Color.white);
        vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line());
        vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
        // add a listener for ToolTips
        vv.setVertexToolTipTransformer(new ToStringLabeller());
        vv.getRenderContext().setArrowFillPaintTransformer(new ConstantTransformer(Color.lightGray));
        rings = new Rings();

        Container content = getContentPane();
        final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv);
        content.add(panel);
View Full Code Here

        final Box box = new Box(10,10,10,
            Box.GENERATE_NORMALS |
            Box.ENABLE_GEOMETRY_PICKING,
            redLook);

    this.edgeAppearanceTransformer = new ConstantTransformer(lightGrayLook);
    this.edgeShapeTransformer = new Transformer<Context<Graph<V,E>,E>,Node>() {

      public Node transform(Context<Graph<V,E>,E> ec) {
        LineArray lineArray = new LineArray(2, LineArray.COORDINATES | LineArray.COLOR_3);
        lineArray.setCoordinates(0, new Point3f[]{new Point3f(0,-.5f,0),new Point3f(0,.5f,0)});
        lineArray.setColor(0, new Color3f(1,1,1));
        lineArray.setColor(1, new Color3f(1,1,1));
        Shape3D shape = new Shape3D();
        shape.setGeometry(lineArray);
        return shape;
//        return new Cylinder(1, 1,
//            Cylinder.GENERATE_NORMALS |
//            Cylinder.ENABLE_GEOMETRY_PICKING,
//             26, 26, lightGrayLook);
      }};
    this.vertexAppearanceTransformer = new ConstantTransformer(redLook);
    this.vertexShapeTransformer = new Transformer<V,Node>() {

      public Node transform(V arg0) {
        return new Sphere(10,
            Sphere.GENERATE_NORMALS |
View Full Code Here

TOP

Related Classes of org.apache.commons.collections15.comparators.BooleanComparator

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.