Examples of ColorMapper


Examples of com.visitrend.ndvis.colormapper.ColorMapper

        associateLookup(new ProxyLookup(new AbstractLookup(content),
                new AbstractLookup(saveLookup), Lookups.singleton(this)));
        content.add(dataInfo);
        final Parameters params = new Parameters(dataInfo, this);
        content.add(params);
        final ColorMapper cm = new ColorMapper(params, this);
        content.add(cm);
       
        if(img==null){
            // it's important to call these ColorEngine method in this order
            cm.getEngine().updateOrder();
            cm.getEngine().updateBases();

            img = new BufferedImage(cm.getEngine().getUpperXbound(),
                    cm.getEngine().getUpperYbound(), BufferedImage.TYPE_INT_RGB);
        }
       
        image = new ImagePane();

        listeners = new EventListenerList();
        atx = new AffineTransform();
        resetImageManipulation();
        image.setDoubleBuffered(false);
        image.setBackground(Color.gray);
        image.setForeground(Color.white);
        image.setOpaque(true);
        // Let the user scroll by dragging to outside the window.
        image.setAutoscrolls(true);
        // this will set more stuff and possibly resize
        // this panel component
        setOffScreenImage(img);

        scrollPane = new JScrollPane(image);
        scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        setLayout(new BorderLayout());
        add(scrollPane, BorderLayout.CENTER);
        add(params, BorderLayout.NORTH);
        add(cm, BorderLayout.SOUTH);
       
        count++;
        setDisplayName("Image " + count);

        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {

            @Override
            public void run() {
                params.setVisible(true);
                cm.setVisible(true);
                impl = Lookup.getDefault().lookup(SaveCookie.class);
            }
        });
    }
View Full Code Here

Examples of org.jzy3d.colors.ColorMapper

        Range range = new Range(-.5, .5);
        int steps   = 50;
       
        // Create the object to represent the function over the given range.
        final Shape surface = (Shape)Builder.buildOrthonormal(new OrthonormalGrid(range, steps, range, steps), mapper);
        surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface.getBounds().getZmin(), surface.getBounds().getZmax()));
        surface.setFaceDisplayed(true);
        surface.setWireframeDisplayed(true);
        surface.setWireframeColor(Color.BLACK);
       
        // Setup a colorbar for the surface object and add it to the scene
View Full Code Here

Examples of org.jzy3d.colors.ColorMapper

        Range range = new Range(-.5, .5);
        int steps   = 50;
       
        // Create the object to represent the function over the given range.
        final Shape surface = (Shape)Builder.buildOrthonormal(new OrthonormalGrid(range, steps, range, steps), mapper);
        surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface.getBounds().getZmin(), surface.getBounds().getZmax()));
        surface.setFaceDisplayed(true);
        surface.setWireframeDisplayed(true);
        surface.setWireframeColor(Color.BLACK);
       
        // Setup a colorbar for the surface object and add it to the scene
View Full Code Here

Examples of simtools.ui.ColorMapper

        dst.setDataSourceCollection((DataSourceCollection)o);
        chart.setTitle(dst.getName());
        for (int i=0; i<mappers.size(); ++i) {
          DataSource ds = (DataSource)mapperSources.get(i);
          if (ds!=null) ds.removeListener(this);
          ColorMapper cm = (ColorMapper)mappers.get(i);
          if (cm!=null) cm.removeListener(this);
        }
        for (int i=0; i<((DataSourceCollection)o).size(); ++i) {
          mappers.add(null); mapperSources.add(null); // no mapper by default
        }
        notifyChange();
View Full Code Here

Examples of simtools.ui.ColorMapper

    CategoryPlot plot = chart.getCategoryPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    boolean hasChanged = false;
    for (int i=0; i<mapperSources.size(); ++i) {
      if (ds.equals(mapperSources.get(i))) {
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if (cm!=null) {
          Paint p1 = hasChanged ? null : renderer.getSeriesPaint(i);
          renderer.setSeriesPaint(i,cm.getPaint(ds,index));
          // check colors only if useful => when one color changed, don't check the others
          if (!hasChanged) {
            Paint p2 = renderer.getSeriesPaint(i);
            if (!p1.equals(p2)) hasChanged = true;
          }
View Full Code Here

Examples of simtools.ui.ColorMapper

        CategoryItemRenderer renderer = plot.getRenderer();
        DataSource ds = (DataSource)mapperSources.get(i);
        if ((e.source==null) && (ds!=null)) ds.removeListener(BarChartShape.this);
        mapperSources.set(i,e.source);
        if (e.source!=null) e.source.addListener(BarChartShape.this);
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if ((e.mapper==null) && (cm!=null)) cm.removeListener(BarChartShape.this);
        mappers.set(i,e.mapper);
        if (e.mapper!=null) e.mapper.addListener(BarChartShape.this);
       
        if ((e.mapper!=null) && (e.source!=null)) {
          e.mapper.setDefaultPaint(e.color);
View Full Code Here

Examples of simtools.ui.ColorMapper

        dst.setDataSourceCollection((DataSourceCollection)o);
        chart.setTitle(dst.getName());
        for (int i=0; i<mappers.size(); ++i) {
          DataSource ds = (DataSource)mapperSources.get(i);
          if (ds!=null) ds.removeListener(this);
          ColorMapper cm = (ColorMapper)mappers.get(i);
          if (cm!=null) cm.removeListener(this);
        }
        for (int i=0; i<((DataSourceCollection)o).size(); ++i) {
          mappers.add(null); mapperSources.add(null); // no mapper by default
        }
        notifyChange();
View Full Code Here

Examples of simtools.ui.ColorMapper

    PiePlot plot = (PiePlot)chart.getPlot();
    SourcePieDataset dst = (SourcePieDataset)plot.getDataset();
    boolean hasChanged = false;
    for (int i=0; i<mapperSources.size(); ++i) {
      if (ds.equals(mapperSources.get(i))) {
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if (cm!=null) {
          Paint p1 = hasChanged ? null : plot.getSectionPaint(i);
          plot.setSectionPaint(i,cm.getPaint(ds,index));
          // check colors only if useful => when one color changed, don't check the others
          if (!hasChanged) {
            Paint p2 = plot.getSectionPaint(i);
            if (!p1.equals(p2)) hasChanged = true;
          }
View Full Code Here

Examples of simtools.ui.ColorMapper

        mapperSources.set(i,e.source);
        if (e.source!=null) {
            e.source.addListener(PieChartShape.this);
            e.source.addEndNotificationListener(PieChartShape.this);
        }
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if ((e.mapper==null) && (cm!=null)) cm.removeListener(PieChartShape.this);
        mappers.set(i,e.mapper);
        if (e.mapper!=null) e.mapper.addListener(PieChartShape.this);
       
        if ((e.mapper!=null) && (e.source!=null)) {
          e.mapper.setDefaultPaint(e.color);
View Full Code Here

Examples of simtools.ui.ColorMapper

        } else {
            cp.side=Gate.WEST;
        }

        DataSource ds = (DataSource) emitterPanel.getPropertyValue(DynamicColorPanel.DYNAMIC_COLOR_SOURCE);
        ColorMapper cm = (ColorMapper) emitterPanel.getPropertyValue(DynamicColorPanel.DYNAMIC_COLOR_MAPPER);
        cp.isInput = ds==null && cm == null;
       
        cp.ds = ds;
        cp.cm = cm;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.