Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
javax.swing.text.html

Class HTMLEditorKit. InsertHTMLTextAction

  • All Implemented Interfaces:
    ActionListener, Serializable, Cloneable, EventListener, Action
    Enclosing class:
    HTMLEditorKit

    public static class HTMLEditorKit.InsertHTMLTextAction
    extends HTMLEditorKit.HTMLTextAction
    InsertHTMLTextAction can be used to insert an arbitrary string of HTML into an existing HTML document. At least two HTML.Tags need to be supplied. The first Tag, parentTag, identifies the parent in the document to add the elements to. The second tag, addTag, identifies the first tag that should be added to the document as seen in the HTML string. One important thing to remember, is that the parser is going to generate all the appropriate tags, even if they aren't in the HTML string passed in.

    For example, lets say you wanted to create an action to insert a table into the body. The parentTag would be HTML.Tag.BODY, addTag would be HTML.Tag.TABLE, and the string could be something like <table><tr><td></td></tr></table>.

    There is also an option to supply an alternate parentTag and addTag. These will be checked for if there is no parentTag at offset.

    • Field Detail

      • html

        protected String html
        HTML to insert.
      • parentTag

        protected HTML.Tag parentTag
        Tag to check for in the document.
      • addTag

        protected HTML.Tag addTag
        Tag in HTML to start adding tags from.
      • alternateParentTag

        protected HTML.Tag alternateParentTag
        Alternate Tag to check for in the document if parentTag is not found.
      • alternateAddTag

        protected HTML.Tag alternateAddTag
        Alternate tag in HTML to start adding tags from if parentTag is not found and alternateParentTag is found.
    • Method Detail

      • insertHTML

        protected void insertHTML(JEditorPane editor,
                      HTMLDocument doc,
                      int offset,
                      String html,
                      int popDepth,
                      int pushDepth,
                      HTML.Tag addTag)
        A cover for HTMLEditorKit.insertHTML. If an exception it thrown it is wrapped in a RuntimeException and thrown.
      • insertAtBoundary

        protected void insertAtBoundary(JEditorPane editor,
                            HTMLDocument doc,
                            int offset,
                            Element insertElement,
                            String html,
                            HTML.Tag parentTag,
                            HTML.Tag addTag)
        This is invoked when inserting at a boundary. It determines the number of pops, and then the number of pushes that need to be performed, and then invokes insertHTML.
        Since:
        1.3
      • insertAtBoundry

        @Deprecated
        protected void insertAtBoundry(JEditorPane editor,
                                      HTMLDocument doc,
                                      int offset,
                                      Element insertElement,
                                      String html,
                                      HTML.Tag parentTag,
                                      HTML.Tag addTag)
        Deprecated. As of Java 2 platform v1.3, use insertAtBoundary
        This is invoked when inserting at a boundary. It determines the number of pops, and then the number of pushes that need to be performed, and then invokes insertHTML.
      • actionPerformed

        public void actionPerformed(ActionEvent ae)
        Inserts the HTML into the document.
        Parameters:
        ae - the event

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/swing/text/html/HTMLEditorKit.InsertHTMLTextAction.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut