Package com.sun.star.accessibility

Examples of com.sun.star.accessibility.XAccessibleEditableText


     {
         try{
            XInterface xNumericField =mAT.getAccessibleObjectForRole(
                                  mXRoot, AccessibleRole.TEXT, NumericFieldName);
            //util.dbg.printInterfaces(xNumericField);
            XAccessibleEditableText oValue = (XAccessibleEditableText)
                                         UnoRuntime.queryInterface(
                                         XAccessibleEditableText.class, xNumericField);

            setString(xNumericField, cValue);
         } catch (Exception e) {
View Full Code Here


        new String[] { "select...", "copy...",
                       "cut...", "paste...", "edit...", "format..." };

    public String[] getActions (AccessibleTreeNode aNode)
    {
        XAccessibleEditableText xEText = null;
        if (aNode instanceof AccTreeNode)
            xEText = ((AccTreeNode)aNode).getEditText ();
       
        return (xEText == null) ? aTextActions : aEditableTextActions;
    }
View Full Code Here

    /** edit the text */
    boolean action( JTextComponent aText, AccTreeNode aNode )
    {
        // is this text editable? if not, fudge you and return
        XAccessibleEditableText xEdit = aNode.getEditText();
        return ( xEdit == null ) ? false :
            updateText( xEdit, aText.getText() );
    }
View Full Code Here

    /** edit the text */
    boolean action( JTextComponent aText, AccTreeNode aNode )
        throws IndexOutOfBoundsException
    {
        // is this text editable? if not, fudge you and return
        XAccessibleEditableText xEdit = aNode.getEditText();
        boolean bSuccess = false;
        if( xEdit != null )
        {
            PropertyValue[] aSequence = new PropertyValue[6];
            aSequence[0] = new PropertyValue();
            aSequence[0].Name = "CharWeight";
            aSequence[0].Value = new Integer( aBold.isSelected() ? 150 : 100 );
            aSequence[1] = new PropertyValue();
            aSequence[1].Name = "CharUnderline";
            aSequence[1].Value = new Integer( aUnderline.isSelected() ? 1 : 0 );
            aSequence[2] = new PropertyValue();
            aSequence[2].Name = "CharBackColor";
            aSequence[2].Value = new Integer( aBackground.getRGB() );
            aSequence[3] = new PropertyValue();
            aSequence[3].Name = "CharColor";
            aSequence[3].Value = new Integer( aForeground.getRGB() );
            aSequence[4] = new PropertyValue();
            aSequence[4].Name = "CharPosture";
            aSequence[4].Value = new Integer( aItalics.isSelected() ? 1 : 0 );
            aSequence[5] = new PropertyValue();
            aSequence[5].Name = "CharBackTransparent";
            aSequence[5].Value = new Boolean( false );

            bSuccess = xEdit.setAttributes( getSelectionStart(),
                                            getSelectionEnd(),
                                            aSequence );
        }
        return bSuccess;
    }
View Full Code Here

class AccessibleEditableTextHandler extends NodeHandler
{
    public NodeHandler createHandler (XAccessibleContext xContext)
    {
        XAccessibleEditableText xText =
            (XAccessibleEditableText) UnoRuntime.queryInterface (
                XAccessibleEditableText.class, xContext);
        if (xText != null)
            return new AccessibleEditableTextHandler (xText);
        else
View Full Code Here

        // (namely the FormController) relies on to notice that the control changed.
        // Instead, we use the Accessibility interfaces of the control to simulate text input
        XAccessible formattedAccessible = (XAccessible)UnoRuntime.queryInterface( XAccessible.class,
            m_document.getCurrentView().getControl( controlModel )
        );
        XAccessibleEditableText textAccess = (XAccessibleEditableText)UnoRuntime.queryInterface( XAccessibleEditableText.class,
            formattedAccessible.getAccessibleContext() );
        textAccess.setText( text );

        // focus back to a dummy control model so the content of the model we just changed will
        // be committed to the underlying database column
        if ( withCommit )
            m_document.getCurrentView().grabControlFocus( getControlModel( "dummy" ) );
View Full Code Here

                         XAccessibleAction.class, ok_button);

        XAccessibleText text = (XAccessibleText) UnoRuntime.queryInterface(
                                       XAccessibleText.class, oObj);

        XAccessibleEditableText eText = (XAccessibleEditableText) UnoRuntime.queryInterface(
                                                XAccessibleEditableText.class,
                                                oObj);

        eText.setText("LEFT");

        tEnv.addObjRelation("XAccessibleText.Text", text.getText());
       
        tEnv.addObjRelation("Destroy", "AccessibleEditableTextPara_PreviewCell");       

        final XAccessibleEditableText editText = eText;

        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                editText.setText("LEFT_EVENT");
            }
        });

        return tEnv;
    }
View Full Code Here

        log.println("ImplementationName " + utils.getImplName(oObj));

        TestEnvironment tEnv = new TestEnvironment(oObj);

        final XAccessibleEditableText edText = (XAccessibleEditableText) UnoRuntime.queryInterface(
                                                       XAccessibleEditableText.class,
                                                       oObj);
        edText.setText("AccessibleEdit");

        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                //                    buttonAccComp.grabFocus();
                //                    acomp.grabFocus();
                edText.setText("firing event ...");
                edText.setText("firing event ... 2");
                edText.setText("AccessibleEdit");
            }
        });

        XAccessibleText text = (XAccessibleText) UnoRuntime.queryInterface(
                                       XAccessibleText.class, oObj);
View Full Code Here

                         XAccessibleAction.class, ok_button);

        XAccessibleText text = (XAccessibleText) UnoRuntime.queryInterface(
                                       XAccessibleText.class, oObj);

        XAccessibleEditableText eText = (XAccessibleEditableText) UnoRuntime.queryInterface(
                                                XAccessibleEditableText.class,
                                                oObj);

        eText.setText("LEFT");

        tEnv.addObjRelation("XAccessibleText.Text", text.getText());
       
        tEnv.addObjRelation("Destroy", "AccessibleEditableTextPara_PreviewCell");       

        final XAccessibleEditableText editText = eText;

        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                editText.setText("LEFT_EVENT");
            }
        });

        return tEnv;
    }
View Full Code Here

        log.println("ImplementationName " + utils.getImplName(oObj));

        TestEnvironment tEnv = new TestEnvironment(oObj);

        final XAccessibleEditableText edText = (XAccessibleEditableText) UnoRuntime.queryInterface(
                                                       XAccessibleEditableText.class,
                                                       oObj);
        edText.setText("AccessibleEdit");

        tEnv.addObjRelation("EventProducer",
                            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                //                    buttonAccComp.grabFocus();
                //                    acomp.grabFocus();
                edText.setText("firing event ...");
                edText.setText("firing event ... 2");
                edText.setText("AccessibleEdit");
            }
        });

        XAccessibleText text = (XAccessibleText) UnoRuntime.queryInterface(
                                       XAccessibleText.class, oObj);
View Full Code Here

TOP

Related Classes of com.sun.star.accessibility.XAccessibleEditableText

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.