Examples of Offset


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

    public void markDamaged(final Bounds bounds) {
        /*
         * TODO this only works for the main content area, not for the headers.
         * how do we figure out which area to adjust for?
         */
        final Offset offset = offset();
        bounds.translate(-offset.getDeltaX(), -offset.getDeltaY());
        bounds.translate(left, top);
        super.markDamaged(bounds);
    }
View Full Code Here

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

        final Bounds contents = viewportArea();
        final int width = contents.getWidth();
        final int x = width == 0 ? 0 : horizontalScrollBar.getPosition() * wrappedView.getRequiredSize(Size.createMax()).getWidth() / width;
        final int height = contents.getHeight();
        final int y = height == 0 ? 0 : verticalScrollBar.getPosition() * wrappedView.getRequiredSize(Size.createMax()).getHeight() / height;
        return new Offset(x, y);
    }
View Full Code Here

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

    @Override
    public DragEvent dragStart(final DragStart drag) {
        if (drag.getLocation().getX() > getSize().getWidth() - right) {
            final View dragOverlay = new DragViewOutline(getView());
            return new ViewDragImpl(this, new Offset(drag.getLocation()), dragOverlay);
        } else if (overBorder(drag.getLocation())) {
            return Toolkit.getViewFactory().createDragContentOutline(this, drag.getLocation());
        } else {
            return super.dragStart(drag);
        }
View Full Code Here

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

    @Override
    public DragEvent dragStart(final DragStart drag) {
        if (overBorder(drag.getLocation())) {
            final Location location = drag.getLocation();
            final View dragOverlay = Toolkit.getViewFactory().createDragViewOutline(getView());
            return new ViewDragImpl(this, new Offset(location.getX(), location.getY()), dragOverlay);
        } else {
            return super.dragStart(drag);
        }
    }
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.Offset

        retval[74] = new Now();

        retval[76] = new Rows();
        retval[77] = new Columns();
        retval[82] = TextFunction.SEARCH;
        retval[ID.OFFSET] = new Offset();
        retval[82] = TextFunction.SEARCH;

        retval[97] = NumericFunction.ATAN2;
        retval[98] = NumericFunction.ASIN;
        retval[99] = NumericFunction.ACOS;
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.GSS.Offset

    // build graph for test case
    Goal g1 = createGoal(gss, 1);
    Principle p1 =createPrinciple(gss, 1);
    Pattern si1 = createPattern(gss, 1);

    Offset offset = GSSFactory.eINSTANCE.createOffset();
    offset.setSource(si1);
    offset.setTarget(g1);
    offset.setValue(null);

    createImpact(gss, si1, p1, 20);
    createImpact(gss, p1, g1, 20)
   
    gss.getRelations().add(offset);
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.GSS.Offset

   *            the weight of the offset
   * @return the created Offset relation
   */
  protected Offset createOffset(GSS gss, Element source, Element target,
      float value) {
    Offset offset = GSSFactory.eINSTANCE.createOffset();
    offset.setSource(source);
    offset.setTarget(target);
    offset.setValue(String.valueOf(value));
    gss.getRelations().add(offset);
    return offset;
  }
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

                    .debugStackTrace();
        }

        final int align = ObjectLayout.OBJECT_ALIGN;
        final Word headerSize = Word.fromIntZeroExtend(this.headerSize);
        final Offset tibOffset = Offset.fromIntSignExtend(this.tibOffset);
        final Offset flagsOffset = Offset.fromIntSignExtend(this.flagsOffset);
        int allocator = BasePlan.ALLOC_DEFAULT;

        final int refSize = VmUtils.getVm().getArch().getReferenceSize();
        allocator = checkAllocator(size, align, allocator);
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

        }
        if (align <= 0) {
            throw new IllegalArgumentException("Align must be >= 1");
        }

        Offset offset = Offset.zero();
        final Word alignMask = Word.fromIntZeroExtend(align - 1);
        while (true) {
            final Address addr = this.start.add(offset);
            final MemoryResourceImpl child = new MemoryResourceImpl(this, getOwner(), addr, size);
            final MemoryResourceImpl existingChild = (MemoryResourceImpl) get(this.children, child);
            if (existingChild == null) {
                // We found a free region
                this.children = (MemoryResourceImpl) add(this.children, child);
                return child;
            }
            // We found an existing child, skip over that.
            offset = existingChild.getOffset().add(existingChild.getSize());

            // Align the new offset
            if (!offset.toWord().and(alignMask).isZero()) {
                offset = offset.toWord().add(alignMask).and(alignMask.not()).toOffset();
            }

            // Do we have space left?
            if (offset.toWord().add(size).GT(this.size.toWord())) {
                throw new ResourceNotFreeException();
            }
        }
    }
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

            throw new IndexOutOfBoundsException("length < 0");
        }

        final int slotSize = VmProcessor.current().getArchitecture()
            .getReferenceSize();
        final Offset lengthOffset = Offset
            .fromIntSignExtend(VmArray.LENGTH_OFFSET * slotSize);
        final int dataOffset = VmArray.DATA_OFFSET * slotSize;

        final Address srcAddr = ObjectReference.fromObject(src).toAddress();
        final Address dstAddr = ObjectReference.fromObject(dst).toAddress();
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.