Example usage for javax.swing.text JTextComponent getUI

List of usage examples for javax.swing.text JTextComponent getUI

Introduction

In this page you can find the example usage for javax.swing.text JTextComponent getUI.

Prototype

public TextUI getUI() 

Source Link

Document

Fetches the user-interface factory for this text-oriented editor.

Usage

From source file:Main.java

public static void main(String[] argv) {
    JTextComponent textComp = new JTextPane();
    View v = textComp.getUI().getRootView(textComp);
    walkView(v, 0);//from  w ww  . j  a v a  2  s .c om
}

From source file:TextFieldViews.java

public static void displayViews(JTextComponent comp, PrintStream out) {
    View rootView = comp.getUI().getRootView(comp);
    displayView(rootView, 0, comp.getDocument(), out);
}

From source file:TextComponentDisplay.java

public static void displayViews(JTextComponent comp, PrintStream out) {
    TextUI textUI = (TextUI) comp.getUI();
    View rootView = textUI.getRootView(comp);

    displayView(rootView, 0, out);//from  w ww.ja v a 2 s.  c  o  m
}