Examples of XButton


Examples of com.sun.star.awt.XButton

        for (int r = 0; r < rows; r++)
        {
            for (int c = 0; c < cols; c++)
            {
                XButton aButton = createButton(dialog, r, c);
                XControl aControl = (XControl)UnoRuntime.queryInterface(XControl.class, aButton);
                m_aButtons[r * cols + c] = aControl;
            }
        }
        refreshImages();
View Full Code Here

Examples of com.sun.star.awt.XButton

    private XButton createButton(UnoDialog2 dialog, int _row, int _col)
    {
        String sButtonName = m_aControlName + "_button" + (_row * cols + _col);
        int nButtonX = getButtonPosX(_col);
        int nButtonY = getButtonPosY(_row);
        XButton aButton = dialog.insertImageButton(sButtonName, this,
                new String[]
                {
                    /* "Border", */
                    /* "BackgroundColor", */
                    "Height",
View Full Code Here

Examples of com.sun.star.awt.XButton

     
        // add an action listener to the button control
        XControlContainer xControlCont = ( XControlContainer )UnoRuntime.queryInterface(
            XControlContainer.class, dialog );     
        Object objectButton = xControlCont.getControl( "Button1" );
        XButton xButton = ( XButton )UnoRuntime.queryInterface(
            XButton.class, objectButton );
        xButton.addActionListener( new ActionListenerImpl( xControlCont ) );
     
        // create a peer
        Object toolkit = xMultiComponentFactory.createInstanceWithContext(
            "com.sun.star.awt.ExtToolkit", _xComponentContext );     
        XToolkit xToolkit = ( XToolkit )UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.awt.XButton

        return xTextComponent;
    }
   
   
    public XButton insertButton(XActionListener _xActionListener, int _nPosX, int _nPosY, int _nWidth, String _sLabel, short _nPushButtonType){
        XButton xButton = null;
        try{
            // create a unique name by means of an own implementation...
            String sName = createUniqueName(m_xDlgModelNameContainer, "CommandButton");
           
            // create a controlmodel at the multiservicefactory of the dialog model...
            Object oButtonModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlButtonModel");
            XMultiPropertySet xButtonMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oButtonModel);
            // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
            xButtonMPSet.setPropertyValues(
                    new String[]  {"Height", "Label", "Name", "PositionX", "PositionY", "PushButtonType", "Width" } ,
                    new Object[] {new Integer(14), _sLabel, sName, new Integer(_nPosX), new Integer(_nPosY), new Short(_nPushButtonType), new Integer(_nWidth)});
           
            // add the model to the NameContainer of the dialog model
            m_xDlgModelNameContainer.insertByName(sName, oButtonModel);
            XControl xButtonControl = m_xDlgContainer.getControl(sName);
            xButton = (XButton) UnoRuntime.queryInterface(XButton.class, xButtonControl);
            // An ActionListener will be notified on the activation of the button...
            xButton.addActionListener(_xActionListener);
        } catch (com.sun.star.uno.Exception ex) {
            /* perform individual exception handling here.
             * Possible exception types are:
             * com.sun.star.lang.IllegalArgumentException,
             * com.sun.star.lang.WrappedTargetException,
 
View Full Code Here

Examples of com.sun.star.awt.XButton

     
        // add an action listener to the button control
        XControlContainer xControlCont = ( XControlContainer )UnoRuntime.queryInterface(
            XControlContainer.class, dialog );     
        Object objectButton = xControlCont.getControl( "Button1" );
        XButton xButton = ( XButton )UnoRuntime.queryInterface(
            XButton.class, objectButton );
        xButton.addActionListener( new ActionListenerImpl( xControlCont ) );
     
        // create a peer
        Object toolkit = xMultiComponentFactory.createInstanceWithContext(
            "com.sun.star.awt.ExtToolkit", _xComponentContext );     
        XToolkit xToolkit = ( XToolkit )UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.awt.XButton

  {
    // the current view to the document
    DocumentViewHelper aCurrentView = m_aDocument.getCurrentView();

    // add a listener so we get noticed if the user presses the button
    XButton xButtonControl = (XButton)UnoRuntime.queryInterface( XButton.class,
      aCurrentView.getFormControl( _buttonModel ) );
    xButtonControl.addActionListener( this );

        _buttonModel.setPropertyValue( "Tag", String.valueOf( _formFeature ) );

    // remember the button
    m_aButtons.add( _buttonModel );
View Full Code Here

Examples of net.xoetrope.html.XButton

       
    }
   
    public void enable() {
        XCheckbox check1 = (XCheckbox)findComponent( obj, "check4" );
        XButton one = (XButton)findComponent( "one" );
        XButton two = (XButton)findComponent( "two" );
        XButton three = (XButton)findComponent( "three" );
        XRadioButton rad1 = (XRadioButton)findComponent( "radio1" );
        XRadioButton rad2 = (XRadioButton)findComponent( "radio2" );
        XRadioButton rad3 = (XRadioButton)findComponent( "radio3" );
        XRadioButton rad4 = (XRadioButton)findComponent( "radio4" );
        XRadioButton rad5 = (XRadioButton)findComponent( "radio5" );
        XRadioButton rad6 = (XRadioButton)findComponent( "radio6" );
        XLabel rad1_txt = (XLabel)findComponent( "radio1_txt" );
        XLabel rad2_txt = (XLabel)findComponent( "radio2_txt" );
        XLabel rad3_txt = (XLabel)findComponent( "radio3_txt" );
        XLabel rad4_txt = (XLabel)findComponent( "radio4_txt" );
        XLabel rad5_txt = (XLabel)findComponent( "radio5_txt" );
        XLabel rad6_txt = (XLabel)findComponent( "radio6_txt" );
        XLabel ch1_txt = (XLabel)findComponent( "check1_txt" );
        XLabel ch2_txt = (XLabel)findComponent( "check2_txt" );
        XLabel ch3_txt = (XLabel)findComponent( "check3_txt" );
        XCheckbox ch1 = (XCheckbox)findComponent( "check1" );
        XCheckbox ch2 = (XCheckbox)findComponent( "check2" );
        XCheckbox ch3 = (XCheckbox)findComponent( "check3" );
        if ( check1.isSelected() ) {
            one.setEnabled( false );
            two.setEnabled( false );
            three.setEnabled( false );
            rad1.setEnabled( false );
            rad2.setEnabled( false );
            rad3.setEnabled( false );
            rad4.setEnabled( false );
            rad5.setEnabled( false );
            rad6.setEnabled( false );
            ch1.setEnabled( false );
            ch2.setEnabled( false );
            ch3.setEnabled( false );
            rad1_txt.setFontColor( "#DDDDDD" );
            rad2_txt.setFontColor( "#DDDDDD" );
            rad3_txt.setFontColor( "#DDDDDD" );
            rad4_txt.setFontColor( "#DDDDDD" );
            rad5_txt.setFontColor( "#DDDDDD" );
            rad6_txt.setFontColor( "#DDDDDD" );
            ch1_txt.setFontColor( "#DDDDDD" );
            ch2_txt.setFontColor( "#DDDDDD" );
            ch3_txt.setFontColor( "#DDDDDD" );
        } else {
            one.setEnabled( true );
            two.setEnabled( true );
            three.setEnabled( true );
            rad1.setEnabled( true );
            rad2.setEnabled( true );
            rad3.setEnabled( true );
            rad4.setEnabled( true );
            rad5.setEnabled( true );
View Full Code Here

Examples of net.xoetrope.swing.XButton

    public String getText() {
        return m_edit.getText();
    }

    private void reverseButtonColors(String button) {
        XButton xbutton = (XButton) m_dialog.findComponent(button);
        Color fore = xbutton.getForeground();
        Color back = xbutton.getBackground();
        xbutton.setForeground(back);
        xbutton.setBackground(fore);
        return;
    }
View Full Code Here

Examples of net.xoetrope.swing.XButton

    private void setupEvents() {
        String[] keys = {"A" ,"B" ,"C" ,"D" ,"E" ,"F" ,"G" ,"H" ,"I" ,"J" ,"K" ,"L" ,"M" ,"N" ,"O" ,"P" ,"Q" ,"R" ,"S" ,"T" ,"U" ,"V" ,"W" ,"X" ,"Y" ,"Z",
                "1" ,"2" ,"3" ,"4" ,"5" ,"6" ,"7" ,"8" ,"9" ,"0" ,
                "Dot", "Dash", "Del", "Space", "Clear", "Enter", "Cancel", "Shift", "ShiftLock"};
        XButton button = null;
        for(String key : keys) {
            button = (XButton) m_dialog.findComponent("char" + key);
            XEventHelper.addMouseHandler(this, button, "trigger" + key);
        }
    }
View Full Code Here

Examples of net.xoetrope.swing.XButton

            XEventHelper.addMouseHandler(this, button, "trigger" + key);
        }
    }

    private void setButtonText(String buttonName, String newText) {
        XButton button = (XButton) m_dialog.findComponent(buttonName);
        button.setText(newText);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.