Package org.apache.commons.collections15.keyvalue

Examples of org.apache.commons.collections15.keyvalue.MultiKey


            }

            vv.setBackground(Color.WHITE);


            Transformer labelTransformer = new ChainedTransformer<String, String>(new Transformer[]{
                        new ToStringLabeller<Node>() {

                            public String transform(Node v) {
                                return v.getLabel();
                                //return ((primitives.graph.Node)(v.getVertex())).getLabel();
View Full Code Here


     * their natural ordering.
     */
    @SuppressWarnings("unchecked")
    public SortedSparseMultigraph()
    {
        this(new ComparableComparator(), new ComparableComparator());
    }
View Full Code Here

     * OrderedMap uses TreeMap as its known comparison.
     *
     * @return a map that is known to be valid
     */
    public Map makeConfirmedMap() {
        return new TreeMap(new NullComparator(ComparableComparator.getInstance()));
    }
View Full Code Here

     * The only confirmed collection we have that is ordered is the sorted one.
     * Thus, sort the keys.
     */
    public Object[] getSampleKeys() {
        List list = new ArrayList(Arrays.asList(super.getSampleKeys()));
        Collections.sort(list, new NullComparator(ComparableComparator.getInstance()));
        return list.toArray();
    }
View Full Code Here

        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

TOP

Related Classes of org.apache.commons.collections15.keyvalue.MultiKey

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.