Examples of Bounds


Examples of com.cburch.logisim.data.Bounds

public class MemPoker extends InstancePoker {
  private MemPoker sub;

  @Override
  public boolean init(InstanceState state, MouseEvent event) {
    Bounds bds = state.getInstance().getBounds();
    MemState data = (MemState) state.getData();
    long addr = data.getAddressAt(event.getX() - bds.getX(),
        event.getY() - bds.getY());

    // See if outside box
    if (addr < 0) {
      sub = new AddrPoker();
    } else {
View Full Code Here

Examples of com.eclipsesource.tabris.passepartout.Bounds

    new InstructionExtractor( null );
  }

  @Test
  public void testPicksComplientRule() {
    InstructionExtractor extractor = new InstructionExtractor( createEnvironment( new Bounds( 0, 0, 100, 100 ) ) );
    Instruction instruction = PassePartout.columns( 5 );
    Rule rule = PassePartout.when( PassePartout.minWidth( PassePartout.px( 90 ) ) ).then( instruction );
    List<Rule> rules = new ArrayList<Rule>();
    rules.add( rule );
View Full Code Here

Examples of com.linkedin.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 com.peterhi.ui.obsolete.Bounds

        boundsAnimator.cancel();
        boundsAnimator = null;
      }

      Rectangle now = bounds.getNow();
      final Bounds from = Bounds.fromRectangle(now);
      final Bounds to = Bounds.fromXYWidthHeight(x, y, width, height);
     
      TimingTarget timingTarget = new TimingTargetAdapter() {

        @Override
        public void timingEvent(Animator source, double fraction) {
          int left = (int )Math.round(from.getLeft() + (to.getLeft() - from.getLeft()) * fraction);
          int right = (int )Math.round(from.getRight() + (to.getRight() - from.getRight()) * fraction);
          int top = (int )Math.round(from.getTop() + (to.getTop() - from.getTop()) * fraction);
          int bottom = (int )Math.round(from.getBottom() + (to.getBottom() - from.getBottom()) * fraction);
          updateBounds(Bounds.fromLeftTopRightBottom(left, top, right, bottom).toRectangle());
        }
       
        @Override
        public void end(Animator source) {
          updateBounds(to.toRectangle());
          boundsAnimator = null;
        }

      };
     
View Full Code Here

Examples of com.xith3d.scenegraph.Bounds

  protected float getSceneSize() {
    boolean autocompute = scene.getBranchgroup().getBoundsAutoCompute();
    scene.getBranchgroup().setBoundsAutoCompute(true);
    scene.getBranchgroup().updateBounds(true);
    scene.getBranchgroup().setBoundsAutoCompute(autocompute);
    Bounds bounds = scene.getBranchgroup().getBounds();
    // Should be the case for xith3d
    if (bounds instanceof Sphere) {
      return ((Sphere)bounds).getRadius();
    }
    // else, include this bounds object in a bounding sphere and get radius
View Full Code Here

Examples of edu.caltech.csn.geocell.Bounds

    }
  }

  private static boolean containsCenterLongitude(final LatLngBounds boxBounds,
      final GwtGeocell northWest) {
    final Bounds bounds = northWest.getBounds();
    final Point centerTop = new Point(boxBounds.getNorthEast().getLatitude(),
        bounds.getCenter().getLongitude());
    return bounds.contains(centerTop);
  }
View Full Code Here

Examples of javafx.geometry.Bounds

      textView.setCacheHint(CacheHint.SPEED);
      textView.widthProperty().addListener(new ChangeListener<Number>() {
      @Override
      public void changed(ObservableValue<? extends Number> observable,
          Number oldValue, Number newValue) {
        final Bounds textViewBounds = textView.getBoundsInLocal();
        mainRec.setX(textViewBounds.getMinX());
        mainRec.setWidth(textViewBounds.getWidth());
        middleRec.setWidth(mainRec.getWidth() / 2);
      }
    });
      textView.heightProperty().addListener(new ChangeListener<Number>() {
      @Override
      public void changed(ObservableValue<? extends Number> observable,
          Number oldValue, Number newValue) {
        final Bounds textViewBounds = textView.getBoundsInLocal();
        mainRec.setY(textViewBounds.getMinY());
        mainRec.setHeight(textViewBounds.getHeight());
        middleRec.setHeight(mainRec.getHeight());
      }
    });
     
        final Label onLabel = new Label();
View Full Code Here

Examples of javax.media.j3d.Bounds

     *
     * @return &lt;=0 if not supported, or the max distance from the origin for
     *         any point in the scene otherwise
     */
    protected float getSceneSize() {
        Bounds res=null;
        Enumeration<?> e=_viewingPlatform.getLocale().getAllBranchGraphs();
        while(e.hasMoreElements()){
            BranchGroup bg=(BranchGroup)e.nextElement();
            Bounds b=bg.getBounds();
            if(res==null){
                res=b;
            }
            else{
                res.combine(b);
View Full Code Here

Examples of kodkod.instance.Bounds

     */
    private Solution trivialSolution(TrivialFormulaException tfe) {
      final Statistics stats = new Statistics(0, 0, 0, translTime, 0);
      if (tfe.value().booleanValue()) {
        trivial++;
        final Bounds translBounds = tfe.bounds();
        final Instance trivialInstance = padInstance(toInstance(translBounds), bounds);
        final Solution sol = Solution.triviallySatisfiable(stats, trivialInstance);
       
        final List<Formula> changes = new LinkedList<Formula>();
               
        for(Map.Entry<Relation, TupleSet> entry: trivialInstance.relationTuples().entrySet()) {
          final Relation r = entry.getKey();
         
          if (!translBounds.relations().contains(r)) {
            translBounds.bound(r, bounds.lowerBound(r), bounds.upperBound(r));
          }
         
          if (translBounds.lowerBound(r)!=translBounds.upperBound(r)) { // r may change
            if (entry.getValue().isEmpty()) {
              changes.add(r.some());
            } else {
              final Relation rmodel = Relation.nary(r.name()+"_"+trivial, r.arity());
              translBounds.boundExactly(rmodel, entry.getValue())
              changes.add(r.eq(rmodel).not());
            }
          }
        }
       
View Full Code Here

Examples of net.bytten.metazelda.Bounds

        }
       
    }
   
    protected double getScale(Dimension dim, IDungeon dungeon) {
        Bounds bounds = dungeon.getExtentBounds();
        return Math.min(((double)dim.width) / bounds.width(),
                ((double)dim.height) / bounds.height());
    }
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.