org.w3c.dom .views


1. Get the underlying DOM document from a View

import org.w3c.dom.Document;
import org.w3c.dom.views.AbstractView;

public class GetDocument {
    public static void main(String[] args) {
        // Get the View from an XML document
        AbstractView view = ...;

        // Get the underlying DOM document from the View
        Document document = view.getDocument();
    }
}

2. Create a new View from an existing View

import org.w3c.dom.Document;
import org.w3c.dom.views.AbstractView;
import org.w3c.dom.views.DocumentView;

public class CreateView {
    public static void main(String[] args) {
        // Get the View from an XML document
        AbstractView view = ...;

        // Create a new View from the existing View
        DocumentView newView = DocumentView.createDocumentView(view.getDocument());
    }
}

3. Get the window from a View

4. Get the document URI from a View

5. Get the default locale from a View

6. Set the default locale for a View

7. Get the text content of a View

8. Set the text content of a View

9. Get the scroll position of a View

10. Set the scroll position of a View

11. Get the page scale factor of a View

12. Set the page scale factor of a View

13. Get the page dimensions of a View

14. Get the screen dimensions of a View

15. Get the viewport dimensions of a View

16. Set the viewport dimensions of a View

17. Get the cursor position of a View

18. Set the cursor position of a View

19. Get the selection range of a View

20. Set the selection range of a View

21. Clear the selection of a View

22. Add an event listener to a View

23. Remove an event listener from a View

24. Get the user agent stylesheet of a View

25. Set the user agent stylesheet of a View

26. Reset the zoom level of a View

27. Get the print area of a View