本文整理匯總了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 );
}
}