Examples of calculateWidth()


Examples of org.joshy.gfx.draw.Font.calculateWidth()

    @Override
    public void draw(GFX gfx) {
        if(this.string != null) {
            Font font = Font.name("OpenSans").size(26).resolve();
            double width = font.calculateWidth(string) + 30;
            if(width < getWidth()) {
                width = getWidth();
            }
            gfx.setPaint(FlatColor.hsb(0, 0, 0.8, this.getOpacity() * 0.9));
            gfx.fillRoundRect(0, 0, width, getHeight(), 10, 10);
View Full Code Here

Examples of org.richfaces.component.LayoutStructure.calculateWidth()

  }
 
  public void renderLayout(ResponseWriter writer,FacesContext context, UILayout layout)
      throws IOException {
    LayoutStructure structure = new LayoutStructure(layout);
    structure.calculateWidth();
    Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
    Object oldLayout = requestMap.get(LAYOUT_STRUCTURE_ATTRIBUTE);
    requestMap.put(LAYOUT_STRUCTURE_ATTRIBUTE, structure);
    // Detect layout content;
    if (null != structure.getTop()) {
View Full Code Here

Examples of org.richfaces.component.LayoutStructure.calculateWidth()

    }

    public void renderLayout(ResponseWriter writer, FacesContext context, AbstractLayout layout)
            throws IOException {
        LayoutStructure structure = new LayoutStructure(layout);
        structure.calculateWidth();
        Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
        Object oldLayout = requestMap.get(LAYOUT_STRUCTURE_ATTRIBUTE);
        requestMap.put(LAYOUT_STRUCTURE_ATTRIBUTE, structure);
        // Detect layout content;
        if (null != structure.getTop()) {
View Full Code Here

Examples of org.richfaces.component.LayoutStructure.calculateWidth()

        LayoutStructure structure;
        if (null != parentLayout && parentLayout instanceof LayoutStructure) {
            structure = (LayoutStructure) parentLayout;
        } else {
            structure = new LayoutStructure(panel);
            structure.calculateWidth();
        }
        Object componentStyle = panel.getAttributes().get(HtmlConstants.STYLE_ATTRIBUTE);
        if (null != componentStyle) {
            style.append(componentStyle).append(";");
        }
View Full Code Here

Examples of org.richfaces.component.LayoutStructure.calculateWidth()

    LayoutStructure structure;
    if (null != parentLayout && parentLayout instanceof LayoutStructure) {
      structure = (LayoutStructure) parentLayout;     
    } else {
      structure = new LayoutStructure(panel);
      structure.calculateWidth();
    }
    Object componentStyle = panel.getAttributes().get(HTML.style_ATTRIBUTE);
    if (null != componentStyle) {
      style.append(componentStyle).append(";");
    }
View Full Code Here

Examples of org.richfaces.component.LayoutStructure.calculateWidth()

  }
 
  public void renderLayout(ResponseWriter writer,FacesContext context, UILayout layout)
      throws IOException {
    LayoutStructure structure = new LayoutStructure(layout);
    structure.calculateWidth();
    Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
    Object oldLayout = requestMap.get(LAYOUT_STRUCTURE_ATTRIBUTE);
    requestMap.put(LAYOUT_STRUCTURE_ATTRIBUTE, structure);
    // Detect layout content;
    if (null != structure.getTop()) {
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.