Java 类com.google.gwt.user.client.ui.AbstractImagePrototype 实例源码

项目:appinventor-extensions    文件:ComponentHelpWidget.java   
public ComponentHelpWidget(final SimpleComponentDescriptor scd) {
  if (imageResource == null) {
    Images images = Ode.getImageBundle();
    imageResource = images.help();
  }
  AbstractImagePrototype.create(imageResource).applyTo(this);
  addClickListener(new ClickListener() {
      @Override
      public void onClick(Widget sender) {
        final long MINIMUM_MS_BETWEEN_SHOWS = 250;  // .25 seconds

        if (System.currentTimeMillis() - lastClosureTime >=
            MINIMUM_MS_BETWEEN_SHOWS) {
          new ComponentHelpPopup(scd, sender);
        }
      }
    }
    );
}
项目:appinventor-extensions    文件:ComponentRemoveWidget.java   
public ComponentRemoveWidget(SimpleComponentDescriptor simpleComponentDescriptor) {
  if (imageResource == null) {
    Images images = Ode.getImageBundle();
    imageResource = images.deleteComponent();
  }
  this.scd = simpleComponentDescriptor;
  AbstractImagePrototype.create(imageResource).applyTo(this);
  addClickListener(new ClickListener() {

      @Override
      public void onClick(Widget widget) {
        if (Window.confirm(MESSAGES.reallyRemoveComponent())) {
          long projectId = ode.getCurrentYoungAndroidProjectId();
          YaProjectEditor projectEditor = (YaProjectEditor) ode.getEditorManager().getOpenProjectEditor(projectId);
          SimpleComponentDatabase componentDatabase = SimpleComponentDatabase.getInstance();
          componentDatabase.addComponentDatabaseListener(projectEditor);
          componentDatabase.removeComponent(scd.getName());
        }
      }
    });
}
项目:document-management-system    文件:TableImages.java   
@Override
public AbstractImagePrototype scrollTableAscending() {
    return new AbstractImagePrototype() {
        public void applyTo(Image image) {
            image.setUrl("img/sort_asc.gif");
        }

        public Image createImage() {
            return new Image("img/sort_asc.gif");
        }

        public String getHTML() {
            return "<img border=\"0\" src=\"img/sort_asc.gif\"/>";
        }
    };
}
项目:document-management-system    文件:TableImages.java   
@Override
public AbstractImagePrototype scrollTableDescending() {
    return new AbstractImagePrototype() {
        public void applyTo(Image image) {
            image.setUrl("img/sort_desc.gif");
        }

        public Image createImage() {
            return new Image("img/sort_desc.gif");
        }

        public String getHTML() {
            return "<img border=\"0\" src=\"img/sort_desc.gif\"/>";
        }
    };
}
项目:document-management-system    文件:TableImages.java   
@Override
public AbstractImagePrototype scrollTableFillWidth() {
    return new AbstractImagePrototype() {
        public void applyTo(Image image) {
            image.setUrl("img/fill_width.gif");
        }

        public Image createImage() {
            return new Image("img/fill_width.gif");
        }

        public String getHTML() {
            return "<img border=\"0\" src=\"img/fill_width.gif\"/>";
        }
    };
}
项目:ontobrowser    文件:ActionIconCellDecorator.java   
private SafeHtml getImageHtml(ImageResource res, VerticalAlignmentConstant valign) {
    AbstractImagePrototype proto = AbstractImagePrototype.create(res);
    SafeHtml image = SafeHtmlUtils.fromTrustedString(proto.getHTML());

    // Create the wrapper based on the vertical alignment.
    SafeStylesBuilder cssStyles =
            new SafeStylesBuilder().appendTrustedString(direction + ":0px;");
    if (HasVerticalAlignment.ALIGN_TOP == valign) {
        return templates.imageWrapperTop(cssStyles.toSafeStyles(), image);
    } else if (HasVerticalAlignment.ALIGN_BOTTOM == valign) {
        return templates.imageWrapperBottom(cssStyles.toSafeStyles(), image);
    } else {
        int halfHeight = (int) Math.round(res.getHeight() / 2.0);
        cssStyles.appendTrustedString("margin-top:-" + halfHeight + "px;");
        return templates.imageWrapperMiddle(cssStyles.toSafeStyles(), image);
    }
}
项目:fullmetalgalaxy    文件:AnimFire.java   
@Override
protected void onUpdate(double p_progress)
{
  if( m_tokenWidget == null )
  {
    return;
  }
  AbstractImagePrototype newFrame = null;
  if( m_layerToken.getZoom().getValue() == EnuZoom.Medium )
  {
    newFrame = getTacticFrame( p_progress );
  }
  else
  {
    newFrame = getStrategyFrame( p_progress );
  }
  if( newFrame != m_lastFrame )
  {
    m_lastFrame = newFrame;
    m_layerToken.addWarningImage( m_tokenWidget.getTokenImage(), m_lastFrame, m_target,
        m_landPixOffset );
  }
}
项目:appformer    文件:NewFilterPopup.java   
public RemoveActionHasCell(String text,
                           ActionCell.Delegate<DataGridFilterSummary> delegate) {
    cell = new ActionCell<DataGridFilterSummary>(text,
                                                 delegate) {
        @Override
        public void render(Cell.Context context,
                           final DataGridFilterSummary value,
                           SafeHtmlBuilder sb) {
            AbstractImagePrototype imageProto = AbstractImagePrototype.create(images.close());
            SafeHtmlBuilder mysb = new SafeHtmlBuilder();
            mysb.appendHtmlConstant("<span title='" + CommonConstants.INSTANCE.RemoveFilter() + " " + value.getFilterName() + "' style='margin-right:5px;'>");
            mysb.append(imageProto.getSafeHtml());
            mysb.appendHtmlConstant("</span>");
            sb.append(mysb.toSafeHtml());
        }
    };
}
项目:fullmetalgalaxy    文件:WgtBoardLayerLocked.java   
private Image addImage()
{
  AbstractImagePrototype imageprototype = AbstractImagePrototype.create( Icons.s_instance
      .strategy_padlock() );
  if( GameEngine.model().getZoomDisplayed().getValue() == EnuZoom.Medium )
  {
    imageprototype = AbstractImagePrototype.create( Icons.s_instance.tactic_padlock() );
  }
  Image image = null;
  if( !m_unusedImages.isEmpty() )
  {
    image = m_unusedImages.iterator().next();
    imageprototype.applyTo( image );
    image.setVisible( true );
    m_unusedImages.remove( image );
  }
  else
  {
    image = imageprototype.createImage();
    add( image );
    DOM.setStyleAttribute( image.getElement(), "zIndex", "1000" );
    image.addStyleName( "transparent50" );
  }
  m_usedImages.add( image );
  return image;
}
项目:teiid-webui    文件:ImageHelper.java   
/**
* Get the image html string for the provided datasource type
* @param dsType the dataSource type
* @return the image html
*/
  public String getDataSourceForTypeSmallImageHtml(String dsType) {
    String imageHtml = null;

    if(dsType.equals(Constants.DS_TYPE_FILE)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_file_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_ACCUMULO)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_accumulo_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_GOOGLE)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_google_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_H2)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_h2_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_INFINISPAN)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_infinispan_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_LDAP)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_ldap_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_MODESHAPE)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_modeshape_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_MONGODB)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_mongodb_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_SALESFORCE)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_salesforce_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_TEIID)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_teiid_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_TEIID_LOCAL)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_teiid_local_small_Image()).getHTML();
    } else if(dsType.equals(Constants.DS_TYPE_WEBSERVICE)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_webservice_small_Image()).getHTML();
    } else if(dsType.toLowerCase().contains(Constants.MYSQL_FRAGMENT)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_mysql_small_Image()).getHTML();
    } else if(dsType.toLowerCase().contains(Constants.POSTGRES_FRAGMENT)) {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_postgres_small_Image()).getHTML();
    } else {
        imageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().dsType_blankbox_small_Image()).getHTML();
    }

    return imageHtml;
  }
