本文整理汇总了Java中com.google.gwt.user.client.ui.Image.setPixelSize方法的典型用法代码示例。如果您正苦于以下问题:Java Image.setPixelSize方法的具体用法?Java Image.setPixelSize怎么用?Java Image.setPixelSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Image
的用法示例。
在下文中一共展示了Image.setPixelSize方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: disableIndicators
import com.google.gwt.user.client.ui.Image; //导入方法依赖的package包/类
private void disableIndicators() {
_abortButton.clear();
// Label l= new Label();
// l.setWidth("15px");
// l.setHeight("15px");
// _abortButton.setWidget(l);
IconCreator ic= IconCreator.Creator.getInstance();
Image image= new Image(ic.getBlueDelete10x10());
image.setPixelSize(10,10);
_abortButton.setSize("15px", "15px");
_abortButton.setWidget(image);
_abortButton.setTitle(DELETE_TIP);
_workingIcon.setVisible(false);
}
示例2: onChannelMessage
import com.google.gwt.user.client.ui.Image; //导入方法依赖的package包/类
@Override
public void onChannelMessage(Object p_message)
{
// redraw widget according to new presenceRoom
PresenceRoom newPresenceRoom = (PresenceRoom)p_message;
m_panel.clear();
Set<String> pseudoList = new HashSet<String>();
for( Presence presence : newPresenceRoom )
{
if( !pseudoList.contains( presence.getPseudo() ) )
{
pseudoList.add( presence.getPseudo() );
Panel panel = new HorizontalPanel();
Image image = new Image( presence.getAvatarUrl() );
image.setPixelSize( 32, 32 );
image.setAltText( presence.getPseudo() );
image.setTitle( presence.getPseudo() );
panel.add( image );
panel.add( new Label(presence.getPseudo()) );
m_panel.add( panel );
}
}
}
示例3: makeAbortButton
import com.google.gwt.user.client.ui.Image; //导入方法依赖的package包/类
private FocusPanel makeAbortButton() {
FocusPanel fp= new FocusPanel();
Image image= new Image(GWT.getModuleBaseURL()+ "images/stop.gif");
image.setPixelSize(15,15);
fp.setWidget(image);
fp.addClickHandler(new AbortHandler());
fp.setTitle(ABORT_TIP);
return fp;
}
示例4: scaleImages
import com.google.gwt.user.client.ui.Image; //导入方法依赖的package包/类
private void scaleImages(float oldLevel, float newLevel) {
if (_serverTiles!=null) {
boolean optimizeZoomDown = ((newLevel / _imageZoomLevel) < .5 && _serverTiles.size() > 5);
if (optimizeZoomDown) {
_imageWidget.clear();
_serverTiles= null;
} else {
float scale = newLevel / oldLevel;
Image iw;
for (PlotImages.ImageURL image : _serverTiles) {
ImageTileData tile = _imageStateMap.get(image);
tile._x = (int) (tile._x * scale);
tile._y = (int) (tile._y * scale);
tile._width = (int) (tile._width * scale);
tile._height = (int) (tile._height * scale);
if (image.isCreated()) {
iw = tile.image;
iw.setPixelSize(tile._width, tile._height);
_imageWidget.setWidgetPosition(iw, tile._x, tile._y);
}
}
}
}
recomputeWidgetSize();
_scaled= true;
}
示例5: onChannelMessage
import com.google.gwt.user.client.ui.Image; //导入方法依赖的package包/类
@Override
public void onChannelMessage(Object p_message)
{
// redraw widget according to new presenceRoom
PresenceRoom newPresenceRoom = (PresenceRoom)p_message;
m_panel.clear();
Set<String> pseudoList = new HashSet<String>();
for( Presence presence : newPresenceRoom )
{
if( !pseudoList.contains( presence.getPseudo() ) )
{
pseudoList.add( presence.getPseudo() );
Image image = new Image( presence.getAvatarUrl() );
image.setPixelSize( 32, 32 );
image.setAltText( presence.getPseudo() );
image.setTitle( presence.getPseudo() );
m_panel.add( image );
}
}
if( pseudoList.size() <= 1 )
{
// user is alone: don't display anything
m_panel.clear();
}
else
{
m_panel.add( m_btnChat );
}
}