當前位置: 首頁>>代碼示例>>Java>>正文


Java Image.setPixelSize方法代碼示例

本文整理匯總了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);
    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:19,代碼來源:DownloadGroupPanel.java

示例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 );
    }
  }
}
 
開發者ID:kroc702,項目名稱:fullmetalgalaxy,代碼行數:24,代碼來源:MAppPresences.java

示例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;

}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:11,代碼來源:DownloadGroupPanel.java

示例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;
    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:33,代碼來源:TileDrawer.java

示例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 );
  }
}
 
開發者ID:kroc702,項目名稱:fullmetalgalaxy,代碼行數:30,代碼來源:MAppLittlePresences.java


注:本文中的com.google.gwt.user.client.ui.Image.setPixelSize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。