项目:kie-docker-ci    文件:ContainerActionsCell.java   
/**
 * Make icons available as SafeHtml
 *
 * @param resource
 * @return
 */
private static SafeHtml makeImage(ImageResource resource) {
    AbstractImagePrototype proto = AbstractImagePrototype.create(resource);

    // String html = proto.getHTML().replace("style='",
    // "style='left:0px;top:0px;"); // position:absolute;
    //
    // return SafeHtmlUtils.fromTrustedString(html);

    return proto.getSafeHtml();
}
项目:fullmetalgalaxy    文件:WgtBoardLayerAction.java   
private void drawImage(AbstractImagePrototype p_image, AnBoardPosition p_position)
{
  Image image = m_images.getNextImage();
  p_image.applyTo( image );
  DOM.setStyleAttribute( image.getElement(), "zIndex", "1000" );
  image.removeStyleName( "transparent50" );
  setWidgetHexPosition( image, p_position );
}
项目:fullmetalgalaxy    文件:WgtBoardLayerHighlightHex.java   
private AbstractImagePrototype getHighLightImage()
{
  EventsPlayBuilder actionBuilder = GameEngine.model().getActionBuilder();
  if( actionBuilder.getSelectedAction() != null
      && (actionBuilder.getSelectedAction().getType() == GameLogType.EvtLand || actionBuilder
          .getSelectedAction().getType() == GameLogType.EvtDeployment) )
  {
    AnEventPlay action = (AnEventPlay)actionBuilder.getSelectedAction();
    return AbstractImagePrototype.create( TokenImages.getTokenImage(
        action.getToken( GameEngine.model().getGame() ), getZoom().getValue() ) );
  }
  return BoardIcons.hightlight_hexagon( getZoom().getValue() );
}
项目:fullmetalgalaxy    文件:AnimFire.java   
private AbstractImagePrototype getStrategyFrame(double p_progress)
{
  switch( (int)(p_progress * 14) )
  {
  case 0:
    return AnimationFrames.s_instance.strategy_blast01();
  case 1:
    return AnimationFrames.s_instance.strategy_blast02();
  case 2:
    return AnimationFrames.s_instance.strategy_blast03();
  case 3:
    return AnimationFrames.s_instance.strategy_blast04();
  case 4:
    return AnimationFrames.s_instance.strategy_blast05();
  case 5:
    return AnimationFrames.s_instance.strategy_blast06();
  case 6:
    return AnimationFrames.s_instance.strategy_blast07();
  case 7:
    return AnimationFrames.s_instance.strategy_blast08();
  case 8:
    return AnimationFrames.s_instance.strategy_blast09();
  case 9:
    return AnimationFrames.s_instance.strategy_blast10();
  case 10:
    return AnimationFrames.s_instance.strategy_blast11();
  case 11:
    return AnimationFrames.s_instance.strategy_blast12();
  case 12:
    return AnimationFrames.s_instance.strategy_blast13();
  default:
  case 13:
    return AnimationFrames.s_instance.strategy_blast14();
  }
}
项目:fullmetalgalaxy    文件:WgtToolsEditTokens.java   
@Override
public void onClick(ClickEvent p_event)
{
  TokenType token = m_tools.get( p_event.getSource() );
  if( token != null )
  {
    m_wgtBoardEditTokens.setTokenType( token );
  }
  if( p_event.getSource() == m_currentTool )
  {
    m_wgtBoardEditTokens.setSector( m_wgtBoardEditTokens.getSector().getNext() );
  }
  AbstractImagePrototype.create(
      TokenImages.getTokenImage( m_wgtBoardEditTokens.getColor(), EnuZoom.Medium,
          m_wgtBoardEditTokens.getTokenType(), m_wgtBoardEditTokens.getSector() ) ).applyTo(
      m_currentTool );
  m_lblUnit.setText( Messages.getTokenString( 0, m_wgtBoardEditTokens.getTokenType() ) );

  if( p_event.getSource() == m_btnOre )
  {
    if( m_chkOreInSea.getValue() ) {
      GameEngine.generator().s_oreAllowedOnLands.add( LandType.Sea );
    } else {
      GameEngine.generator().s_oreAllowedOnLands.remove( LandType.Sea );
    }
    GameEngine.generator().s_useAllOre = m_chkUseAllOre.getValue();
    GameEngine.generator().s_useOreGenerator = m_chkUseOreGenerator.getValue();

    GameEngine.generator().populateOres();
    m_wgtBoardEditTokens.m_layerToken.cleanToken();
    AppRoot.getEventBus().fireEvent( new ModelUpdateEvent(GameEngine.model()) );
  }
}
项目:fullmetalgalaxy    文件:WgtBoardLayerToken.java   
protected void addWarningImage(Image p_image, AbstractImagePrototype p_absImage, EbToken p_token,
    int p_landPixOffset)
{
  if( p_absImage == null )
  {
    p_image.setVisible( false );
    return;
  }
  if( !p_image.isAttached() || !p_image.isVisible() )
  {
    add( p_image );
    p_image.setVisible( true );
  }
  p_absImage.applyTo( p_image );

  if( p_token.getPosition().getY() < m_cropTopHex )
  {
    DOM.setStyleAttribute( p_image.getElement(), "zIndex",
        Integer.toString( p_token.getZIndex( GameEngine.game().getLandHeight() + 1, true ) ) );
  }
  else
  {
    DOM.setStyleAttribute( p_image.getElement(), "zIndex", Integer.toString( p_token.getZIndex( 1, true ) ) );
  }


  setWidgetHexPosition( p_image, p_token.getPosition(), p_landPixOffset );
}
项目:reladomo    文件:Images.java   
@Resource("image/button/refresh_on.gif")
public AbstractImagePrototype refreshOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/refresh_off.gif")
public AbstractImagePrototype refreshOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/force_gc_on.gif")
public AbstractImagePrototype forceGcOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/force_gc_off.gif")
public AbstractImagePrototype forceGcOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/clear_all_partially_cached_on.gif")
public AbstractImagePrototype clearAllPartiallyCachedOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/clear_all_partially_cached_off.gif")
public AbstractImagePrototype clearAllPartiallyCachedOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/clear_cache_on.gif")
public AbstractImagePrototype clearCacheOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/clear_cache_off.gif")
public AbstractImagePrototype clearCacheOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/reload_cache_on.gif")
public AbstractImagePrototype reloadCacheOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/reload_cache_off.gif")
public AbstractImagePrototype reloadCacheOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/filter_on.gif")
public AbstractImagePrototype filterOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/filter_off.gif")
public AbstractImagePrototype filterOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/sql_is_on_on.gif")
public AbstractImagePrototype sqlIsOnOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/sql_is_on_off.gif")
public AbstractImagePrototype sqlIsOnOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/sql_is_off_on.gif")
public AbstractImagePrototype sqlIsOffOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/sql_is_off_off.gif")
public AbstractImagePrototype sqlIsOffOff();
项目:reladomo    文件:Images.java   
@Resource("image/button/sql_is_max_on_on.gif")
public AbstractImagePrototype sqlIsMaxOnOn();
项目:reladomo    文件:Images.java   
@Resource("image/button/sql_is_max_on_off.gif")
public AbstractImagePrototype sqlIsMaxOnOff();
项目:fullmetalgalaxy    文件:AnimationFrames.java   
@Resource("com/fullmetalgalaxy/client/ressources/icons/board/tactic/blast/blast12.png")
public AbstractImagePrototype tactic_blast12();
项目:fullmetalgalaxy    文件:BoardIcons.java   
public static AbstractImagePrototype target(int p_zoom)
{
  return AbstractImagePrototype.create( BoardIconsRessource.target( p_zoom ) );
}
项目:ephesoft    文件:NavBar.java   
public NavBar(final Table table) {
    super();
    initWidget(BINDER.createAndBindUi(this));
    this.table = table;
    Images images = GWT.create(Images.class);
    DOM.setInnerHTML(newerButton.getElement(), AbstractImagePrototype.create(images.previousPage()).getHTML());
    DOM.setInnerHTML(olderButton.getElement(), AbstractImagePrototype.create(images.nextPage()).getHTML());
    DOM.setInnerHTML(upButton.getElement(), AbstractImagePrototype.create(images.upRecord()).getHTML());
    DOM.setInnerHTML(downButton.getElement(), AbstractImagePrototype.create(images.downRecord()).getHTML());

    //countString = new String();
    newerButton.setTitle(LocaleDictionary.get().getConstantValue(LocaleCommonConstants.TITLE_PREVIOUS));
    olderButton.setTitle(LocaleDictionary.get().getConstantValue(LocaleCommonConstants.TITLE_NEXT));
    upButton.setTitle(LocaleDictionary.get().getConstantValue(LocaleCommonConstants.UP_RECORD));
    downButton.setTitle(LocaleDictionary.get().getConstantValue(LocaleCommonConstants.DOWN_RECORD));

    searchPageTextBox = new TextBox();
    pageNumberValidatableWidget = new ValidatableWidget<TextBox>(searchPageTextBox, true);
    pageNumberValidatableWidget.addValidator(new NumberValidator(searchPageTextBox, false, true));
    searchPageTextBox.setText("1");
    searchPageTextBox.setWidth("30px");
    searchPageTextBox.addKeyPressHandler(new KeyPressHandler() {

        @Override
        public void onKeyPress(KeyPressEvent event) {
            String pageNo = searchPageTextBox.getText();
            char keyCode = event.getCharCode();
            pageNumberValidatableWidget.toggleValidDateBox();
            if (keyCode == KeyCodes.KEY_ENTER && checkTextEntered(pageNo) && pageNumberValidatableWidget.validate()) {
                moveToEnteredPage(pageNo);
            }
        }

    });
    searchPageTextBox.addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> arg0) {
            pageNumberValidatableWidget.toggleValidDateBox();
        }
    });
}
项目:fullmetalgalaxy    文件:AnimationFrames.java   
@Resource("com/fullmetalgalaxy/client/ressources/icons/board/tactic/blast/blast05.png")
public AbstractImagePrototype tactic_blast05();
项目:teiid-webui    文件:DataSourceListWidget.java   
public DataSourceCell( ) {
  this.okImageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().okIcon16x16Image()).getHTML();
  this.yellowBulletImageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().yellowBulletImage()).getHTML();
  this.deployingImageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().spinnner16x16Image()).getHTML();
  this.errorImageHtml = AbstractImagePrototype.create(AppResource.INSTANCE.images().errorIcon16x16Image()).getHTML();
}
项目:fullmetalgalaxy    文件:AnimationFrames.java   
@Resource("com/fullmetalgalaxy/client/ressources/icons/board/tactic/blast/blast09.png")
public AbstractImagePrototype tactic_blast09();