Package com.google.gdt.eclipse.designer.model.widgets

Examples of com.google.gdt.eclipse.designer.model.widgets.WidgetInfo.shouldSetReasonableSize()


      Rectangle imageBounds = image.getBounds();
      assertThat(imageBounds.width).isEqualTo(100);
      assertThat(imageBounds.height).isGreaterThan(20).isLessThan(50);
    }
    // Button has forced size
    assertTrue(button.shouldSetReasonableSize());
  }

  /**
   * There was problem with too wide <code>Button</code> in "strict" mode.
   * <p>
 
View Full Code Here


      Rectangle imageBounds = image.getBounds();
      assertThat(imageBounds.width).isEqualTo(100);
      assertThat(imageBounds.height).isGreaterThan(20).isLessThan(50);
    }
    // Button has forced size
    assertTrue(button.shouldSetReasonableSize());
  }

  /**
   * Access of live image should not clear main <code>RootPanel</code>, because this makes all
   * widgets detached.
View Full Code Here

      assertNotNull(image);
      assertThat(image.getBounds().width).isEqualTo(100);
      assertThat(image.getBounds().height).isEqualTo(50);
    }
    // MyButton has no live, so no size
    assertFalse(myButton.shouldSetReasonableSize());
    // dispose
    do_projectDispose();
  }

  /**
 
View Full Code Here

      assertNotNull(image);
      assertThat(image.getBounds().width).isEqualTo(100);
      assertThat(image.getBounds().height).isEqualTo(50);
    }
    // MyButton has forced size, so use forced
    assertTrue(myButton.shouldSetReasonableSize());
  }

  /**
   * Test for using <code>liveComponent.forcedSize.use</code> to disable forced size.
   */
 
View Full Code Here

      assertNotNull(image);
      assertThat(image.getBounds().width).isEqualTo(100);
      assertThat(image.getBounds().height).isEqualTo(100);
    }
    // MyComposite has no preferred size, so use forced
    assertTrue(myComposite.shouldSetReasonableSize());
  }

  /**
   * GWT <code>Label</code> should be added with location, in other case it will have width of
   * <code>RootPanel</code>.
 
View Full Code Here

          m_canvas.command_BOUNDS(boundsCanvas, location, size);
        }
      }

      private Dimension getSize(Rectangle widgetModelBounds) {
        boolean setSize = component.shouldSetReasonableSize();
        return setSize || m_resizeOnCreate ? widgetModelBounds.getSize() : null;
      }
    };
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.