Package com.sun.star.awt

Examples of com.sun.star.awt.XControlContainer


    }

    public short getConversationType(){
        if(m_xConvertDialog != null){
            XRadioButton xRadioButton = null;
            XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xConvertDialog);
            xRadioButton = (XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("convertOptionButton1"));
            if(xRadioButton.getState() == true){
                if(getController().getGroupType() == Controller.ORGANIGROUP)
                    return Controller.SIMPLEORGANIGRAM;
            }
            xRadioButton = (XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("convertOptionButton2"));
            if(xRadioButton.getState() == true){
                if(getController().getGroupType() == Controller.ORGANIGROUP)
                    return Controller.HORIZONTALORGANIGRAM;
            }
            xRadioButton = (XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("convertOptionButton3"));
            if(xRadioButton.getState() == true){
                if(getController().getGroupType() == Controller.ORGANIGROUP)
                    return Controller.TABLEHIERARCHYDIAGRAM;
            }
            xRadioButton = (XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("convertOptionButton4"));
            if(xRadioButton.getState() == true){
                if(getController().getGroupType() == Controller.ORGANIGROUP)
                    return Controller.ORGANIGRAM;
            }
        }
View Full Code Here


            try {
                XRadioButton xRadioButton2          = null;
                XControl xControl                   = null;
                XPropertySet xProps                 = null;
                String disabledButton               = "convertOptionButton";
                XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xConvertDialog);

                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    if(getController().getDiagramType() == Controller.SIMPLEORGANIGRAM){
                        xRadioButton2 = (XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("convertOptionButton2"));
                        xRadioButton2.setState(true);
                        disabledButton += 1;
                    }
                    if(getController().getDiagramType() == Controller.HORIZONTALORGANIGRAM)
                        disabledButton += 2;
                    if(getController().getDiagramType() == Controller.TABLEHIERARCHYDIAGRAM)
                        disabledButton += 3;
                    //if(getController().getDiagramType() == Controller.ORGANIGRAM)
                    //    disabledButton += 4;

                    if(getController().getDiagramType() != Controller.ORGANIGRAM){
                        xControl = (XControl) UnoRuntime.queryInterface(XControl.class, xControlContainer.getControl(disabledButton));
                        xProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel());
                        xProps.setPropertyValue("Enabled", new Boolean(false));
                    }
                }
                //return AnyConverter.toBoolean(xPropImage.getPropertyValue("EnableVisible"));
View Full Code Here

        }
    }

    public void setConvertComboBox(boolean bool){
        try {
            XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xConvertDialog);
            XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, xControlContainer.getControl("lastHorLevelComboBox"));
            XPropertySet xProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel());
            xProps.setPropertyValue("Enabled", new Boolean(bool));
            xControl = (XControl) UnoRuntime.queryInterface(XControl.class, xControlContainer.getControl("Label"));
            xProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel());
            xProps.setPropertyValue("Enabled", new Boolean(bool));
        } catch (UnknownPropertyException ex) {
            System.err.println(ex.getLocalizedMessage());
        } catch (PropertyVetoException ex) {
View Full Code Here

            XDialogProvider2 xDialogProv = getDialogProvider();
            String sPackageURL = getPackageLocation();
            String sDialogURL = sPackageURL + "/dialogs/GradientDialog.xdl";
            m_xGradientDialog = xDialogProv.createDialogWithHandler(sDialogURL, m_oListener);
            if (m_xGradientDialog != null) {
                XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xGradientDialog);
                m_xStartImage = xControlContainer.getControl("startColor");
                m_xEndImage = xControlContainer.getControl("endColor");

                m_xGradientWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_xGradientDialog);
                m_xGradientTopWindow = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, m_xGradientDialog);
                m_xGradientTopWindow.addTopWindowListener(m_oListener);
                m_xControlDialogWindow.setEnable(false);
