Examples of Bounds


Examples of net.rim.device.api.math.Bounds

     *
     * @return 0 if the level is still active, -1 if the level has been lost and
     *         1 if the level has been won.
     */
    private int detectCollisions() {
        Bounds boundsLevel;

        final BoundingBox bounds = (BoundingBox) _character.getBounds();
        final BoundingBox prevBounds = (BoundingBox) _character.getPrevBounds();

        // Get the character's corners
View Full Code Here

Examples of org.apache.cassandra.dht.Bounds

    throws IOException, TimeoutException, UnavailableException
    {
        IPartitioner p = StorageService.getPartitioner();

        Token leftToken = index_clause.start_key == null ? p.getMinimumToken() : p.getToken(index_clause.start_key);
        List<AbstractBounds> ranges = getRestrictedRanges(new Bounds(leftToken, p.getMinimumToken()));
        logger.debug("scan ranges are " + StringUtils.join(ranges, ","));

        // now scan until we have enough results
        List<Row> rows = new ArrayList<Row>(index_clause.count);
        for (AbstractBounds range : ranges)
View Full Code Here

Examples of org.apache.helix.controller.stages.MessageSelectionStage.Bounds

                                          "localhost_1",
                                          "TestDB",
                                          "TestDB_0"));

    Map<String, Bounds> stateConstraints = new HashMap<String, Bounds>();
    stateConstraints.put("MASTER", new Bounds(0, 1));
    stateConstraints.put("SLAVE", new Bounds(0, 2));

    Map<String, Integer> stateTransitionPriorities = new HashMap<String, Integer>();
    stateTransitionPriorities.put("MASTER-SLAVE", 0);
    stateTransitionPriorities.put("SLAVE-MASTER", 1);
View Full Code Here

Examples of org.apache.isis.viewer.dnd.drawing.Bounds

            debug.append("\n----------------\n");
        }
    }

    public void draw(final Canvas canvas) {
        Bounds bounds = getBounds();
        canvas.drawRectangle(0, 0, bounds.getWidth(), bounds.getHeight(), Toolkit.getColor(0x0000ff));
        canvas.drawText("Test Workspace", 10, 20, Toolkit.getColor(0x0000ff), Toolkit.getText(ColorsAndFonts.TEXT_TITLE));

        for (int i = 0; i < views.size(); i++) {
            View view = (View) views.elementAt(i);
View Full Code Here

Examples of org.apache.pivot.wtk.Bounds

            super.stateChanged(button, previousState);
            invalidateComponent();
        }

        public Bounds getCloseTriggerBounds() {
            Bounds bounds = null;

            // Include an extra 2 pixels around the trigger for ease of use
            switch (tabOrientation) {
                case HORIZONTAL: {
                    bounds = new Bounds(getWidth() - (CLOSE_TRIGGER_SIZE + buttonPadding.right + 1) - 2,
                        (getHeight() - CLOSE_TRIGGER_SIZE) / 2 - 2,
                        CLOSE_TRIGGER_SIZE + 4, CLOSE_TRIGGER_SIZE + 4);
                    break;
                }

                case VERTICAL: {
                    bounds = new Bounds((getWidth() - CLOSE_TRIGGER_SIZE) / 2 - 2,
                        getHeight() - (CLOSE_TRIGGER_SIZE + buttonPadding.bottom + 1) - 2,
                        CLOSE_TRIGGER_SIZE + 4, CLOSE_TRIGGER_SIZE + 4);
                    break;
                }
View Full Code Here

Examples of org.cipres.treebase.RangeExpression.Bounds

    assertThrowsMalformedRangeException("foo .. bar");
  }
 
  private void assertBoundsOK(String s, Integer low, Integer high) throws RangeExpression.MalformedRangeExpression {
    RangeExpression re = new RangeExpression();
    Bounds b = re.new Bounds(s);
   
    if (low == null) {
      assertFalse(b.hasLow());
    } else {
      assertTrue(b.hasLow());
      assertEquals(low, b.getLow());
    }   
   
    if (high == null) {
      assertFalse(b.hasHigh());
    } else {
      assertTrue(b.hasHigh());
      assertEquals(high, b.getHigh());
    }
  }
View Full Code Here

Examples of org.eclipse.birt.chart.model.attribute.Bounds

      // fill default backgournd as white.
      gc.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
      gc.fillRectangle(buffer.getBounds());

      final Bounds bo = BoundsImpl.create(X_OFFSET, Y_OFFSET, adjustedRe.width - 2 * X_OFFSET, adjustedRe.height - 2 * Y_OFFSET);

      IDeviceRenderer deviceRenderer = null;
      try {
        deviceRenderer = PluginSettings.instance().getDevice("dv.SWT"); //$NON-NLS-1$
        deviceRenderer.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT, gc);
        bo.scale(72d / deviceRenderer.getDisplayServer().getDpiResolution()); // CONVERT
        // TO
        // POINTS

        // GENERATE AND RENDER THE CHART
        final Generator gr = Generator.instance();
View Full Code Here

Examples of org.eclipse.dd.dc.Bounds

                if(!foundAsTopLevel) {
                    for(FlowElement fe : flowElements) {
                        if(fe instanceof SubProcess) {
                            // find the subprocess bounds
                            Bounds subprocessBounds = getBoundsForShape(plane, fe);
                            if(subprocessBounds != null) {
                                updateShapeBoundsInSubprocess(plane, ele, (SubProcess) fe, subprocessBounds.getX(), subprocessBounds.getY());
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Bounds

        View originalView = possibleMatches.getFirst();
        knownViewChildren.remove(originalView); // remove not to copy properties of the same view again and again
        // add command to copy properties
        if (originalView instanceof Node) {
          if (((Node) originalView).getLayoutConstraint() instanceof Bounds) {
            Bounds b = (Bounds) ((Node) originalView)
                .getLayoutConstraint();
            boundsCommand.add(new SetBoundsCommand(boundsCommand
                .getEditingDomain(), boundsCommand.getLabel(),
                descriptor, new Rectangle(b.getX(), b.getY(), b
                    .getWidth(), b.getHeight())));
          } else if (((Node) originalView).getLayoutConstraint() instanceof Location) {
            Location l = (Location) ((Node) originalView)
                .getLayoutConstraint();
            boundsCommand.add(new SetBoundsCommand(boundsCommand
                .getEditingDomain(), boundsCommand.getLabel(),
View Full Code Here

Examples of org.eclipse.sapphire.ui.Bounds

    }
    List<DiagramNodeModel> nodes = this.diagramModel.getNodes();
    for (DiagramNodeModel node : nodes)
    {
      DiagramNodePart nodePart = node.getModelPart();
      Bounds bounds = nodePart.getNodeBounds();
      if (bounds.getX() == -1 || bounds.getY() == -1)
      {
        return true;
      }
    }
       
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.