Examples of Cursor


Examples of org.apache.jackrabbit.oak.plugins.index.Cursor

            // print(mk, tree);
        }
        // indexer.commitChanges();
        for (int i = 0; i < len; i++) {
            // log("#test " + i);
            Cursor c = tree.findFirst("" + i);
            if (c.hasNext()) {
                Assert.assertEquals("" + i, c.next());
            }
        }
        print(mk, tree);
        for (int i = 0; i < len; i++) {
            Assert.assertTrue("not found when removing " + i, tree.remove("" + i, null));
            // print(mk, tree);
        }
        // indexer.commitChanges();
        print(mk, tree);
        for (int i = 0; i < len; i++) {
            Cursor c = tree.findFirst("" + i);
            Assert.assertFalse(c.hasNext());
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.Cursor

        filter.restrictPath("/", Filter.PathRestriction.EXACT);
        filter.restrictProperty(
                "foo",
                Operator.EQUAL,
                MemoryValueFactory.INSTANCE.createValue("bar"));
        Cursor cursor = index.query(filter, null);
        assertTrue(cursor.next());
        assertEquals("/", cursor.currentPath());
        assertFalse(cursor.next());
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Cursor

            }
        }
        if (paths == null) {
            throw new IllegalStateException("Property index is used even when no index is available for filter " + filter);
        }
        Cursor c = Cursors.newPathCursor(paths);
        if (depth > 1) {
            c = Cursors.newAncestorCursor(c, depth - 1);
        }
        return c;
    }
View Full Code Here

Examples of org.apache.mina.util.byteaccess.ByteArray.Cursor

    public void testBufferByteArray() throws Exception {
        ByteArray ba = getByteArrayFactory().create(1000);
        testAbsoluteReaderAndWriter(0, 1000, ba, ba);
        testAbsoluteReaderAndWriter(0, 1000, ba, ba);
        Cursor readCursor = ba.cursor();
        Cursor writeCursor = ba.cursor();
        testRelativeReaderAndWriter(1000, readCursor, writeCursor);
    }
View Full Code Here

Examples of org.apache.pivot.wtk.Cursor

                }

                sheet.setPreferredSize(preferredWidth, preferredHeight);
            }
        } else {
            Cursor cursor = null;
            Bounds resizeHandleBounds = resizeHandle.getBounds();

            if (resizable && resizeHandleBounds.contains(x, y)) {
                boolean preferredWidthSet = component.isPreferredWidthSet();
                boolean preferredHeightSet = component.isPreferredHeightSet();
View Full Code Here

Examples of org.eclipse.persistence.queries.Cursor

        Closeable closeable = null;
        if (query instanceof JpaQuery) {
            JpaQuery<T> elQuery = (JpaQuery<T>) query;
            elQuery.setHint(QueryHints.RESULT_SET_TYPE, ResultSetType.ForwardOnly);
            elQuery.setHint(QueryHints.SCROLLABLE_CURSOR, true);
            final Cursor cursor = elQuery.getResultCursor();
            closeable = new Closeable() {
                @Override
                public void close() throws IOException {
                    cursor.close();
                }
            };
            iterator = cursor;
        } else {
            iterator = query.getResultList().iterator();
View Full Code Here

Examples of org.eclipse.swt.graphics.Cursor

        }
      }
    });

    final Cursor handCursor = new Cursor(comp.getDisplay(), SWT.CURSOR_HAND);
    styled_text.addListener(SWT.MouseMove, new Listener() {
      Cursor curCursor = null;

      public void handleEvent(Event event) {
        if (links.size() == 0) {
          return;
        }
        boolean onLink = false;
        try {
          int ofs = styled_text.getOffsetAtLocation(new Point(event.x, event.y));
          for (int i = 0; i < links.size(); i++) {
            linkInfo linkInfo = (linkInfo)links.get(i);
            if (ofs >= linkInfo.ofsStart && ofs <= linkInfo.ofsEnd) {
              onLink = true;
              break;
            }
          }
        } catch (Exception e) {

        }

        try {
          Cursor cursor = onLink ? handCursor : null;
          if (curCursor != cursor) {
            styled_text.setCursor(cursor);
            curCursor = cursor;
          }
        } catch (Exception e) {
View Full Code Here

Examples of org.eclipse.swt.graphics.Cursor

      SWTSkinObject soParent = (SWTSkinObject) parent.getData("SkinObject");

      String skinRef = getSkinRef();
      if (skinRef != null) {
        Shell shell = parent.getShell();
        Cursor cursor = shell.getCursor();
        try {
          shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));

//          SWTSkinObjectContainer soContents = (SWTSkinObjectContainer) skin.createSkinObject(
//              "MdiContents." + uniqueNumber++, "mdi.content.item",
View Full Code Here

Examples of org.eclipse.swt.graphics.Cursor

  private void setActiveTab(final SWTSkinObjectTab newTab, final boolean evenIfSame) {
    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        Shell shell = skin.getShell();
        Cursor cursor = shell.getCursor();
        try {
          shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
          swtSetActiveTab(newTab, evenIfSame);
        } finally {
          shell.setCursor(cursor);
View Full Code Here

Examples of org.eclipse.swt.graphics.Cursor

    }       
       
    label = new Label(rootPanel,SWT.NULL);
    label.setText(MessageText.getString("ipCheckerWizard.service.url"));

    Cursor handCursor = new Cursor(rootPanel.getDisplay(), SWT.CURSOR_HAND);
   
    this.serviceUrl = new Label(rootPanel,SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    serviceUrl.setLayoutData(gridData);
    serviceUrl.setForeground(Colors.blue);
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.