View Full Code Here

            String sDialogURL = sPackageURL + "/dialogs/" + diagramDefine;
            m_xPropsDialog = xDialogProv.createDialogWithHandler(sDialogURL, m_oListener);

            if (m_xPropsDialog != null) {

                XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xPropsDialog);
               
                Object oRadioButton = xControlContainer.getControl("colorOptionButton");
                m_xColorRadioButton = (XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, oRadioButton);

                m_xColorImageControl = xControlContainer.getControl("colorImageControl");

                if(getController().getDiagramType() == Controller.PYRAMIDDIAGRAM){
                    m_xGradientsCheckBoxControl = xControlContainer.getControl("gradientsCheckBox");
                    m_xGradientsCheckBox = (XCheckBox)UnoRuntime.queryInterface(XCheckBox.class, m_xGradientsCheckBoxControl);
                }else{
                   m_xGradientsCheckBoxControl = null;
                   m_xGradientsCheckBox = null;
                }

                if(getController().getDiagramType() == Controller.VENNDIAGRAM){
                    m_xColorCBControl = xControlContainer.getControl("colorOptionButton");
                    m_xColorCheckBox = UnoRuntime.queryInterface(XCheckBox.class, m_xColorCBControl);
                    m_xFrameRoundedOBYesControl = xControlContainer.getControl("frameRoundedOptionButtonYes");
                    m_xFrameRoundedOBNoControl = xControlContainer.getControl("frameRoundedOptionButtonNo");
                }else{
                    m_xFrameRoundedOBYesControl = null;
                    m_xFrameRoundedOBNoControl = null;
                }

                if(getController().getDiagramType() == Controller.PYRAMIDDIAGRAM || getController().getGroupType() == Controller.ORGANIGROUP){
                    m_xStartColorImageControl = xControlContainer.getControl("startColorImageControl");
                    m_xEndColorImageControl = xControlContainer.getControl("endColorImageControl");

                    m_xStartColorLabelControl = xControlContainer.getControl("Label0");
                    m_xEndColorLabelControl = xControlContainer.getControl("Label1");
                }else{
                    m_xStartColorImageControl = null;
                    m_xEndColorImageControl = null;
                    m_xStartColorLabelControl = null;
                    m_xEndColorLabelControl = null;
                }

                if(getController().getDiagramType() == Controller.PYRAMIDDIAGRAM || getController().getDiagramType() == Controller.CYCLEDIAGRAM){
                    m_xBaseColorControl = xControlContainer.getControl("baseColorOptionButton");
                    m_xBaseColorRadioButton = (XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, m_xBaseColorControl);
                }else{
                    m_xBaseColorControl = null;
                    m_xBaseColorRadioButton = null;
                }

                if(getController().getDiagramType() == Controller.PYRAMIDDIAGRAM || getController().getDiagramType() == Controller.CYCLEDIAGRAM || getController().getDiagramType() == Controller.VENNDIAGRAM){
                    m_xMonographicOBYesControl = xControlContainer.getControl("monographicOptionButtonYes");
                    m_xMonographicOBNoControl = xControlContainer.getControl("monographicOptionButtonNo");
                }else{
                    m_xMonographicOBYesControl = null;
                    m_xMonographicOBNoControl = null;
                }
               

                if(getController().getDiagramType() == Controller.CYCLEDIAGRAM || getController().getDiagramType() == Controller.VENNDIAGRAM){
                    m_xFrameOBYesControl = xControlContainer.getControl("frameOptionButtonYes");
                    m_xFrameOBNoControl = xControlContainer.getControl("frameOptionButtonNo");
                }else{
                    m_xFrameOBYesControl = null;
                    m_xFrameOBNoControl = null;
                }
