Package org.apache.harmony.awt.text

Examples of org.apache.harmony.awt.text.TextFactory


     * Creates and initializes root view associated with this
     * TextComponent, document, text kit.
     * @return this component's root view
     */
    private RootViewContext createRootViewContext() {
        TextFactory factory = TextFactory.getTextFactory();
        RootViewContext c = factory.createRootView(null);
        c.setComponent(this);
        c.setDocument(document);
        c.setViewFactoryGetter((TextKitImpl) getTextKit());
        return c;
    }
View Full Code Here


    /**
     * Creates default plain view
     */
    View createView() {
        TextFactory factory = TextFactory.getTextFactory();
        View v = factory.createPlainView(document.getDefaultRootElement());
        return v;
    }
View Full Code Here

    /**    
     * @return new text caret associated with this TextComponent
     */
    TextCaret createCaret() {
        TextFactory factory = TextFactory.getTextFactory();
        TextCaret c = factory.createCaret();
        c.setComponent(this);
        return c;
    }
View Full Code Here

     * Creates password view instead of default plain view.
     * Necessary to be able to set echo character.
     */
    @Override
    View createView() {
        TextFactory factory = TextFactory.getTextFactory();
        View v = factory.createPasswordView(document.getDefaultRootElement());
        return v;
    }
View Full Code Here

     * Replaces default plain view with wrapped plain view
     * to get word-wrapping behavior of TextArea without
     * horizontal scrollbar
     */
    private void replaceView() {
        TextFactory factory = TextFactory.getTextFactory();
        View view = factory.createWrappedPlainView(document.getDefaultRootElement());
        rootViewContext.getView().replace(0, 1, new View[] { view });
    }
View Full Code Here

     * Creates and initializes root view associated with this
     * TextComponent, document, text kit.
     * @return this component's root view
     */
    private RootViewContext createRootViewContext() {
        TextFactory factory = TextFactory.getTextFactory();
        RootViewContext c = factory.createRootView(null);
        c.setComponent(this);
        c.setDocument(document);
        c.setViewFactoryGetter((TextKitImpl) getTextKit());
        return c;
    }
View Full Code Here

    /**
     * Creates default plain view
     */
    View createView() {
        TextFactory factory = TextFactory.getTextFactory();
        View v = factory.createPlainView(document.getDefaultRootElement());
        return v;
    }
View Full Code Here

    /**    
     * @return new text caret associated with this TextComponent
     */
    TextCaret createCaret() {
        TextFactory factory = TextFactory.getTextFactory();
        TextCaret c = factory.createCaret();
        c.setComponent(this);
        return c;
    }
View Full Code Here

     * Replaces default plain view with wrapped plain view
     * to get word-wrapping behavior of TextArea without
     * horizontal scrollbar
     */
    private void replaceView() {
        TextFactory factory = TextFactory.getTextFactory();
        View view = factory.createWrappedPlainView(document.getDefaultRootElement());
        rootViewContext.getView().replace(0, 1, new View[] { view });
    }
View Full Code Here

     * Creates password view instead of default plain view.
     * Necessary to be able to set echo character.
     */
    @Override
    View createView() {
        final TextFactory factory = TextFactory.getTextFactory();
        final View v = factory.createPasswordView(document.getDefaultRootElement());
        return v;
    }
View Full Code Here

TOP

Related Classes of org.apache.harmony.awt.text.TextFactory

Copyright © 2018 www.massapicom. 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.