Package com.google.gwt.resources.client

Examples of com.google.gwt.resources.client.ImageResource


      for (int i = 0; i < templates_.length(); i++)
      {
         String templateName = templates_.get(i).getName();
         TemplateMenuItem menuItem = new TemplateMenuItem(templateName);
        
         ImageResource img = null;

         // Special treatment for built-in templates with known names
         if (templateName.equals(RmdTemplateData.DOCUMENT_TEMPLATE))
         {
            img = resources.documentIcon();
View Full Code Here


  
   private Widget createCodeTransformMenuButton()
   {
      if (codeTransform_ == null)
      {
         ImageResource icon = ThemeResources.INSTANCE.codeTransform();

         ToolbarPopupMenu menu = new ToolbarPopupMenu();
         menu.addItem(commands_.codeCompletion().createMenuItem(false));
         menu.addSeparator();
         menu.addItem(commands_.goToHelp().createMenuItem(false));
View Full Code Here

      }
      setFormatText(selectedOption);
      String prefix = fileType.isPlainMarkdown() ? "Preview " : "Knit ";
      for (int i = 0; i < Math.min(options.size(), values.size()); i++)
      {
         ImageResource img = fileTypeRegistry_.getIconForFilename("output." +
                     extensions.get(i));
         final String valueName = values.get(i);
         ScheduledCommand cmd = new ScheduledCommand()
         {
            @Override
View Full Code Here

   public SafeHtml render(String str)
   {
      if (str.length() != 2)
         return null;

      ImageResource indexImg = imgForStatus(str.charAt(0));
      ImageResource treeImg = imgForStatus(str.charAt(1));

      SafeHtmlBuilder builder = new SafeHtmlBuilder();
      builder.append(SafeHtmlUtils.fromTrustedString(
            "<span " +
            "class=\"" + ctRes_.cellTableStyle().status() + "\" " +
View Full Code Here

        appendHtmlConstant("</td>");
        return this;
    }

    HtmlGenerator appendServer(final ServerGroup group, final String host, final ServerInstance server) {
        ImageResource icon;
        String tooltip = "";
        if (server.isRunning()) {
            if (server.getFlag() != null) {
                icon = Icons.INSTANCE.status_warn();
                if (server.getFlag() == RELOAD_REQUIRED) {
View Full Code Here

    initWidget(new SplitLayoutPanel());
    getElement().getStyle().setOverflow(Overflow.AUTO);
    setStyleName(this.style.cellBrowserWidget());

    // Initialize the open and close images strings.
    ImageResource treeOpen = resources.cellBrowserOpen();
    ImageResource treeClosed = resources.cellBrowserClosed();
    openImageHtml = getImageHtml(treeOpen);
    closedImageHtml = getImageHtml(treeClosed);
    imageWidth = Math.max(treeOpen.getWidth(), treeClosed.getWidth());
    minWidth = imageWidth + 20;

    // Add a placeholder to maintain the scroll width.
    scrollLock = Document.get().createDivElement();
    scrollLock.getStyle().setPosition(Position.ABSOLUTE);
View Full Code Here

    this.style.ensureInjected();
    initWidget(new SimplePanel());
    setStyleName(this.style.cellTreeWidget());

    // Initialize the open and close images strings.
    ImageResource treeOpen = resources.cellTreeOpenItem();
    ImageResource treeClosed = resources.cellTreeClosedItem();
    ImageResource treeLoading = resources.cellTreeLoading();
    openImageHtml = getImageHtml(treeOpen, false);
    closedImageHtml = getImageHtml(treeClosed, false);
    openImageTopHtml = getImageHtml(treeOpen, true);
    closedImageTopHtml = getImageHtml(treeClosed, true);
    loadingImageHtml = getImageHtml(treeLoading, false);
    imageWidth = Math.max(Math.max(treeOpen.getWidth(), treeClosed.getWidth()),
        treeLoading.getWidth());

    // We use one animation for the entire tree.
    setAnimation(SlideAnimation.create());

    // Add event handlers.
View Full Code Here

    return null;
  }
 
  public void loadSprites()
  {
    final ImageResource imageResource = Tiles.INSTANCE.getTilesBitmap();
    final String imageInfo = Tiles.INSTANCE.getTilesInfo().getText();
 
    mSpriteTexture = PUWeb.engine().createEmptyTexture();
    final ImageElement image = PUWeb.engine().getImageElement(imageResource);
    loadImage(new ImageLoadEvent()
View Full Code Here

    return mCreatureImages.get(key);
  }
 
  public void loadPokemonImages()
  {
    final ImageResource imageResource = Pokemon.INSTANCE.getPokemonBitmap();
    final String imageInfo = Pokemon.INSTANCE.getPokemonInfo().getText();
 
    mPokemonTexture = PUWeb.engine().createEmptyTexture();
    final ImageElement image = PUWeb.engine().getImageElement(imageResource);
    loadImage(new ImageLoadEvent()
View Full Code Here

  private void init() {
    container.setStyleName(MsgStyles.css().container());
    container.addStyleName(MsgStyles.getMsgLevelStyle(mlevel));
    initWidget(container);

    final ImageResource img = MsgStyles.getMsgLevelImage(mlevel);
    // NOTE: since this is a clipped image, the width/height should be known
    final FlowPanel fp = new FlowPanel();
    fp.add(new ImageContainer(img));
    String title;
    switch(mlevel) {
View Full Code Here

TOP

Related Classes of com.google.gwt.resources.client.ImageResource

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.