View Full Code Here

    }

    public int getCurrImageColor(XDialog xDialog, int i){
        int color = -1;
        try {
            XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, xDialog);
            XControl xImageControl = xControlContainer.getControl("ImageControl" + i);
            XPropertySet xPropImage = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xImageControl.getModel());
            color = AnyConverter.toInt(xPropImage.getPropertyValue("BackgroundColor"));
        } catch (WrappedTargetException ex) {
            System.err.println(ex.getLocalizedMessage());
        } catch (IllegalArgumentException ex) {
View Full Code Here

            XPropertySet xPS = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xControl.getModel());
            xPS.setPropertyValue("Width", WIDTH);
            xPS.setPropertyValue("Height",new Integer(HEIGHT));
           
            XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, xDialog);
            Object oListBox = xControlContainer.getControl("FixListBox");
            m_xFixListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, oListBox);
            String sheet = getController().createStringWithSpace(getDialogPropertyValue("WWindow.Sheet.Label"), 26);
            String cell = getController().createStringWithSpace(getDialogPropertyValue("WWindow.Cell.Label"), 14);
            String value = getController().createStringWithSpace(getDialogPropertyValue("WWindow.Value.Label"), 25);
            String formula = getDialogPropertyValue("WWindow.Formula.Label");
            String label = sheet + cell + value + formula;
            m_xFixListBox.addItem(label, (short) 0);
            oListBox = xControlContainer.getControl("ListBox1");
            m_xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, oListBox);
            m_xListBox.addItemListener(this);

            m_xButtonControl = xControlContainer.getControl("removeCell");
            enableControl(m_xButtonControl, false);
           
        } catch (IllegalArgumentException ex) {
            ex.printStackTrace();
        } catch (Exception ex) {
View Full Code Here

            String sPackageURL              = getPackageLocation();
            String sDialogURL               = sPackageURL + "/dialogs/SelectWindow.xdl";
            XDialogProvider2 xDialogProv    = getDialogProvider();
            m_xSelectDialog                 = xDialogProv.createDialogWithHandler( sDialogURL, this );

            XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface( XControlContainer.class, m_xSelectDialog );

            Object oCheckBox    = xControlContainer.getControl("checkBox1");
            m_xCheckBox1        = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, oCheckBox);
            oCheckBox           = xControlContainer.getControl("checkBox2");
            m_xCheckBox2        = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, oCheckBox);
            oCheckBox           = xControlContainer.getControl("checkBox3");
            m_xCheckBox3        = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, oCheckBox);
            oCheckBox           = xControlContainer.getControl("checkBox4");
            m_xCheckBox4        = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, oCheckBox);
/*
            oCheckBox           = xControlContainer.getControl("checkBox5");
            m_xCheckBox5        = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, oCheckBox);
            oCheckBox           = xControlContainer.getControl("checkBox6");
View Full Code Here

            String sPackageURL = getPackageLocation();
            String sDialogURL = sPackageURL + "/dialogs/Validator.xdl";
            XDialogProvider2 xDialogProv = getDialogProvider();
            m_xDialog = xDialogProv.createDialogWithHandler(sDialogURL, this);

            XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xDialog);

            Object oListBox = xControlContainer.getControl("fixListBox");
            XListBox xFixListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, oListBox);
            String cellHeader = createStringWithSpace(getDialogPropertyValue("Validator", "Validator.cellLabel.Label"), 22);
            String descHeader = getDialogPropertyValue("Validator", "Validator.errorLabel.Label");
            String label = cellHeader + descHeader;
            xFixListBox.addItem(label, (short) 0);

            Object oFixedText = xControlContainer.getControl("sheetNameLabel");
            m_xSheetFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, oFixedText);

            oFixedText = xControlContainer.getControl("formulaLabel");
            m_xFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, oFixedText);

            oListBox = xControlContainer.getControl("listBox");
            m_xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, oListBox);

            Object oTextField = xControlContainer.getControl("formulaField");
            m_xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, oTextField);

            Object oCheckBox = xControlContainer.getControl("checkBox1");
            m_xPrecCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, oCheckBox);

            oCheckBox = xControlContainer.getControl("checkBox2");
            m_xDepCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, oCheckBox);


            if (m_xDialog != null) {
                m_xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_xDialog);
View Full Code Here

        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

TOP

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

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.