Examples of indexOf()


Examples of net.sourceforge.chaperon.model.symbol.SymbolSet.indexOf()

    assertEquals("Test if symbols are equal", a, set.getSymbol(0));
    assertEquals("Test if symbols are equal", B, set.getSymbol(3));
    assertEquals("Test if symbols are equal", C, set.getSymbol(5));

    assertEquals("Test if indices are equal", 0, set.indexOf(a));
    assertEquals("Test if indices are equal", 4, set.indexOf(c));

    SymbolSet set2 = new SymbolSet();

    set2.addSymbol(a);
View Full Code Here

Examples of nextapp.echo2.app.Grid.indexOf()

        });

        controlsColumn.addButton("Insert Cell Before Selected", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    grid.add(createGridCellButton(), grid.indexOf(selectedButton));
                }
            }
        });

        controlsColumn.addButton("Append New Cell", new ActionListener() {
View Full Code Here

Examples of nextapp.echo2.app.list.DefaultListModel.indexOf()

        DefaultListModel listModel = new DefaultListModel(new Object[]{"alpha", "bravo", "charlie"});
        assertEquals(3, listModel.size());
        assertEquals("alpha", listModel.get(0));
        assertEquals("bravo", listModel.get(1));
        assertEquals("charlie", listModel.get(2));
        assertEquals(1, listModel.indexOf("bravo"));
    }
   
    public void testListenerManagement() {
        ListenerTestDefaultListModel listModel = new ListenerTestDefaultListModel();
        TestListDataListener testListener = new TestListDataListener();
View Full Code Here

Examples of no.uib.jsparklines.data.XYDataPoint.indexOf()

            // open protein link in web browser
            if (pdbMatchesJTable.getSelectedColumn() == pdbMatchesJTable.getColumn("PDB").getModelIndex() && evt.getButton() == MouseEvent.BUTTON1
                    && ((String) pdbMatchesJTable.getValueAt(pdbMatchesJTable.getSelectedRow(), pdbMatchesJTable.getSelectedColumn())).lastIndexOf("<html>") != -1) {

                String temp = currentlyDisplayedPdbFile.substring(currentlyDisplayedPdbFile.indexOf("\"") + 1);
                currentlyDisplayedPdbFile = temp.substring(0, temp.indexOf("\""));

                this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
                BareBonesBrowserLaunch.openURL(currentlyDisplayedPdbFile);
                this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
            }
View Full Code Here

Examples of nu.xom.Document.indexOf()

    protected void write(ProcessingInstruction instruction)
      throws IOException {
        String parent = (String) parents.peek();
        if (parent.equals("doc")) {
            Document doc = instruction.getDocument();
            int root = doc.indexOf(instruction);
            writeRaw(parent + ".insertChild(new ProcessingInstruction(\"" + instruction.getTarget()
                + "\", \"" + escapeText(instruction.getValue()) + "\"), " + root + ");");           
        }
        else {
            writeRaw(parent
View Full Code Here

Examples of nu.xom.Element.indexOf()

  public static void markupCharacters(Element e, boolean ieFix) {
    Nodes n = e.query("//text()");
    for(int i=0;i<n.size();i++) {
      String s = n.get(i).getValue();
      Element parent = (Element)n.get(i).getParent();
      int index = parent.indexOf(n.get(i));
      for(int j=0;j<s.length();j++) {
        Element c = new Element("char");
        String cStr = s.substring(j,j+1);
        if(ieFix && cStr.equals(" ")) cStr="\r";
        c.appendChild(cStr);
View Full Code Here

Examples of nu.xom.ParentNode.indexOf()

//            throw new MultipleParentException(
//            "XQuery morpher result sequence must not contain multiple identical nodes");
          }
          boolean isRoot = parent instanceof Document && node instanceof Element;
          if (!isInitialized) {
            if (!(node instanceof Attribute)) position = parent.indexOf(node);
            if (!isRoot) node.detach();
            isInitialized = true;
          }
         
          if (result instanceof Attribute) {
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder.indexOf()

                  " ")).trim());
            selector = selector.substring(0,
                selector.indexOf(" ")).trim();
          } // end if

          if (rule.indexOf(";") != -1) {
            previousToken = rule.substring(rule.indexOf(";"));
            list.add(selector +
              rule.substring(0, rule.indexOf(";")));

            continue;
View Full Code Here

Examples of org.apache.activemq.util.ByteSequence.indexOf()

        byte data[] = new byte[1024*4];
        ByteSequence bs = new ByteSequence(data, 0, reader.read(offset, data));

        int pos = 0;
        while( true ) {
            pos = bs.indexOf(header, pos);
            if( pos >= 0 ) {
                return offset+pos;
            } else {
                // need to load the next data chunck in..
                if( bs.length != data.length ) {
View Full Code Here

Examples of org.apache.batik.gvt.CompositeGraphicsNode.indexOf()

            break;
        case SVGCSSEngine.DISPLAY_INDEX:
            if (!getDisplay(e)) {
                // Remove the subtree.
                CompositeGraphicsNode parent = node.getParent();
                int idx = parent.indexOf(node);
                parent.remove(node);
                disposeTree(e);
            }
            break;
        }
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.