Examples of PlotCompoundEdit


Examples of jsynoptic.builtin.Plot.PlotCompoundEdit

    CompoundEdit ce=null;

    //  simple zoom, all the axes are taken into account
    HashMap plot1OldValues=plot1.getAxesProperties(null, -1);
    plot1.zoomWheel(x1, y1, PlotZoom.zoomWheelFactor, zoomIn);
    ce=plot1.new PlotCompoundEdit(plot1OldValues);
    plot1.repaintDiagram(plot1.getBounds());

    // store undoable event
    selection.getElementContainer().getComponent().fireUndoableEditUpdate(new UndoableEditEvent(selection.getElementContainer().getComponent(), ce));
    selection.getElementContainer().getComponent().repaint();
View Full Code Here

Examples of jsynoptic.builtin.Plot.PlotCompoundEdit

      CompoundEdit ce=null;
      if(collectivePlots.isEmpty()){
        // a simple zoom, all the exes are taken into account
        HashMap plot1OldValues=plot1.getAxesProperties(null, -1);
        plot1.zoom(x1, x2, y1, y2, false);
        ce=plot1.new PlotCompoundEdit(plot1OldValues);
        plot1.repaintDiagram(plot1.getBounds());
      }
      else{
        // a collective zoom
        ce = new CompoundEdit();
        HashMap plot1OldValues=plot1.getAxesProperties(null, Plot.PX);
        if(plot1.secondaryX!=null){
          plot1.getAxesProperties(plot1OldValues, Plot.SX);
        }
        // X axes zoom only
        plot1.zoom(x1, x2, 0., 0., true);
        PlotCompoundEdit ce1=plot1.new PlotCompoundEdit(plot1OldValues);
        plot1.repaintDiagram(plot1.getBounds());
        ce.addEdit(ce1);
        // apply plot1 X axes properties to the other compliants plots
        Iterator it=collectivePlots.iterator();
        while(it.hasNext()){
          Plot plot=(Plot)it.next();
          HashMap oldValues=plot.getAxesProperties(null, Plot.PX);
          if(plot.secondaryX!=null){
            plot.getAxesProperties(oldValues, Plot.SX);
          }
          Iterator vit=oldValues.keySet().iterator();
          while(vit.hasNext()){
            String k=(String)vit.next();
            plot.setPropertyValue(k,plot1.getPropertyValue(k));
          }
          PlotCompoundEdit ce2=plot.new PlotCompoundEdit(oldValues);
          plot.repaintDiagram(plot.getBounds());
          ce.addEdit(ce2);
        }
        ce.end();
      }
View Full Code Here

Examples of jsynoptic.builtin.Plot.PlotCompoundEdit

    CompoundEdit ce=null;
    if(collectivePlots.isEmpty()){
      // a simple translation, all the exes are taken into account
      if (firstTranslation){
        HashMap plot1OldValues=plot1.getAxesProperties(null, -1);
        ce=plot1.new PlotCompoundEdit(plot1OldValues);
      }
      plot1.translate(x1, x2, y1, y2);
      plot1.repaintDiagram(plot1.getBounds());
     

    }
    else{
      // collective translation
      ce = new CompoundEdit();
     
      if (firstTranslation){
        HashMap plot1OldValues=plot1.getAxesProperties(null, -1);
        PlotCompoundEdit ce1=plot1.new PlotCompoundEdit(plot1OldValues);
        ce.addEdit(ce1);
      }
      plot1.translate(x1, x2, y1, y2);
      plot1.repaintDiagram(plot1.getBounds());
     
      // apply plot1 X axes properties to the other compliants plots
      Iterator it=collectivePlots.iterator();
      while(it.hasNext()){
        Plot plot=(Plot)it.next();

        if (firstTranslation){
          HashMap oldValues=plot.getAxesProperties(null,-1);
          PlotCompoundEdit ce2=plot.new PlotCompoundEdit(oldValues);
          ce.addEdit(ce2);
        }
        plot.translate(x1, x2, y1, y2);
            plot.repaintDiagram(plot.getBounds());
      }
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.