Examples of Rectangle


Examples of org.eclipse.swt.graphics.Rectangle

    //not be any smaller than 50 pixels.
    editor.horizontalAlignment = SWT.LEFT;
    editor.grabHorizontal = true;
    editor.minimumWidth = 50;

    Rectangle r = text.computeTrim(0, 0, 100, text.getLineHeight());
    editor.minimumHeight = r.height;


    // Open the text editor on the selected row.
    editor.setEditor (text, item);
View Full Code Here

Examples of org.eclipse.swt.graphics.Rectangle

    if (c.getChildren().length == 0 && (size.x == 64 || size.y == 64)) {
      Object ld = c.getLayoutData();
      if (ld instanceof FormData) {
        FormData fd = (FormData) ld;
        if (fd.width != 0 && fd.height != 0) {
          Rectangle trim = c.computeTrim (0, 0, fd.width, fd.height);
          return new Point(trim.width, trim.height);
        }
      }
      return new Point(1, 1);
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.Rectangle

    if (c.getChildren().length == 0 && (size.x == 64 || size.y == 64)) {
      Object ld = c.getLayoutData();
      if (ld instanceof FormData) {
        FormData fd = (FormData) ld;
        if (fd.width != 0 && fd.height != 0) {
          Rectangle trim = c.computeTrim (0, 0, fd.width, fd.height);
          return new Point(trim.width, trim.height);
        }
      }
      return new Point(1, 1);
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.Rectangle

    /*
     * Re-adjust scrollbar setting when the window resizes
     */
    scrollable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        Rectangle r = scrollable.getClientArea();
        scrollable.setMinSize(scrollChild.computeSize(r.width, SWT.DEFAULT));
      }
    });

    /*
 
View Full Code Here

Examples of org.eclipse.swt.graphics.Rectangle

   * re-layout the controls and window appropriately
   */
  public void isCollapsed(boolean value) {
    if (null != shell && false == shell.isDisposed()) {
      scrollable.setRedraw(false);
      Rectangle r = scrollable.getClientArea();
      scrollable.setMinSize(scrollChild.computeSize(r.width, SWT.DEFAULT));

      /*
       * Resizing to fit the panel if there is only one
       */
 
View Full Code Here

Examples of org.eclipse.wb.draw2d.geometry.Rectangle

  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void refresh_fetch() throws Exception {
    super.refresh_fetch();
    {
      Rectangle panelBounds = getAbsoluteBounds(getObject());
      Object body = ReflectionUtils.invokeMethod(getObject(), "getBody()");
      Rectangle bodyBounds = getAbsoluteBounds(body);
      setClientAreaInsets(new Insets(bodyBounds.y - panelBounds.y,
          bodyBounds.x - panelBounds.x,
          panelBounds.bottom() - bodyBounds.bottom(),
          panelBounds.right() - bodyBounds.right()));
    }
  }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.paintable.Rectangle

   *            A {@link Rectangle} object.
   * @param context
   *            A MapContext object, responsible for actual drawing.
   */
  public void paint(Paintable paintable, Object group, MapContext context) {
    Rectangle rectangle = (Rectangle) paintable;
    context.getVectorContext().drawRectangle(group, rectangle.getId(), rectangle.getBounds(),
        (ShapeStyle) rectangle.getStyle());
  }
View Full Code Here

Examples of org.gephi.visualization.selection.Rectangle

                eventBridge.mouseClick(objClass, objArray);
            }
        }

        if (vizConfig.isSelectionEnable() && rectangleSelection && !customSelection) {
            Rectangle rectangle = (Rectangle) currentSelectionArea;
            //rectangle.setBlocking(false);
            //Clean opengl picking
            for (ModelClass objClass : selectableClasses) {
                if (objClass.isEnabled() && objClass.isGlSelection()) {
                    for (ModelImpl obj : selectedObjects[objClass.getSelectionId()]) {
                        obj.setAutoSelect(false);
                    }
                }
            }

            //Select with click
            int i = 0;
            boolean someSelection = false;
            for (ModelClass objClass : selectableClasses) {
                markTime2++;
                for (Iterator<ModelImpl> itr = octree.getSelectedObjectIterator(objClass.getClassId()); itr.hasNext();) {
                    ModelImpl obj = itr.next();
                    if (isUnderMouse(obj) && currentSelectionArea.select(obj.getObj())) {
                        if (!obj.isSelected()) {
                            //New selected
                            obj.setSelected(true);
                            /*if (vizEventManager.hasSelectionListeners()) {
                            newSelectedObjects.add(obj);
                            }*/
                            selectedObjects[i].add(obj);
                        }
                        someSelection = true;
                        obj.selectionMark = markTime2;
                    }
                }
                if (!(rectangle.isCtrl() && someSelection)) {
                    for (Iterator<ModelImpl> itr = selectedObjects[i].iterator(); itr.hasNext();) {
                        ModelImpl o = itr.next();
                        if (o.selectionMark != markTime2) {
                            itr.remove();
                            o.setSelected(false);
                        }
                    }
                }

                i++;
            }
            rectangle.setBlocking(someSelection);

            if (vizController.getVizModel().isLightenNonSelectedAuto()) {

                if (vizConfig.isLightenNonSelectedAnimation()) {
                    if (!anySelected && someSelection) {
View Full Code Here

Examples of org.gwt.mosaic.core.client.Rectangle

   *
   * @param x an int array of the horizontal origins
   * @param y an int array of the vertical origins
   */
  private void layoutComponents(LayoutPanel layoutPanel, int[] x, int[] y) {
    Rectangle cellBounds = new Rectangle();
    for (Iterator<Map.Entry<Widget, CellConstraints>> i = constraintMap.entrySet().iterator(); i.hasNext();) {
      Map.Entry<Widget, CellConstraints> entry = i.next();
      Widget component = entry.getKey();
      CellConstraints constraints = entry.getValue();

View Full Code Here

Examples of org.hibernate.search.spatial.impl.Rectangle

*/
public class RectangleTest {
  @Test
  public void boundingBoxTest() {
    Point center = Point.fromDegrees( 45, 4 );
    Rectangle rectangle = Rectangle.fromBoundingCircle( center, 50 );

    Assert.assertEquals( 44.550339, rectangle.getLowerLeft().getLatitude(), 0.000001d );
    Assert.assertEquals( 3.359047, rectangle.getLowerLeft().getLongitude(), 0.000001d );
    Assert.assertEquals( 45.449660, rectangle.getUpperRight().getLatitude(), 0.000001d );
    Assert.assertEquals( 4.640952, rectangle.getUpperRight().getLongitude(), 0.000001d );
  }
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.