Package freegressi.tableur

Examples of freegressi.tableur.Colonne


   * @param newName le nouveau nom
   * @param position la position de l'axe correspondant
   */
  public void notifyNameChanged(String newName, Position position){
    Tableur sheet = SpreadSheets.getInstance().getActiveSheet();
    Colonne col = sheet.donneColonne(newName);
    double min = col.getMin();
    double max = col.getMax();
    JPanelAxis jpa = bottom;
    switch (position){
      case BOTTOM : jpa = bottom; break;
      case TOP : jpa = top; break;
      case LEFT : jpa = left; break;
View Full Code Here


  }
 
  private void reCalculateAbscissaAxis(){
    String name = abscissaPanel.getAbscissaName();
    Tableur sheet = SpreadSheets.getInstance().getActiveSheet();
    Colonne col = sheet.donneColonne(name);
   
   
    if (bottom.isVisible()){
      if (bottom.isScaleAuto()){
        changeMinMax(bottom, col.getMin(), col.getMax());
      }
    }
    if (top.isVisible()){
      if (top.isScaleAuto()){
        changeMinMax(top, col.getMin(), col.getMax());
      }     
    }
  }
View Full Code Here

  private void reCalculateCurvesAxis(){
    boolean l = false, r = false;
    double minL = Double.MAX_VALUE, maxL = Double.MIN_VALUE, min;
    double minR = Double.MAX_VALUE, maxR = Double.MIN_VALUE, max;
    String name;
    Colonne col;
    Tableur sheet = SpreadSheets.getInstance().getActiveSheet();
    boolean leftWasVisible = left.isVisible(), rightWasVisible = right.isVisible();
    boolean changeLeftMinMax = true, changeRightMinMax = true;
    for (JPanelCurve jpc : panelCurves){
      name = jpc.getCurveName();
      col = sheet.donneColonne(name);
      min = col.getMin();
      max = col.getMax();
      if (jpc.getPosition() == Position.LEFT){ // Axe de gauche
        l = true;
        if (!leftWasVisible){
          left.setScaleAuto(true);
          leftWasVisible = true;
View Full Code Here

 
  private void doValues(int index){
    ArrayList<Colonne> columns = new ArrayList<>();
    int varCount = names.size();
    for (int i = 0; i < varCount; i++){
      Colonne c = new Colonne(names.get(i), units.get(i));
      columns.add(c);
    }
    String line;
    String[] tok;
    double d;
View Full Code Here

   * Répond à l'évenement "une cellule a changé"
   * @param event
   */
  @Override
  public void sheetCellChanged(SheetCellChangedEvent event) {
    Colonne col = sheet.donneColonne(event.getColonne() - 1);
    setMinMax(col);
    notifyGraphicStyleChanged(graphicStyle, false);
  }
View Full Code Here

   * Utilisée dans setMinMax
   * @param axis
   * @param names
   */
  private void minmaxAxis(Axis axis, List<String> names){
    Colonne c;
    double min = Double.MAX_VALUE, max = Double.MIN_VALUE;
    for (String n : names){
      c = sheet.donneColonne(n);
      if (c.getMin() < min) { min = c.getMin();}
      if (c.getMax() > max) { max = c.getMax();}
    }
    axis.getAxisStyle().reInitMinMax(min, max);   
  }
View Full Code Here

   */
  private GraphicStyle createDefaultGraphicStyle2(){
    GraphicStyle gs = new GraphicStyle();
    Tableur sh = SpreadSheets.getInstance().getActiveSheet();
    if (sh != null && sh.donneNombreColonne() > 0){
      Colonne col1, col2;
      col1 = sh.donneColonne(0);
      String xName = col1.getColonneDescription().getNom();
      gs.setAbscissa(xName);
      gs.getaX1().setAll(xName, xName, true, col1.getMin(), col1.getMax(), Position.RIGHT);
      if (sh.donneNombreColonne() > 1){
        col2 = sh.donneColonne(1);
      } else {
        col2 = col1;
      }
View Full Code Here

    axisY2.setAxisY(axisX2Height - 1);
    axisY2.update(width, height);

    for (Curve curve : graphicStyle.getCurves()){
      //Colonne colX = SpreadSheets.getInstance().getActiveSheet().donneColonne(curve.getAxisX().getAxisStyle().getName());
      Colonne colX = sheet.donneColonne(curve.getxName());
      double minX = curve.getAxisX().getMin();
      double maxX = curve.getAxisX().getMax();
      int x1 = axisX1.getAxisX();
      int x2 = axisX1.getAxisX() + axisX1.getAxisWidth() - 1;
      int[] x = getIntArray(colX.getTableauDouble(), x1, x2, minX, maxX);
      //Colonne colY = SpreadSheets.getInstance().getActiveSheet().donneColonne(curve.getAxisY().getAxisStyle().getName());
      //Colonne colY = sheet.donneColonne(curve.getAxisY().getAxisStyle().getName());
      Colonne colY = sheet.donneColonne(curve.getyName());
//      if (colY == null){
//        System.out.println("colY == null");
//      }
      double minY = curve.getAxisY().getMin();
      double maxY = curve.getAxisY().getMax();
      int y1 = axisY1.getAxisY() + axisY1.getAxisHeight() - 1;
      int y2 = axisY1.getAxisY();
      int[] y = getIntArray(colY.getTableauDouble(), y1, y2, minY, maxY);
      curve.update(x, y);
      objects.add(curve);
    }
   
    for (Curve curve : graphicStyle.getFitCurves()){
View Full Code Here

TOP

Related Classes of freegressi.tableur.Colonne

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.