Examples of replaceText()


Examples of ae.java.awt.peer.TextAreaPeer.replaceText()

     */
    @Deprecated
    public synchronized void replaceText(String str, int start, int end) {
        TextAreaPeer peer = (TextAreaPeer)this.peer;
        if (peer != null) {
            peer.replaceText(str, start, end);
        } else {
            text = text.substring(0, start) + str + text.substring(end);
        }
    }

View Full Code Here

Examples of dk.brics.xmlgraph.TextNode.replaceText()

      right = makePrivate(stm_nodes.getInsertLeftSide(s, g), g);
      break;
    default:
      throw new RuntimeException("unknown insert kind");
    }
    text.replaceText(s.getStringSource(), g);
    right.getContents().addAll(xmlsrc.getRoots());
    right.getContents().add(text.getIndex());

    switch (s.getKind()) {
    case APPEND:
View Full Code Here

Examples of dk.brics.xmlgraph.TextNode.replaceText()

      if (!skip_str) {
        TextNode tn = stm_nodes.getPlugTextNode(s,g);
        ArrayList<Automaton> ss = new ArrayList<Automaton>();
        ss.add(s.getStringSource());
        ss.add(tn.getText());
        tn.replaceText(Automaton.union(ss), g);
      }
      g.merge(xmlsrc);
      if (s.getKind() == PlugStm.Kind.PLUGWRAP) {
        g.getRoots().clear();
        g.getRoots().add(stm_nodes.getPlugWrapTopNode(s, g).getIndex());
View Full Code Here

Examples of dk.brics.xmlgraph.TextNode.replaceText()

    g.merge(xmlsrc);
    g.getRoots().retainAll(base.getRoots());

    final TextNode text = stm_nodes.getSetTextNode(s, g);
    text.replaceText(s.getStringSource(), g);

    // TODO avoid recursive replacement for nodes that will not actually be replaced
    // because its ancestor got replaced instead.
    switch (s.getKind()) {
    case SET:
View Full Code Here

Examples of java.awt.TextArea.replaceText()

    a.replaceText(" There", 5, 5);
    harness.check(a.getText(), "Hello There World");
   
    // Replace in the middle of text.
    harness.check(a.getPeer(), null);
    a.replaceText("", 6, 12);
    harness.check(a.getText(), "Hello World");
   
    // Replace at the end of text.
    harness.check(a.getPeer(), null);
    a.replaceText("!", a.getText().length(), a.getText().length());
View Full Code Here

Examples of java.awt.TextArea.replaceText()

    a.replaceText("", 6, 12);
    harness.check(a.getText(), "Hello World");
   
    // Replace at the end of text.
    harness.check(a.getPeer(), null);
    a.replaceText("!", a.getText().length(), a.getText().length());
    harness.check(a.getText(), "Hello World!");
  }

}
View Full Code Here

Examples of java.awt.peer.TextAreaPeer.replaceText()

     */
    @Deprecated
    public synchronized void replaceText(String str, int start, int end) {
  TextAreaPeer peer = (TextAreaPeer)this.peer;
  if (peer != null) {
      peer.replaceText(str, start, end);
  } else {
      text = text.substring(0, start) + str + text.substring(end);
  }
    }

View Full Code Here

Examples of java.awt.peer.TextAreaPeer.replaceText()

     */
    @Deprecated
    public synchronized void replaceText(String str, int start, int end) {
        TextAreaPeer peer = (TextAreaPeer)this.peer;
        if (peer != null) {
            peer.replaceText(str, start, end);
        } else {
            text = text.substring(0, start) + str + text.substring(end);
        }
    }

View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.Range.replaceText()

    public void testReplaceTextAfter()
    {
        HWPFDocument doc = HWPFTestDataSamples.openSampleFile( "pageref.doc" );
        Bookmark bookmark = doc.getBookmarks().getBookmark( 0 );
        Range range = new Range( bookmark.getStart(), bookmark.getEnd(), doc );
        range.replaceText( "1destin2ation3", true );

        bookmark = doc.getBookmarks().getBookmark( 0 );
        assertEquals( "userref", bookmark.getName() );
        assertEquals( 27, bookmark.getStart() );
        assertEquals( 41, bookmark.getEnd() );
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.Range.replaceText()

    public void testReplaceTextBefore()
    {
        HWPFDocument doc = HWPFTestDataSamples.openSampleFile( "pageref.doc" );
        Bookmark bookmark = doc.getBookmarks().getBookmark( 0 );
        Range range = new Range( bookmark.getStart(), bookmark.getEnd(), doc );
        range.replaceText( "1destin2ation3", false );

        bookmark = doc.getBookmarks().getBookmark( 0 );
        assertEquals( "userref", bookmark.getName() );
        assertEquals( 27, bookmark.getStart() );
        assertEquals( 41, bookmark.getEnd() );
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.