Package com.sun.star.container

Examples of com.sun.star.container.XChild



    private void getDataSourceObjects() throws Exception{
    try {
        xDBMetaData = DBConnection.getMetaData();
        XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, DBConnection);
        Object oDataSource = xChild.getParent();
        getDataSourceInterfaces();
        setMaxColumnsInGroupBy();
        setMaxColumnsInSelect();
    } catch (SQLException e) {
        e.printStackTrace(System.out);
View Full Code Here


        if (xServiceInfo.supportsService("com.sun.star.drawing.ControlShape")){
            XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
            XControlModel xControlModel = xControlShape.getControl();
            xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
            if (xServiceInfo.supportsService("com.sun.star.form.FormComponent")){
                XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, xControlModel);
                XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xChild.getParent());
                String sName = xNamed.getName();
                return _FormName.equals(xNamed.getName());
            }
        }
        return false;
View Full Code Here


    private void getDataSourceObjects() throws Exception{
    try {
        xDBMetaData = DBConnection.getMetaData();
        XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, DBConnection);
        Object oDataSource = xChild.getParent();
        getDataSourceInterfaces();
        setMaxColumnsInGroupBy();
        setMaxColumnsInSelect();
    } catch (SQLException e) {
        e.printStackTrace(System.out);
View Full Code Here

    /* ------------------------------------------------------------------ */
    /** retrieves the document model which a given form component belongs to
    */
    static public DocumentHelper getDocumentForComponent( Object aFormComponent, XMultiServiceFactory orb )
    {
        XChild xChild = (XChild)UnoRuntime.queryInterface( XChild.class, aFormComponent );
        XModel xModel = null;
        while ( ( null != xChild ) && ( null == xModel ) )
        {
            XInterface xParent = (XInterface)xChild.getParent();
            xModel = (XModel)UnoRuntime.queryInterface( XModel.class, xParent );
            xChild = (XChild)UnoRuntime.queryInterface( XChild.class, xParent );
        }

        return new DocumentHelper( orb, xModel );
View Full Code Here

    private void getDataSourceObjects() throws Exception
    {
        try
        {
            xDBMetaData = DBConnection.getMetaData();
            XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, DBConnection);
            Object oDataSource = xChild.getParent();
            getDataSourceInterfaces();
            setMaxColumnsInGroupBy();
            setMaxColumnsInSelect();
        }
        catch (SQLException e)
View Full Code Here

            XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
            XControlModel xControlModel = xControlShape.getControl();
            xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
            if (xServiceInfo.supportsService("com.sun.star.form.FormComponent"))
            {
                XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, xControlModel);
                XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xChild.getParent());
                String sName = xNamed.getName();
                return _FormName.equals(sName);
            }
        }
        return false;
View Full Code Here

     
        // set the result to its parent until that would be null 
        Object xParent;
        do
        {
            XChild xParentAccess =
                (XChild) UnoRuntime.queryInterface(XChild.class,xResult);

            if (xParentAccess != null)
                xParent = xParentAccess.getParent();
            else
                xParent = null;

            if (xParent != null)
                xResult = xParent;
View Full Code Here

    /// WORKAROUND: does the same as xNamedItem.setName(sNewName) should do
    void renameSetItem(XNamed xNamedItem, String sNewName)
    throws com.sun.star.uno.Exception
    {
        XChild xChildItem = (XChild)
            UnoRuntime.queryInterface(XChild.class, xNamedItem);

        XNameContainer xParentSet = (XNameContainer)
            UnoRuntime.queryInterface( XNameContainer.class, xChildItem.getParent() );

        String sOldName = xNamedItem.getName();

        // now rename the item
        xParentSet.removeByName(sOldName);
View Full Code Here

            XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
            XControlModel xControlModel = xControlShape.getControl();
            xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
            if (xServiceInfo.supportsService("com.sun.star.form.FormComponent"))
            {
                XChild xChild = UnoRuntime.queryInterface(XChild.class, xControlModel);
                XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, xChild.getParent());
                String sName = xNamed.getName();
                return _FormName.equals(sName);
            }
        }
        return false;
View Full Code Here

    private void impl_assignScript( final XPropertySet i_controlModel, final String i_interfaceName,
        final String i_interfaceMethod, final String i_scriptURI )
    {
        try
        {
            final XChild modelAsChild = UnoRuntime.queryInterface( XChild.class, i_controlModel );
            final XIndexContainer parentForm = UnoRuntime.queryInterface( XIndexContainer.class, modelAsChild.getParent() );

            final XEventAttacherManager manager = UnoRuntime.queryInterface( XEventAttacherManager.class, parentForm );

            int containerPosition = -1;
            for ( int i = 0; i < parentForm.getCount(); ++i )
View Full Code Here

TOP

Related Classes of com.sun.star.container.XChild

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.