Package com.sun.star.awt

Examples of com.sun.star.awt.Selection


        String text = num ? "753" "iText" ;
        String itext = num ? "6" "insert" ;
        log.println("Setting text to : '" + text + "'") ;
        oObj.setText(text);
        log.println("Iserting text to (0,1) : '" + itext + "'") ;
        oObj.insertText(new Selection(0,1), itext);
        log.println("getText() returns: " + oObj.getText());
        tRes.tested("insertText()", oObj.getText().equals
            (num ? "653" : "insertText"));
    }
View Full Code Here


    * of text added before.
    */
    public void _getSelectedText() {
        String text = num ? "753" "txt" ;
        oObj.setText(text);
        oObj.setSelection(new Selection(0,3));
        boolean result = oObj.getSelectedText().equals(text);
       
        if (! result) {
            System.out.println("Getting '"+oObj.getSelectedText()+"'");
            System.out.println("Expected '"+text+"'");
View Full Code Here

    * Has <b> OK </b> status if selection set before is equal to a selection we
    * got using getSelection().
    */
    public void _setSelection() {
        oObj.setText("setSelection");
        Selection sel = new Selection(0,3);
        oObj.setSelection(sel);
        tRes.tested("setSelection()", ValueComparer.equalValue
            (oObj.getSelection(), sel));
    }
View Full Code Here

    * Has <b> OK </b> status if selection set before is equal to a selection we
    * got using getSelection().
    */
    public void _getSelection() {
        oObj.setText("getSelection");
        Selection sel = new Selection(2,3);
        oObj.setSelection(sel);
        tRes.tested("getSelection()", ValueComparer.equalValue
            (oObj.getSelection(), sel));
    }
View Full Code Here

        String text = num ? "753" "iText" ;
        String itext = num ? "6" "insert" ;
        log.println("Setting text to : '" + text + "'") ;
        oObj.setText(text);
        log.println("Iserting text to (0,1) : '" + itext + "'") ;
        oObj.insertText(new Selection(0,1), itext);
        log.println("getText() returns: " + oObj.getText());
        tRes.tested("insertText()", oObj.getText().equals
            (num ? "653" : "insertText"));
    }
View Full Code Here

    * of text added before.
    */
    public void _getSelectedText() {
        String text = num ? "753" "txt" ;
        oObj.setText(text);
        oObj.setSelection(new Selection(0,3));
        boolean result = oObj.getSelectedText().equals(text);
       
        if (! result) {
            System.out.println("Getting '"+oObj.getSelectedText()+"'");
            System.out.println("Expected '"+text+"'");
View Full Code Here

    * Has <b> OK </b> status if selection set before is equal to a selection we
    * got using getSelection().
    */
    public void _setSelection() {
        oObj.setText("setSelection");
        Selection sel = new Selection(0,3);
        oObj.setSelection(sel);
        tRes.tested("setSelection()", ValueComparer.equalValue
            (oObj.getSelection(), sel));
    }
View Full Code Here

    * Has <b> OK </b> status if selection set before is equal to a selection we
    * got using getSelection().
    */
    public void _getSelection() {
        oObj.setText("getSelection");
        Selection sel = new Selection(2,3);
        oObj.setSelection(sel);
        tRes.tested("getSelection()", ValueComparer.equalValue
            (oObj.getSelection(), sel));
    }
View Full Code Here

    private void focus(Object textControl)
    {
        ((XWindow) UnoRuntime.queryInterface(XWindow.class, textControl)).setFocus();
        XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, textControl);
        String text = xTextComponent.getText();
        xTextComponent.setSelection(new Selection(0, text.length()));
        XControl xc = (XControl) UnoRuntime.queryInterface(XControl.class, textControl);
        focusGained(xc);
    }
View Full Code Here

        // only perform if this is not the last row.
        int actuallRow = guiRow + nscrollvalue;
        if (actuallRow + 1 < scrollfields.size())
        {
            // get the current selection
            Selection selection = getSelection(control);

            // the last row should scroll...
            boolean scroll = guiRow == (nblockincrement - 1);
            if (scroll)
            {
View Full Code Here

TOP

Related Classes of com.sun.star.awt.Selection

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.