Examples of BorderStyle


Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

    if (value == null)
    {
      return "";
    }

    final BorderStyle borderStyle = StrokeUtility.translateStrokeStyle(value);
    final float width = value.getLineWidth();
    return borderStyle + ", " + width;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

    if (width < 0)
    {
      setValue(null);
      return;
    }
    BorderStyle style = BorderStyle.getBorderStyle(strings[0].trim());
    if (style == null)
    {
      style = BorderStyle.getBorderStyle(strings[1].trim());
    }
    if (style == null)
    {
      setValue(null);
    }
    else
    {
      setValue(style.createStroke(width));
    }
  }
View Full Code Here

Examples of org.zkoss.poi.ss.usermodel.BorderStyle

    final String param = (String)evt.getData();
 
    getCellStyleContext().modifyStyle(new StyleModification(){
      public void modify(CellStyle style, CellStyleContextEvent candidteEvt) {
        candidteEvt.setExecutor(CellStyleCtrlPanel.this);
        BorderStyle borderStyle = BorderStyle.MEDIUM;
        if ("no".equals(param))
          borderStyle = BorderStyle.NONE;
        style.setBorder(getBorderType(param), borderStyle, color);
      }
    });
View Full Code Here

Examples of org.zkoss.zss.model.BorderStyle

        cell.setFormat(format);
      }
    }
  }
  public static void setBorder(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0xF);
  }
View Full Code Here

Examples of org.zkoss.zss.model.BorderStyle

  public static void setBorder(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0xF);
  }
  public static void setBorderTop(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x4);
  }
View Full Code Here

Examples of org.zkoss.zss.model.BorderStyle

  public static void setBorderTop(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x4);
  }
  public static void setBorderLeft(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x8);
  }
View Full Code Here

Examples of org.zkoss.zss.model.BorderStyle

  public static void setBorderLeft(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x8);
  }
  public static void setBorderBottom(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x1);
  }
View Full Code Here

Examples of org.zkoss.zss.model.BorderStyle

  public static void setBorderBottom(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x1);
  }
  public static void setBorderRight(Sheet sheet,int row,int col,String color,BorderLineStyle linestyle){
    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x2);
  }
View Full Code Here

Examples of org.zkoss.zss.model.BorderStyle

    boolean hitBottom = false;

    if (_cell != null) {
      Format format = _cell.getFormat();
      if (format != null){
        BorderStyle bb = format.getBorderBottom();
        if (bb != null) {
          hitBottom = appendBorderStyle(sb, "bottom", bb);
        }
      }
    }
    Cell next = null;
    if (!hitBottom) {
      next = _sheet.getCell(_row + 1, _col);
      /*if(next == null){ // don't search into merge ranges
        //check is _row+1,_col in merge range
        MergedRect rect = _mmHelper.getMergeRange(_row+1, _col);
        if(rect !=null){
          next = _sheet.getCell(rect.getTop(),rect.getLeft());
        }
      }*/
      if (next != null) {
        Format format = next.getFormat();
        if (format != null){
          BorderStyle bb = format.getBorderTop();// get top border of
          if (bb != null) {
            // set next row top border as cell's bottom border;
            hitBottom = appendBorderStyle(sb, "bottom", bb);
          }
        }
      }
    }
   
    //border depends on next cell's background color
    if(!hitBottom && next !=null){
      Format format = next.getFormat();
      if (format != null){
        String bgColor = format.getFillColor();
        if (AUTO_COLOR.equals(bgColor)) {
          bgColor = null;
        }
        if (bgColor != null && !bgColor.toUpperCase().endsWith("FFFFFF")) {
          BorderStyle bb = new BorderStyleImpl(bgColor,BorderLineStyle.THIN);
          hitBottom = appendBorderStyle(sb, "bottom", bb);
        }
      }
    }
   
    //border depends on current cell's background color
    if(!hitBottom && _cell !=null){
      Format format = _cell.getFormat();
      if (format != null){
        String bgColor = format.getFillColor();
        if (AUTO_COLOR.equals(bgColor)) {
          bgColor = null;
        }
        if (bgColor != null && !bgColor.toUpperCase().endsWith("FFFFFF")) {
          BorderStyle bb = new BorderStyleImpl(bgColor,BorderLineStyle.THIN);
          hitBottom = appendBorderStyle(sb, "bottom", bb);
        }
      }
    }
   
View Full Code Here

Examples of org.zkoss.zss.model.BorderStyle

        hitMerge = true;
        right = _sheet.getCell(_row,rect.getRight());
      }
      Format format = right.getFormat();
      if (format != null){
        BorderStyle bb = format.getBorderRight();
        if (bb != null) {
          hitRight = appendBorderStyle(sb, "right", bb);
        }
      }
    }

    Cell next = null;
    //if no border for target cell,then check is this cell in a merge range
    //if(true) then try to get next cell after this merge range
    //else get next cell of this cell
    if(!hitRight){
      int c = hitMerge?rect.getRight()+1:_col+1;
      next = _sheet.getCell(_row,c);
      //find the right cell of merge range.
      if(next!=null){
        Format format = next.getFormat();
        if (format != null){
          BorderStyle bb = format.getBorderLeft();//get left here
          if (bb != null) {
            hitRight = appendBorderStyle(sb, "right", bb);
          }
        }
      }
    }

    //border depends on next cell's background color
    if(!hitRight && next !=null){
      Format format = next.getFormat();
      if (format != null){
        String bgColor = format.getFillColor();
        if (AUTO_COLOR.equals(bgColor)) {
          bgColor = null;
        }
        if (bgColor != null && !bgColor.toUpperCase().endsWith("FFFFFF")) {
          BorderStyle bb = new BorderStyleImpl(bgColor,BorderLineStyle.THIN);
          hitRight = appendBorderStyle(sb, "right", bb);
        }
      }
    }
    //border depends on current cell's background color
    if(!hitRight && _cell !=null){
      Format format = _cell.getFormat();
      if (format != null){
        String bgColor = format.getFillColor();
        if (AUTO_COLOR.equals(bgColor)) {
          bgColor = null;
        }
        if (bgColor != null && !bgColor.toUpperCase().endsWith("FFFFFF")) {
          BorderStyle bb = new BorderStyleImpl(bgColor,BorderLineStyle.THIN);
          hitRight = appendBorderStyle(sb, "right", bb);
        }
      }
    }
   
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.