Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Image$UnclippedState


   * set background
   */
  @Override
  public void setBackground(ArrayList<String> playerIds) {
    // set the background image
    Image pokertable = gameimages.getPokerTable();
    int picWidth = pokertable.getWidth();
    int picHeight = pokertable.getHeight();
    int numPlayer = playerIds.size();
    backgroundArea.setPixelSize(picWidth, picHeight);
    backgroundArea.add(pokertable);
    // set chip images
    int chipWidth = 60;
    int chipHeight = 60;

    chip10.setPixelSize(chipWidth, chipHeight);
    backgroundArea.add(chip10);
    backgroundArea.setWidgetPosition(chip10, 300, 450);

    chip20.setPixelSize(chipWidth, chipHeight);
    backgroundArea.add(chip20);
    backgroundArea.setWidgetPosition(chip20, 400, 450);

    chip50.setPixelSize(chipWidth, chipHeight);
    backgroundArea.add(chip50);
    backgroundArea.setWidgetPosition(chip50, 500, 450);

    chip100.setPixelSize(chipWidth, chipHeight);
    backgroundArea.add(chip100);
    backgroundArea.setWidgetPosition(chip100, 600, 450);

    PairsPlus = new Image(chipImages.PairsPlus());
    PairsPlus.setPixelSize(chipWidth + 40, chipHeight + 40);
    backgroundArea.add(PairsPlus);
    backgroundArea.setWidgetPosition(PairsPlus, 380, 300);

    Ante = new Image(chipImages.Ante());
    Ante.setPixelSize(chipWidth + 40, chipHeight + 40);
    backgroundArea.add(Ante);
    backgroundArea.setWidgetPosition(Ante, 500, 300);

    // set dealer's place
    int dealerNameTop = (int) (pokertable.getHeight() * 0.22);
    int dealerCardTop = dealerNameTop + NAME_HEIGHT;

    namePlaces.add(new Label(messages.setDealer()));
    cardPlaces.add(new FlowPanel());
    int left = (int) (0.5 * picWidth - 0.5 * CARD_WIDTH);
 
View Full Code Here


    placeAnimationImages(cardPlaces.get(i), playerCardImages);
  }

  private void placeImages(FlowPanel panel, List<Image> images) {
    panel.clear();
    Image last = images.isEmpty() ? null : images.get(images.size() - 1);
    for (Image image : images) {
      if (image != last) {
        // crop the image
        image.setPixelSize(20, 100);
      } else {
View Full Code Here

    * @param panel
    * @param images
    */
  private void placeInitiateImages(FlowPanel panel, List<Image> images) {
    panel.clear();
    Image last = images.isEmpty() ? null : images.get(images.size() - 1);
    for (Image image : images) {
      if (image != last) {
        // crop the image
        animation = new CardMovingAnimation(panel, image, image, 20,
            100);
View Full Code Here

    }
  }

  private void placeAnimationImages(FlowPanel panel, List<Image> images) {
    panel.clear();
    Image last = images.isEmpty() ? null : images.get(images.size() - 1);
    for (Image image : images) {
      if (image != last) {
        image.setPixelSize(40, 100);
        animation = new CardMovingAnimation(panel, image, image, 40,
            100);
View Full Code Here

  }

  private List<Image> createCardBackImages(List<Card> cards) {
    List<Image> res = new ArrayList<Image>();
    for (Card card : cards) {
      res.add(new Image(cardimages.getBackOfCardImage()));
    }
    return res;
  }
View Full Code Here

  }

  private List<Image> createCardImages(List<Card> cards) {
    List<Image> res = new ArrayList<Image>();
    for (Card card : cards) {
      res.add(new Image(cardimages.getCardImage(card)));
    }
    return res;
  }
View Full Code Here

          throws VetoDragException {
        if(context.mouseX<=480&&context.mouseX>=380&&context.mouseY<=400&&context.mouseY>=300)
        {
          if(context.draggable==chip10){
            chipPairsPlus=10;
            Image chip=new Image(chipImages.chip10());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 400,320);
          }
          else if(context.draggable==chip20){
            chipPairsPlus=20;
            Image chip=new Image(chipImages.chip20());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 400,320);
          }
          else if(context.draggable==chip50){
            chipPairsPlus=50;
            Image chip=new Image(chipImages.chip50());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 400,320);
          }
          else if(context.draggable==chip100){
            chipPairsPlus=100;
            Image chip=new Image(chipImages.chip100());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 400,320);
          }
       
          PairsPlusBtn.setEnabled(true);
          if(chipAnte!=0){
             PairsPlusAnteBtn.setEnabled(true);
             PairsPlusBtn.setEnabled(false);
             AnteBtn.setEnabled(false);         
          }         
         
        }
       
        if(context.mouseX<=600&&context.mouseX>=500&&context.mouseY<=400&&context.mouseY>=300)
        {
          if(context.draggable==chip10){
            chipAnte=10;
            Image chip=new Image(chipImages.chip10());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 520,320);
          }
          else if(context.draggable==chip20){
            chipAnte=20;
            Image chip=new Image(chipImages.chip20());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 520,320);
          }
          else if(context.draggable==chip50){
            chipAnte=50;
            Image chip=new Image(chipImages.chip50());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 520,320);
          }
          else if(context.draggable==chip100){
            chipAnte=100;
            Image chip=new Image(chipImages.chip100());
            chip.setPixelSize(60, 60);
            backgroundArea.add(chip);
            backgroundArea.setWidgetPosition(chip, 520, 320);
          }
         
          AnteBtn.setEnabled(true);
View Full Code Here

              new HTML("Mean: " + mean + " stddev: " + stddev));
          benchTable.setWidget(trialNum + 2, 0, new HTML("Estimated FPS"));

          benchTable.setWidget(trialNum + 2, 1,
              new HTML((double) lim / (mean / 1000) + " frames per second"));
          Image report = new Image(
              "http://api.timepedia.org/sense.gif?rev="
                  + About.getRevision() + "&mean=" + mean + "&stddev="
                  + stddev);
          RootPanel.get().add(report);
         
View Full Code Here

  private InfoWindowContent displayInfoWindowMaxWidget() {
    final InfoWindowContent content = new InfoWindowContent(
        "There's more to see (hit the maximize button)");
    content.setMaxTitle(new HTML("<i>Maximized Italic Boots</i>"));
    VerticalPanel panel = new VerticalPanel();
    panel.add(new Image("boot.jpg"));
    Button b = new Button("Click for Message");
    final Label l = new Label();
    HorizontalPanel hp = new HorizontalPanel();
    hp.add(b);
    hp.add(l);
View Full Code Here

    lb.addItem(strings.xxlarge());
    return lb;
  }

  private PushButton createPushButton(ImageResource img, String tip) {
    PushButton pb = new PushButton(new Image(img));
    pb.addClickHandler(handler);
    pb.setTitle(tip);
    return pb;
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.Image$UnclippedState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.