Examples of BorderLineStyle


Examples of jxl.format.BorderLineStyle

        && borderStyle[LEFT] == BorderLineStyle.NONE
        && borderStyle[BOTTOM] == BorderLineStyle.NONE
        && borderStyle[RIGHT] == BorderLineStyle.NONE
        )
      {
        BorderLineStyle style = getBorderLineStyle(pen);
        Colour colour = getWorkbookColour(pen.getLineColor());

        borderStyle[TOP] = style;
        borderStyle[LEFT] = style;
        borderStyle[BOTTOM] = style;
View Full Code Here

Examples of org.zkoss.zss.model.BorderLineStyle

    return hitRight;
  }

  private boolean appendBorderStyle(StringBuffer sb, String locate, BorderStyle bs) {
    String color = bs.getBorderColor();
    BorderLineStyle bls = bs.getBorderLineStyle();
    if (bls == null || BorderLineStyle.NONE.equals(bls))
      return false;
   
    sb.append("border-").append(locate).append(":");
    if (BorderLineStyle.DASHED.equals(bls)) {
View Full Code Here

Examples of org.zkoss.zss.model.BorderLineStyle

   * @param lineStyle jxl.format.Colour
   * @return BorderStyle
   */
  public static BorderStyle getBorderStyle(jxl.format.Colour borderColor, jxl.format.BorderLineStyle lineStyle){
    int pivot = lineStyle.getValue();
    final BorderLineStyle bline = (pivot > _borderStyleArray.length) ?
      BorderLineStyle.NONE : _borderStyleArray[pivot];
    return new BorderStyleImpl(jxlColourToHex(borderColor), bline);
  }
View Full Code Here

Examples of org.zkoss.zss.model.BorderLineStyle

    //3. check border consistency
    //4. clear interior border of the merged cells
    BorderStyle lstyle = fmt.getBorderLeft();
    BorderStyle tstyle = fmt.getBorderTop();
   
    BorderLineStyle lline = lstyle.getBorderLineStyle();
    BorderLineStyle tline = tstyle.getBorderLineStyle();
    BorderLineStyle rline = null;
    BorderLineStyle bline = null;
    String lcolor = lstyle.getBorderColor();
    String tcolor = tstyle.getBorderColor();
    String rcolor = null;
    String bcolor = null;
    boolean lequal = true;
    boolean tequal = true;
    boolean requal = true;
    boolean bequal = true;
   
    for (int row = top; row <= bottom; ++row) {
      for (int col = left; col <= right; ++col) {
        if (row == top && col == left) { //skip the first cell
          continue;
        }
        final CellImpl x = (CellImpl) _matrix.getCellIndex(row, col).getCell();
        x.mySetValue(null, false); //set content to null, but don't fire event
       
        FormatImpl xfmt;
        try {
          xfmt = (FormatImpl) fmt.clone();
        } catch (CloneNotSupportedException e) {
          throw ModelException.Aide.wrap(e);
        }
        final FormatImpl ofmt = getFormatOrCreate(x);
        //check top border
        if (row == top) {
          if (tequal) {
            final BorderStyle tborder = ofmt.getBorderTop();
            final BorderLineStyle tl  = tborder.getBorderLineStyle();
            final String tc = tborder.getBorderColor();
            if (tline != tl) {
              tequal = false;
            }
            if (!tcolor.equals(tc)) {
              tequal = false;
            }
            if (tequal) {
              xfmt.setBorderTop(tborder);
            }
          }
        } else {
          xfmt.setBorderTop(null);
        }
        //check bottom border
        if (row == bottom) {
          if (bequal) {
            final BorderStyle bborder = ofmt.getBorderBottom();
            final BorderLineStyle bl  = bborder.getBorderLineStyle();
            final String bc = bborder.getBorderColor();
            if (bline == null) {
              bline = bl;
            } else if (bline != bl) {
              bequal = false;
            }
            if (bcolor == null) {
              bcolor = bc;
            } else if (!bcolor.equals(bc)) {
              bequal = false;
            }
            if (bequal) {
              xfmt.setBorderBottom(bborder);
            }
          }
        } else {
          xfmt.setBorderBottom(null);
        }
        //check left border
        if (col == left) {
          if (lequal) {
            final BorderStyle lborder = ofmt.getBorderLeft();
            final BorderLineStyle ll  = lborder.getBorderLineStyle();
            final String lc = lborder.getBorderColor();
            if (lline != ll) {
              lequal = false;
            }
            if (!lcolor.equals(lc)) {
              lequal = false;
            }
            if (lequal) {
              xfmt.setBorderLeft(lborder);
            }
          }
        } else {
          xfmt.setBorderLeft(null);
        }
        //check right border
        if (col == right) {
          if (requal) {
            final BorderStyle rborder = ofmt.getBorderRight();
            final BorderLineStyle rl  = rborder.getBorderLineStyle();
            final String rc = rborder.getBorderColor();
            if (rline == null) {
              rline = rl;
            } else if (rline != rl) {
              requal = false;
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.