本文整理汇总了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);
}
}
示例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()));
}
示例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();
}
示例4: emptyToolbar
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("images/toolbar_empty.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource emptyToolbar();
示例5: chromeNorth
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
/** Default background images */
@Source("panel_n.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeNorth();
示例6: chromeEast
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("panel_e.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical)
ImageResource chromeEast();
示例7: chromeSouth
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("panel_s.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeSouth();
示例8: chromeWest
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("panel_w.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical)
ImageResource chromeWest();
示例9: chromeNorth
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
/** Thumbnail images */
@Source("thumb-n-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeNorth();
示例10: chromeEast
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-e-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical, flipRtl = true)
ImageResource chromeEast();
示例11: chromeSouth
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-s-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeSouth();
示例12: chromeWest
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-w-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical, flipRtl = true)
ImageResource chromeWest();
示例13: chromeCenter
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("thumb-c-2.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeCenter();
示例14: metaMid
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("meta_mid.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource metaMid();
示例15: chromeNorth
import com.google.gwt.resources.client.ImageResource.RepeatStyle; //导入依赖的package包/类
@Source("frame/n.png")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource chromeNorth();