Package com.sun.star.beans

Examples of com.sun.star.beans.XPropertySet


    }

    public XFixedText insertLabel(String sName, String[] sPropNames, Object[] oPropValues) {
        try {
            Object oFixedText = insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", sName, sPropNames, oPropValues);
            XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFixedText);
            xPSet.setPropertyValue("Name", sName);
            Object oLabel = xDlgContainer.getControl(new String(sName));
            return (XFixedText) UnoRuntime.queryInterface(XFixedText.class, oLabel);
        } catch (java.lang.Exception ex) {
            ex.printStackTrace();
            return null;
View Full Code Here


               return xButton;
            } */

    public XButton insertButton(String sName, int iControlKey, XActionListener xActionListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception {
        Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues);
        XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel);
        xPSet.setPropertyValue("Name", sName);
        Object objectButton = xDlgContainer.getControl(new String(sName));
        XButton xButton = (XButton) UnoRuntime.queryInterface(XButton.class, objectButton);
        if (xActionListener != null)
            xButton.addActionListener(xActionListener);
        Integer ControlKey = new Integer(iControlKey);
View Full Code Here

        return xButton;
    }

    public void insertCheckBox(String sName, int iControlKey, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception {
        Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlCheckBoxModel", sName, sProperties, sValues);
        XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel);
        xPSet.setPropertyValue("Name", sName);
        Object objectCheckBox = xDlgContainer.getControl(new String(sName));
        XCheckBox xCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, objectCheckBox);
        if (xItemListener != null)
            xCheckBox.addItemListener(xItemListener);
        Integer ControlKey = new Integer(iControlKey);
View Full Code Here

            ControlList.put(sName, ControlKey);
    }

    public void insertNumericField(String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception {
        Object oNumericFieldModel = insertControlModel("com.sun.star.awt.UnoControlNumericFieldModel", sName, sProperties, sValues);
        XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oNumericFieldModel);
        xPSet.setPropertyValue("Name", sName);
        Object objectNumericField = xDlgContainer.getControl(new String(sName));
        XTextComponent xNumericField = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, objectNumericField);
        if (xTextListener != null)
            xNumericField.addTextListener(xTextListener);
        Integer ControlKey = new Integer(iControlKey);
View Full Code Here

    }

    public XScrollBar insertScrollBar(String sName, int iControlKey, XAdjustmentListener xAdjustmentListener, String[] sProperties, Object[] sValues) {
        try {
            Object oScrollModel = insertControlModel("com.sun.star.awt.UnoControlScrollBarModel", sName, sProperties, sValues);
            XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oScrollModel);
            xPSet.setPropertyValue("Name", sName);
            Object oScrollBar = xDlgContainer.getControl(new String(sName));
            XScrollBar xScrollBar = (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, oScrollBar);
            if (xAdjustmentListener != null)
                xScrollBar.addAdjustmentListener(xAdjustmentListener);
            Integer ControlKey = new Integer(iControlKey);
View Full Code Here

    }

    public XTextComponent insertEditField(String ServiceName, String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) {
        try {
            XInterface xTextModel = insertControlModel(ServiceName, sName, sProperties, sValues);
            XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextModel);
            xPSet.setPropertyValue("Name", sName);
            XControl xTextField = xDlgContainer.getControl(new String(sName));
            XTextComponent xTextBox = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xTextField);
            if (xTextListener != null)
                xTextBox.addTextListener(xTextListener);
            Integer ControlKey = new Integer(iControlKey);
View Full Code Here

        }
    }

    public XListBox insertListBox(String sName, int iControlKey, XActionListener xActionListener, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception {
        XInterface xListBoxModel = insertControlModel("com.sun.star.awt.UnoControlListBoxModel", sName, sProperties, sValues);
        XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xListBoxModel);
        xPSet.setPropertyValue("Name", sName);
        XControl xControlListBox = xDlgContainer.getControl(new String(sName));
        XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControlListBox);
        if (xItemListener != null)
            xListBox.addItemListener(xItemListener);
        if (xActionListener != null)
View Full Code Here

        return xListBox;
    }

    public XComboBox insertComboBox(String sName, int iControlKey, XActionListener xActionListener, XTextListener xTextListener, XItemListener xItemListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception {
        XInterface xComboBoxModel = insertControlModel("com.sun.star.awt.UnoControlComboBoxModel", sName, sProperties, sValues);
        XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xComboBoxModel);
        xPSet.setPropertyValue("Name", sName);
        XControl xControlComboBox = xDlgContainer.getControl(new String(sName));
        XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControlComboBox);
        if (xItemListener != null)
            xComboBox.addItemListener(xItemListener);
        if (xTextListener != null) {
View Full Code Here

    }

    public XRadioButton insertRadioButton(String sName, String[] sProperties, Object[] sValues) {
        try {
            XInterface oRadioButtonModel = insertControlModel("com.sun.star.awt.UnoControlRadioButtonModel", sName, sProperties, sValues);
            XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRadioButtonModel);
            xPSet.setPropertyValue("Name", sName);
            XControl xControlRadioButton = xDlgContainer.getControl(new String(sName));
            XRadioButton xRadioButton = (XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlRadioButton);
            return xRadioButton;
        } catch (com.sun.star.uno.Exception exception) {
            exception.printStackTrace(System.out);
View Full Code Here

            e.printStackTrace( log );
            throw new StatusException( "Couldn't create document", e );
        }

        log.println("Change Diagram to 3D");
        XPropertySet ChartProps = (XPropertySet)
            UnoRuntime.queryInterface( XPropertySet.class, xChartDoc.getDiagram() );
        try {
            ChartProps.setPropertyValue("Dim3D", new Boolean(true));
        } catch(com.sun.star.lang.WrappedTargetException e) {
            log.println("Couldn't change Diagram to 3D");
            e.printStackTrace(log);
            throw new StatusException("Couldn't change Diagram to 3D", e);
        } catch(com.sun.star.lang.IllegalArgumentException e) {
View Full Code Here

TOP

Related Classes of com.sun.star.beans.XPropertySet

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.