本文整理汇总了Java中com.google.gwt.user.client.ui.AbstractImagePrototype.create方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractImagePrototype.create方法的具体用法?Java AbstractImagePrototype.create怎么用?Java AbstractImagePrototype.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.AbstractImagePrototype
的用法示例。
在下文中一共展示了AbstractImagePrototype.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImageHtml
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
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);
}
}
示例2: RemoveActionHasCell
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
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());
}
};
}
示例3: addImage
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
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;
}
示例4: getHighLightImage
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
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() );
}
示例5: warning
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public static AbstractImagePrototype warning(int p_zoom)
{
return AbstractImagePrototype.create( BoardIconsRessource.warning( p_zoom ) );
}
示例6: target_control
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public static AbstractImagePrototype target_control(int p_zoom)
{
return AbstractImagePrototype.create( BoardIconsRessource.target_control( p_zoom ) );
}
示例7: pagingOptionsFirstPage
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public AbstractImagePrototype pagingOptionsFirstPage() {
return AbstractImagePrototype.create(TableImages.Creator.getInstance().getFirstPage());
}
示例8: disable_water
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public static AbstractImagePrototype disable_water(int p_zoom)
{
return AbstractImagePrototype.create( BoardIconsRessource.disable_water( p_zoom ) );
}
示例9: pagingOptionsPrevPage
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public AbstractImagePrototype pagingOptionsPrevPage() {
return AbstractImagePrototype.create(TableImages.Creator.getInstance().getPrevPage());
}
示例10: scrollTableFillWidth
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public AbstractImagePrototype scrollTableFillWidth() {
return AbstractImagePrototype.create(TableImages.Creator.getInstance().getTransImage());
}
示例11: deployment3
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public static AbstractImagePrototype deployment3(int p_zoom)
{
return AbstractImagePrototype.create( BoardIconsRessource.deployment3( p_zoom ) );
}
示例12: scrollTableDescending
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public AbstractImagePrototype scrollTableDescending() {
return AbstractImagePrototype.create(TableImages.Creator.getInstance().getSortDesc());
}
示例13: makeImage
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
private static String makeImage(ImageResource resource) {
AbstractImagePrototype prototype = AbstractImagePrototype.create(resource);
return prototype.getHTML();
}
示例14: scrollTableAscending
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public AbstractImagePrototype scrollTableAscending() {
return AbstractImagePrototype.create(TableImages.Creator.getInstance().getSortAsc());
}
示例15: target
import com.google.gwt.user.client.ui.AbstractImagePrototype; //导入方法依赖的package包/类
public static AbstractImagePrototype target(int p_zoom)
{
return AbstractImagePrototype.create( BoardIconsRessource.target( p_zoom ) );
}