Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.TextHAlign


      String fontName = format.getFontType();
      if (fontName != null) {
        sb.append("font-family:").append(fontName).append(";");
      }

      TextHAlign textHAlign = _cell.getTextHAlign();
      if (textHAlign != null) {
        if (textHAlign.equals(TextHAlign.RIGHT)) {
          sb.append("text-align:").append("right").append(";");
        } else if (textHAlign.equals(TextHAlign.CENTER)) {
          sb.append("text-align:").append("center").append(";");
        }
      }

      boolean textWrap = format.isTextWrap();
View Full Code Here


        txt = cell.getText();
      }
     
      jcell.setData("txt", txt==null?"":Utils.escapeCellText(txt,wrap,wrap));
     
      TextHAlign textHAlign = cell.getTextHAlign();
      if (textHAlign != null) {
        if (textHAlign.equals(TextHAlign.RIGHT)) {
          jcell.setData("hal","r");
        } else if (textHAlign.equals(TextHAlign.CENTER)) {
          jcell.setData("hal","c");
        }
      }
     
     
View Full Code Here

        Format format = cell.getFormat();
        if(format != null && format.isTextWrap()){
          HTMLs.appendAttribute(sb, "z.wrap", "t");
        }
       
        TextHAlign textHAlign = cell.getTextHAlign();
        if (textHAlign != null) {
          if (textHAlign.equals(TextHAlign.RIGHT)) {
            HTMLs.appendAttribute(sb, "z.hal", "r");
          } else if (textHAlign.equals(TextHAlign.CENTER)) {
            HTMLs.appendAttribute(sb, "z.hal", "c");
          }
        }
       
        if (cfh.hasRightBorder()){
View Full Code Here

  private void assertFontColor(String val, String color) {
    assertEquals(color, _format.getTextColor(val));
  }

  private void assertHAlign(double val, TextHAlign halign) {
    final TextHAlign result = _format.getTextHAlign(new Double(val));
    System.out.println(result);
    assertEquals(halign, result);
  }
View Full Code Here

    System.out.println(result);
    assertEquals(halign, result);
  }

  private void assertHAlign(String val, TextHAlign halign) {
    final TextHAlign result = _format.getTextHAlign(val);
    System.out.println(result);
    assertEquals(halign, result);
  }
View Full Code Here

          result.setData("wrap", true);
        }
        if (cfh.hasRightBorder()){
          result.setData("rbo",true);
        }
        TextHAlign textHAlign = (cell==null)?null:cell.getTextHAlign();
        if (textHAlign != null) {
          if (textHAlign.equals(TextHAlign.RIGHT)) {
            result.setData("hal","r");
          } else if (textHAlign.equals(TextHAlign.CENTER)) {
            result.setData("hal","c");
          }
        }
        text = Utils.escapeCellText(text,wrap,wrap);
        result.setData("val", text);
View Full Code Here

      return color == null ? _format.getFontColor() : color;
    }
  }

  public TextHAlign getTextHAlign(Object val) {
    final TextHAlign halign = _format.getTextHAlign();
    return TextHAlign.GENERAL != halign ? halign
        : (val instanceof String) ? TextHAlign.LEFT : TextHAlign.RIGHT;
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.model.TextHAlign

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.