当前位置: 首页>>代码示例>>Java>>正文


Java RepeatStyle类代码示例

本文整理汇总了Java中com.google.gwt.resources.client.ImageResource.RepeatStyle的典型用法代码示例。如果您正苦于以下问题:Java RepeatStyle类的具体用法?Java RepeatStyle怎么用?Java RepeatStyle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RepeatStyle类属于com.google.gwt.resources.client.ImageResource包,在下文中一共展示了RepeatStyle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: render

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Override
public void render(TreeLogger logger, ResourceContext context,
    ClientBundleFields fields, RepeatStyle repeatStyle)
    throws UnableToCompleteException {
  JClassType stringType =
      context.getGeneratorContext().getTypeOracle().findType(String.class.getCanonicalName());

  String contentsExpression = context.deploy(
      localized.getUrl(), null, image.isPreventInlining());
  normalContentsFieldName = fields.define(stringType, "externalImage",
      contentsExpression, true, true);

  if (isRtl) {
    // Create a transformation to mirror about the Y-axis and translate
    AffineTransform tx = new AffineTransform();
    tx.setTransform(-1, 0, 0, 1, rect.getWidth(), 0);
    rect.setTransform(tx);

    byte[] rtlData = ImageBundleBuilder.toPng(logger, rect);
    String rtlContentsUrlExpression = context.deploy(image.getName()
        + "_rtl.png", "image/png", rtlData, image.isPreventInlining());
    rtlContentsFieldName = fields.define(stringType, "externalImage_rtl",
        rtlContentsUrlExpression, true, true);
  }
}
 
开发者ID:kDCYorke,项目名称:RetinaImages,代码行数:26,代码来源:RetinaImageResourceGenerator.java

示例2: createImage

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
/**
 * Interprets <ui:image> elements.
 */
private void createImage(XMLElement elem) throws UnableToCompleteException {
  String name = elem.consumeRequiredRawAttribute(FIELD_ATTRIBUTE);
  // @source is optional on ImageResource
  String source = elem.consumeRawAttribute(SOURCE_ATTRIBUTE, null);

  Boolean flipRtl = elem.consumeBooleanConstantAttribute(FLIP_RTL_ATTRIBUTE);

  RepeatStyle repeatStyle = null;
  if (elem.hasAttribute(REPEAT_STYLE_ATTRIBUTE)) {
    String value = elem.consumeRawAttribute(REPEAT_STYLE_ATTRIBUTE);
    try {
      repeatStyle = RepeatStyle.valueOf(value);
    } catch (IllegalArgumentException e) {
      writer.die(elem, "Bad repeatStyle value %s", value);
    }
  }

  ImplicitImageResource imageMethod = bundleClass.createImageResource(name,
      source, flipRtl, repeatStyle);

  FieldWriter field = fieldManager.registerField(imageResourceType,
      imageMethod.getName());
  field.setInitializer(String.format("%s.%s()",
      fieldManager.convertFieldToGetter(bundleClass.getFieldName()),
      imageMethod.getName()));
}
 
开发者ID:ahome-it,项目名称:ahome-core,代码行数:30,代码来源:UiBinderParser.java

示例3: key

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
private static String key(ImageResourceDeclaration image, boolean isExternal) {
  if (isExternal) {
    return "External: " + image.get();
  }
  if (image.isPreventInlining() || image.getRepeatStyle() == RepeatStyle.Both) {
    return "Unbundled: " + image.get();
  }
  return "Arranged: " + image.getRepeatStyle().toString();
}
 
开发者ID:kDCYorke,项目名称:RetinaImages,代码行数:10,代码来源:RetinaImageResourceGenerator.java

示例4: emptyToolbar

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("images/toolbar_empty.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource emptyToolbar();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:SearchPanelWidget.java

示例5: chromeNorth

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
/** Default background images */
@Source("panel_n.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeNorth();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:5,代码来源:FramedPanel.java

示例6: chromeEast

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("panel_e.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical)
ImageResource chromeEast();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:FramedPanel.java

示例7: chromeSouth

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("panel_s.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeSouth();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:FramedPanel.java

示例8: chromeWest

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("panel_w.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical)
ImageResource chromeWest();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:FramedPanel.java

示例9: chromeNorth

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
/** Thumbnail images */
@Source("thumb-n-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeNorth();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:5,代码来源:ImageThumbnailWidget.java

示例10: chromeEast

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-e-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical, flipRtl = true)
ImageResource chromeEast();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:ImageThumbnailWidget.java

示例11: chromeSouth

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-s-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeSouth();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:ImageThumbnailWidget.java

示例12: chromeWest

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-w-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical, flipRtl = true)
ImageResource chromeWest();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:ImageThumbnailWidget.java

示例13: chromeCenter

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-c-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeCenter();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:ImageThumbnailWidget.java

示例14: metaMid

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("meta_mid.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource metaMid();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:GadgetWidgetUi.java

示例15: chromeNorth

import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("frame/n.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeNorth();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:4,代码来源:FocusFrame.java


注:本文中的com.google.gwt.resources.client.ImageResource.RepeatStyle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。