Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.AbstractImagePrototype$ImagePrototypeElement


            SafeHtmlBuilder safeHtmlBuilder)
    {


        ImageResource icon = MessageCenterView.getSeverityIcon(message.getSeverity());
        AbstractImagePrototype prototype = AbstractImagePrototype.create(icon);

        String cssName = (context.getIndex() %2 > 0) ? "message-list-item message-list-item-odd" : "message-list-item";

        safeHtmlBuilder.appendHtmlConstant("<table width='100%' cellpadding=4 cellspacing=0><tr valign='middle'>");
        safeHtmlBuilder.appendHtmlConstant("<td width=16>");
        safeHtmlBuilder.appendHtmlConstant(prototype.getHTML());
        safeHtmlBuilder.appendHtmlConstant("</td><td width='100%'>");
        String actualMessage = message.getConciseMessage().length()>30 ? message.getConciseMessage().substring(0, 30)+" ..." : message.getConciseMessage();
        safeHtmlBuilder.append(TEMPLATE.message(cssName, actualMessage));
        safeHtmlBuilder.appendHtmlConstant("</td></tr></table>");
View Full Code Here


    private SafeHtml                 shtml;

    public RuleEnabledStateCell() {
        //Do the expensive operations in the constructor
        AbstractImagePrototype aip = AbstractImagePrototype.create( images.warning() );
        SafeHtml icon = SafeHtmlUtils.fromTrustedString( aip.getHTML() );
        shtml = SafeHtmlUtils.fromTrustedString( "<div title='" + constants.AssetTableIsDisabledTip() + "'>" + icon.asString() + "</div>" );
    }
View Full Code Here

    private static ImagesCore images          = (ImagesCore) GWT.create( ImagesCore.class );
    private static final String        HTML_ERROR_ICON = makeImage( images.error() );
    private static final String        HTML_INFO_ICON  = makeImage( images.information() );

    private static String makeImage(ImageResource resource) {
        AbstractImagePrototype prototype = AbstractImagePrototype.create( resource );
        return prototype.getHTML();
    }
View Full Code Here

    TreeNode node = findNode(model);
    return node.isLeaf() ? Joint.NONE : node.expanded ? Joint.EXPANDED : Joint.COLLAPSED;
  }

  protected AbstractImagePrototype calculateIconStyle(M model) {
    AbstractImagePrototype style = null;
    if (iconProvider != null) {
      AbstractImagePrototype iconStyle = iconProvider.getIcon(model);
      if (iconStyle != null) {
        return iconStyle;
      }
    }
    TreeNode node = findNode(model);
View Full Code Here

    public ToolButtonBean(ToolButton target) {
      super(target);
    }

    private String createLabel() {
      AbstractImagePrototype image = this.getImage();
      if (image == null) {
        return text;
      } else {
        return ButtonHelper.createButtonLabel(image, text, labelType);
      }
View Full Code Here

      super(target);
      this.text = target.getText();
    }

    private String createLabel() {
      AbstractImagePrototype image = this.getImage();
      if (image == null) {
        image = CommandAction.ACTION_IMAGES.noimage();
      }
      return ButtonHelper.createButtonLabel(image, text,
          ButtonLabelType.TEXT_ON_RIGHT);
View Full Code Here

        throw new UnsupportedOperationException();
      }
    }

    public void setImage(AbstractImagePrototype image) {
      AbstractImagePrototype oldValue = this.image;
      this.image = image;
      invalidate();
      changeSupport.firePropertyChange("image", oldValue, image);
    }
View Full Code Here

      super(target);
      this.text = target.getText();
    }

    private String createLabel() {
      AbstractImagePrototype image = getSelected()
          ? CommandAction.ACTION_IMAGES.menuitem_radiobutton()
          : CommandAction.ACTION_IMAGES.noimage();
      return ButtonHelper.createButtonLabel(image, text,
          ButtonLabelType.TEXT_ON_RIGHT);
    }
View Full Code Here

      super(target);
      this.text = target.getText();
    }

    private String createLabel() {
      AbstractImagePrototype image = getSelected()
          ? CommandAction.ACTION_IMAGES.menuitem_checkbox()
          : CommandAction.ACTION_IMAGES.noimage();
      return ButtonHelper.createButtonLabel(image, text,
          ButtonLabelType.TEXT_ON_RIGHT);
    }
View Full Code Here

  public AbstractImagePrototype getImage() {
    return image;
  }

  public void setImage(AbstractImagePrototype image) {
    final AbstractImagePrototype oldValue = this.image;
    this.image = image;
    fireActionPropertyChange(ActionProperty.IMAGE, oldValue, image);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.AbstractImagePrototype$ImagePrototypeElement

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.