Examples of offsetBy()


Examples of net.sf.rej.util.Range.offsetBy()

    } else if (node instanceof MethodAccessFlagsNode) {
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodAccessFlagsNode mafNode = (MethodAccessFlagsNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.ACCESS_FLAGS);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof MethodNameNode) {
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodNameNode mafNode = (MethodNameNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_NAME);
View Full Code Here

Examples of net.sf.rej.util.Range.offsetBy()

    } else if (node instanceof MethodNameNode) {
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodNameNode mafNode = (MethodNameNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_NAME);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof MethodDescriptorNode) {     
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodDescriptorNode mafNode = (MethodDescriptorNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_DESCRIPTOR);
View Full Code Here

Examples of net.sf.rej.util.Range.offsetBy()

    } else if (node instanceof MethodDescriptorNode) {     
      Range parentRange = getRange((StructureNode)node.getParent());
      MethodDescriptorNode mafNode = (MethodDescriptorNode) node;
      Method method = mafNode.getMethod();
      Range afRange = method.getOffsetMap().get(Method.OffsetTag.METHOD_DESCRIPTOR);
      return afRange.offsetBy(parentRange.getOffset());
    } else if (node instanceof AttributeNode) {
      AttributeNode aNode = (AttributeNode) node;
      AttributesNode an = (AttributesNode) aNode.getParent();
      Range range = getRange(an);
      Map<Object, Range> map = an.getAttributesObject().getOffsetMap(range.getOffset());
View Full Code Here

Examples of org.fxmisc.richtext.TwoDimensional.Position.offsetBy()

    }

    @Test
    public void testNegativeOffsetWithBackwardBias() {
        Position pos = navigator.position(4, 10);
        pos = pos.offsetBy(-10, Backward);
        assertEquals(3, pos.getMajor());
        assertEquals(10, pos.getMinor());
    }

    @Test
View Full Code Here

Examples of org.fxmisc.richtext.TwoDimensional.Position.offsetBy()

    }

    @Test
    public void testNegativeOffsetWithForwardBias() {
        Position pos = navigator.position(4, 10);
        pos = pos.offsetBy(-10, Forward);
        assertEquals(4, pos.getMajor());
        assertEquals(0, pos.getMinor());
    }

    @Test
View Full Code Here

Examples of org.fxmisc.richtext.TwoDimensional.Position.offsetBy()

    }

    @Test
    public void testZeroOffsetWithBackwardBias() {
        Position pos = navigator.position(3, 0);
        pos = pos.offsetBy(0, Backward);
        assertEquals(2, pos.getMajor());
        assertEquals(10, pos.getMinor());

        // additional zero backward offset should have no effect
        assertEquals(pos, pos.offsetBy(0, Backward));
View Full Code Here

Examples of org.fxmisc.richtext.TwoDimensional.Position.offsetBy()

        pos = pos.offsetBy(0, Backward);
        assertEquals(2, pos.getMajor());
        assertEquals(10, pos.getMinor());

        // additional zero backward offset should have no effect
        assertEquals(pos, pos.offsetBy(0, Backward));
    }

    @Test
    public void testZeroOffsetWithForwardBias() {
        Position pos = navigator.position(2, 10);
View Full Code Here

Examples of org.fxmisc.richtext.TwoDimensional.Position.offsetBy()

    }

    @Test
    public void testZeroOffsetWithForwardBias() {
        Position pos = navigator.position(2, 10);
        pos = pos.offsetBy(0, Forward);
        assertEquals(3, pos.getMajor());
        assertEquals(0, pos.getMinor());

        // additional zero forward offset should have no effect
        assertEquals(pos, pos.offsetBy(0, Forward));
View Full Code Here

Examples of org.fxmisc.richtext.TwoDimensional.Position.offsetBy()

        pos = pos.offsetBy(0, Forward);
        assertEquals(3, pos.getMajor());
        assertEquals(0, pos.getMinor());

        // additional zero forward offset should have no effect
        assertEquals(pos, pos.offsetBy(0, Forward));
    }

    @Test
    public void testRightBoundary() {
        Position pos = navigator.offsetToPosition(100, Forward);
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.