Examples of replace()


Examples of javax.swing.text.AbstractDocument.replace()

        assertEquals(originalDocumentBListenerCount+3, documentB.getDocumentListeners().length);
        textMatcher = (TextMatcher) textMatcherEditor.getMatcher();
        assertEquals("documentB", textMatcher.getSearchTerms()[0].getText());

        // changing the text in DocumentB should alter the filter
        documentB.replace(0, documentB.getLength(), "blah", null);
        textMatcher = (TextMatcher) textMatcherEditor.getMatcher();
        assertEquals("blah", textMatcher.getSearchTerms()[0].getText());
    }

    public void guiTestListeners() {
View Full Code Here

Examples of javax.swing.text.AbstractDocument.BranchElement.replace()

    // Modify the element structure a little and seen how the initial
    // elements are created then.
    LeafElement el1 = doc.new LeafElement(el, null, 0, 3);
    LeafElement el2 = doc.new LeafElement(el, null, 3, 7);
    LeafElement el3 = doc.new LeafElement(el, null, 7, 11);
    el.replace(0, 1, new Element[]{el1, el2, el3});


    TestZoneView zv = new TestZoneView(el, View.Y_AXIS);
    // Set the maximum zone size somewhere inside the second element.
    zv.setMaximumZoneSize(5);
View Full Code Here

Examples of javax.swing.text.PlainDocument.replace()

        assertEquals(originalDocumentBListenerCount+3, documentB.getDocumentListeners().length);
        textMatcher = (TextMatcher) textMatcherEditor.getMatcher();
        assertEquals("documentB", textMatcher.getSearchTerms()[0].getText());

        // changing the text in DocumentB should alter the filter
        documentB.replace(0, documentB.getLength(), "blah", null);
        textMatcher = (TextMatcher) textMatcherEditor.getMatcher();
        assertEquals("blah", textMatcher.getSearchTerms()[0].getText());
    }

    public void guiTestListeners() {
View Full Code Here

Examples of jregex.Replacer.replace()

    {
        try {
/*new*/    matcher = null;
/*new*/    Replacer r = getReplacer(newExpr);
/*new*/    String newResult = null;
/*new*/    synchronized (r) { newResult = r.replace(input); }

//*old*/    String oldResult = perl5.substitute(oldExpr, input);
//*cmp*/    if (!newResult.equals(oldResult)) {
//*cmp*/        showError("substitute disagreement!"+
//*cmp*/                           "\n\toldExpr=" + StringUtils.findAndReplace
View Full Code Here

Examples of ket.Edit.replace()

      if (first==null) return;
      for (int i=1; i<branch.size(); i++) {
        e.setCurrent(first);
        e.substitute(branch.getChild(i));
      }
      e.replace(branch, first);
    }
  }

  public void recognizeJoins() {
    for (Branch branch : getBranchVector(true, Function.JOIN)) {
View Full Code Here

Examples of ket.Selection.replace()

    switch (character) {
      case 'i': // TODO: Merge with appendNewSibling().
        ok = current.isBranch() || s.variableTokenToBranch(knownArguments);
        if (!ok) return;
        if (replacement!=null) {
          s.replace(replacement);
        }
        if (relative==RELATIVE_EDIT) {
          s.prependNewChild();
        } else {
          c.selectInOrOutLeft();
View Full Code Here

Examples of l2p.gameserver.serverpackets.NpcHtmlMessage.replace()

      int val = Integer.parseInt(command.substring(10));
      if(val == 9)
      {
        NpcHtmlMessage html = new NpcHtmlMessage(player, this);
        html.setFile("data/html/npc-friend/personal.htm");
        html.replace("%npcname%", getName());
        player.sendPacket(html);
      }
      else
      {
        showRetrieveWindow(player, val);
View Full Code Here

Examples of lineage2.gameserver.model.pledge.SubUnit.replace()

    }
    SubUnit oldUnit = null;
    if (replacement != null)
    {
      oldUnit = replacement.getSubUnit();
      oldUnit.replace(replacement.getObjectId(), subject.getPledgeType());
      clan.broadcastToOnlineMembers(new PledgeShowMemberListUpdate(replacement));
      if (replacement.isOnline())
      {
        replacement.getPlayer().updatePledgeClass();
        replacement.getPlayer().broadcastCharInfo();
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.NpcHtmlMessage.replace()

    int newClassId = AwakingManager.getInstance().childOf(player.getClassId());
    if (command.equalsIgnoreCase("Awaken"))
    {
      int essencesCount = AwakingManager.getInstance().giveGiantEssences(player, true);
      NpcHtmlMessage htmlMessage = new NpcHtmlMessage(getObjectId());
      htmlMessage.replace("%SP%", String.valueOf(Rnd.get(10000000)));
      htmlMessage.replace("%ESSENCES%", String.valueOf(essencesCount));
      String transferData = new String();
      if(_NPC.get(getNpcId()) != newClassId)
      {
        newClassId = _NPC.get(getNpcId());
View Full Code Here

Examples of lipstone.joshua.parser.util.ConsCell.replace()

          length == 1 && ((Character) left == '^' || (Character) left == '/' || (Character) left == '%'))))
        continue;
      if (!(right == null || !(right instanceof Character) && length == 1 || right instanceof Character && ((Character) right == '+' || (Character) right == '-' || isOneTerm && ((Character) right == '*' ||
          (Character) right == '/') || length == 1 && ((Character) right == '^' || (Character) right == '%'))))
        continue;
      current = current.replace((ConsCell) current.getCar());
    } while (!((current = current.getNextConsCell()).isNull())); //This steps current forward while checking for nulls
    return input;
  }
 
  /**
 
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.