Examples of XControlContainer


Examples of com.sun.star.awt.XControlContainer

      }
      return "Created dialog \"" + DialogURL + "\"";
    }
   
    public void copyText( XDialog xDialog, Object aEventObject ) {
      XControlContainer xControlContainer = (XControlContainer)UnoRuntime.queryInterface(
        XControlContainer.class, xDialog );
      String aTextPropertyStr = "Text";
      String aText = "";
      XControl xTextField1Control = xControlContainer.getControl( "TextField1" )
      XControlModel xControlModel1 = xTextField1Control.getModel();
      XPropertySet xPropertySet1 = (XPropertySet)UnoRuntime.queryInterface(
        XPropertySet.class, xControlModel1 );
      try
      {
        aText = (String)xPropertySet1.getPropertyValue( aTextPropertyStr );
      }
      catch (Exception e) {
        e.printStackTrace();
      }
 
      XControl xTextField2Control = xControlContainer.getControl( "TextField2" )
      XControlModel xControlModel2 = xTextField2Control.getModel();
      XPropertySet xPropertySet2 = (XPropertySet)UnoRuntime.queryInterface(
        XPropertySet.class, xControlModel2 );
      try
      {
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

        XControlModel xControlModel = ( XControlModel )UnoRuntime.queryInterface(
            XControlModel.class, dialogModel );     
        xControl.setModel( xControlModel );
     
        // 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
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

      }
      return "Created dialog \"" + DialogURL + "\"";
    }
   
    public void copyText( XDialog xDialog, Object aEventObject ) {
      XControlContainer xControlContainer = (XControlContainer)UnoRuntime.queryInterface(
        XControlContainer.class, xDialog );
      String aTextPropertyStr = "Text";
      String aText = "";
      XControl xTextField1Control = xControlContainer.getControl( "TextField1" )
      XControlModel xControlModel1 = xTextField1Control.getModel();
      XPropertySet xPropertySet1 = (XPropertySet)UnoRuntime.queryInterface(
        XPropertySet.class, xControlModel1 );
      try
      {
        aText = (String)xPropertySet1.getPropertyValue( aTextPropertyStr );
      }
      catch (Exception e) {
        e.printStackTrace();
      }
 
      XControl xTextField2Control = xControlContainer.getControl( "TextField2" )
      XControlModel xControlModel2 = xTextField2Control.getModel();
      XPropertySet xPropertySet2 = (XPropertySet)UnoRuntime.queryInterface(
        XPropertySet.class, xControlModel2 );
      try
      {
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

        XControl butControl1 = null;
        XControl butControl2 = null;
        XTabController tabControl1 = null;
        XTabController tabControl2 = null;

        XControlContainer ctrlCont = null;

        if (xWinDlg != null) {
            xWinDlg.dispose();
        }
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

    public TestEnvironment createTestEnvironment(TestParameters param,
                                                 PrintWriter log) {
        XInterface oObj = null;
        XControl xCtrl1 = null;
        XTabControllerModel tabCtrlModel = null;
        XControlContainer aCtrlContainer = null;


        // create object relations
        FormTools.insertForm(xTextDoc,
                             FormTools.getForms(WriterTools.getDrawPage(
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

        XControlModel xControlModel = ( XControlModel )UnoRuntime.queryInterface(
            XControlModel.class, dialogModel );     
        xControl.setModel( xControlModel );
     
        // add an action listener to the button control
        XControlContainer xControlCont = ( XControlContainer )UnoRuntime.queryInterface(
            XControlContainer.class, dialog );     

        // Add to yes button
        Object objectButton = xControlCont.getControl( _runButtonName );
        XButton xButton = ( XButton )UnoRuntime.queryInterface(
            XButton.class, objectButton );
        xButton.addActionListener( new ActionListenerImpl( xControlCont, _runButtonName ) );

        // add to no button
        objectButton = xControlCont.getControl( _doNotRunButtonName );
        xButton = ( XButton )UnoRuntime.queryInterface(
            XButton.class, objectButton );
        xButton.addActionListener( new ActionListenerImpl( xControlCont, _doNotRunButtonName ) );
     
        if ( checkBoxDialog )
        {
            // add to checkbox
            Object objectCheckBox = xControlCont.getControl( _checkBoxName );
            XCheckBox xCheckBox = ( XCheckBox )UnoRuntime.queryInterface(
                XCheckBox.class, objectCheckBox );
            xCheckBox.addItemListener((XItemListener) new ItemListenerImpl( xControlCont ) );
        }
     
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

                throw new com.sun.star.lang.IllegalArgumentException(
                    "This window is not supported by this handler", this, (short) -1);

            //To access the separate controls of the window we need to obtain the
            //XControlContainer from the window implementation
            XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface(
                XControlContainer.class, aWindow);
            if (xContainer == null)
                throw new com.sun.star.uno.Exception(
                    "Could not get XControlContainer from window.", this);

            //This is an implementation which will be used for several options pages
            //which all have the same controls. m_arStringControls is an array which
            //contains the names.
            for (int i = 0; i < m_arStringControls.length; i++) {

                //To obtain the data from the controls we need to get their model.
                //First get the respective control from the XControlContainer.
                XControl xControl = xContainer.getControl(m_arStringControls[i]);

                //This generic handler and the corresponding registry schema support
                //up to five text controls. However, if a options page does not use all
                //five controls then we will not complain here.
                if (xControl == null)
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

                throw new com.sun.star.lang.IllegalArgumentException(
                    "The window is not supported by this handler", this, (short) -1);

            //To acces the separate controls of the window we need to obtain the
            //XControlContainer from window implementation
            XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface(
                XControlContainer.class, aWindow);
            if (xContainer == null)
                throw new com.sun.star.uno.Exception(
                    "Could not get XControlContainer from window.", this);

            //This is an implementation which will be used for several options pages
            //which all have the same controls. m_arStringControls is an array which
            //contains the names.
            for (int i = 0; i < m_arStringControls.length; i++) {

                //load the values from the registry
                //To access the registry we have previously created a service instance
                //of com.sun.star.configuration.ConfigurationUpdateAccess which supports
                //com.sun.star.container.XNameAccess. We obtain now the section
                //of the registry which is assigned to this options page.
                XPropertySet xLeaf = (XPropertySet) UnoRuntime.queryInterface(
                    XPropertySet.class, m_xAccessLeaves.getByName(sWindowName));
                if (xLeaf == null)
                    throw new  com.sun.star.uno.Exception(
                        "XPropertySet not supported.", this);

                //The properties in the registry have the same name as the respective
                //controls. We use the names now to obtain the property values.
                Object aValue = xLeaf.getPropertyValue(m_arStringControls[i]);

                //Now that we have the value we need to set it at the corresponding
                //control in the window. The XControlContainer, which we obtained earlier
                //is the means to get hold of all the controls.
                XControl xControl = xContainer.getControl(m_arStringControls[i]);

                //This generic handler and the corresponding registry schema support
                //up to five text controls. However, if a options page does not use all
                //five controls then we will not complain here.
                if (xControl == null)
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

        XControlModel xControlModel = ( XControlModel )UnoRuntime.queryInterface(
            XControlModel.class, dialogModel );     
        xControl.setModel( xControlModel );
     
        // 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
View Full Code Here

Examples of com.sun.star.awt.XControlContainer

        }
    }

    public void enablePropertiesFieldOfPyramidDiagramPD(boolean bool){
        if(m_xPropsDialog != null){
            XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xPropsDialog);
            if(bool == false){
                for(int i = 6; i <= 10; i++)
                    ((XFixedText)UnoRuntime.queryInterface(XFixedText.class, xControlContainer.getControl("propsLabel" + i))).setText("");
              
            }
            enableControl(xControlContainer.getControl("FrameControl"), bool);
            for(int i = 1; i <= 10; i++)
                enableControl(xControlContainer.getControl("propsLabel" + i), bool);
        }
    }
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.