Examples of XListBox


Examples of com.sun.star.awt.XListBox

    /* ------------------------------------------------------------------ */
    /** simulates a user selecting an entry in a list box
    */
    private void simulateUserListBoxSelection( XPropertySet _listBox, String _selectEntry ) throws com.sun.star.uno.Exception
    {
        XListBox listBoxControl = (XListBox)UnoRuntime.queryInterface(
            XListBox.class, m_document.getCurrentView().getControl( _listBox ) );
        listBoxControl.selectItem( _selectEntry, true );
    }
View Full Code Here

Examples of com.sun.star.awt.XListBox

                    case SO_SECONDFIELDNAME:
                    case SO_THIRDFIELDNAME:
                    case SO_FOURTHFIELDNAME:
                        sControlName = getControlName(EventObject.Source);
                        String sControlNameSuffix = sIncSuffix + "_" + getIndexNumber(sControlName);
                        XListBox xCurFieldListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(sControlName));
                        String CurDisplayFieldName = xCurFieldListBox.getSelectedItem();
                        FieldColumn CurFieldColumn = new FieldColumn(oQueryMetaData, CurDisplayFieldName);
                       
                        String sControlNameTextValue = "txtValue" + sControlNameSuffix;
//                        String sControlNameBooleanList = "lstBoolean" + sControlNameSuffix;
//                        if (aFieldColumn.FieldType == DataType.BOOLEAN)
View Full Code Here

Examples of com.sun.star.awt.XListBox

        protected void setCondition(PropertyValue _filtercondition)
        {
            try
            {
                int ikey;
                XListBox xFieldsListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTFIELDNAME]);
                xFieldsListBox.selectItem(_filtercondition.Name, true);
                XListBox xOperatorListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTOPERATOR]);
                xOperatorListBox.selectItemPos((short) (_filtercondition.Handle - 1), true);

                if (AnyConverter.isString(_filtercondition.Value))
                {
                    String sValue = AnyConverter.toString(_filtercondition.Value);
                    if (sValue.indexOf("{D '") > -1)
View Full Code Here

Examples of com.sun.star.awt.XListBox

        public String render(Object item);
    }

    public static void fillList(Object list, Object[] items, Renderer renderer)
    {
        XListBox xlist = (XListBox) UnoRuntime.queryInterface(XListBox.class, list);
        Helper.setUnoPropertyValue(UnoDataAware.getModel(list), "StringItemList", new String[]
                {
                });
        for (short i = 0; i < items.length; i++)
        {
            if (items[i] != null)
            {
                xlist.addItem((renderer != null ? renderer.render(items[i]) : items[i].toString()), i);
            }
        }
    }
View Full Code Here

Examples of com.sun.star.awt.XListBox

        tEnv.addObjRelation("MODEL",the_Model);

        // Adding relation for XItemListener
        ifc.awt._XItemListener.TestItemListener listener =
            new ifc.awt._XItemListener.TestItemListener() ;
        final XListBox box = (XListBox) UnoRuntime.queryInterface(XListBox.class, oObj) ;
        box.addItemListener(listener) ;
        tEnv.addObjRelation("TestItemListener", listener) ;

        // Adding relation for XWindow
        XWindow forObjRel = (XWindow)
                            UnoRuntime.queryInterface(XWindow.class, anotherCtrl);
       
        XWindow objWin = (XWindow)
                            UnoRuntime.queryInterface(XWindow.class, oObj);

        tEnv.addObjRelation("XWindow.AnotherWindow",forObjRel);
        tEnv.addObjRelation("XWindow.ControlShape",aShape);
       
        tEnv.addObjRelation("Win1",objWin);
        tEnv.addObjRelation("Win2",forObjRel);
       
        tEnv.addObjRelation("CONTROL",anotherCtrl);

        // adding relation for XChangeBroadcaster
        box.addItem("Item1", (short) 0);
        box.addItem("Item2", (short) 1);

        tEnv.addObjRelation("XChangeBroadcaster.Changer",
            new ifc.form._XChangeBroadcaster.Changer() {
                public void change(){
                    box.addItem("Item1", (short) 0);
                    box.addItem("Item2", (short) 1);
                    box.selectItemPos((short) 0, true);
                    box.selectItemPos((short) 1, true);
                }
            }
        );

        return tEnv;
View Full Code Here

Examples of com.sun.star.awt.XListBox

    }
   
   
   
    public XListBox insertListBox(int _nPosX, int _nPosY, int _nHeight, int _nWidth, int _nStep, String[] _sStringItemList) {
        XListBox xListBox = null;
        try{
            // create a unique name by means of an own implementation...
            String sName = createUniqueName(m_xDlgModelNameContainer, "ListBox");
            // create a controlmodel at the multiservicefactory of the dialog model...       
            Object oListBoxModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlListBoxModel");
View Full Code Here

Examples of com.sun.star.awt.XListBox

        }
    }
   
   
    public XListBox insertListBox(int _nPosX, int _nPosY, int _nWidth, int _nStep, String[] _sStringItemList){
        XListBox xListBox = null;
        try{
            // create a unique name by means of an own implementation...
            String sName = createUniqueName(m_xDlgModelNameContainer, "ListBox");
           
            // create a controlmodel at the multiservicefactory of the dialog model...
View Full Code Here

Examples of com.sun.star.awt.XListBox

    /* ------------------------------------------------------------------ */
    /** simulates a user selecting an entry in a list box
    */
    private void simulateUserListBoxSelection( XPropertySet _listBox, String _selectEntry ) throws com.sun.star.uno.Exception
    {
        XListBox listBoxControl = (XListBox)UnoRuntime.queryInterface(
            XListBox.class, m_document.getCurrentView().getControl( _listBox ) );
        listBoxControl.selectItem( _selectEntry, true );
    }
View Full Code Here

Examples of com.sun.star.awt.XListBox

                StringBuffer failedFieldTypes = new StringBuffer();
                for ( int i=0; i<fieldTypes.length; ++i )
                {
                    final String columnFKName = fieldTypes[i] + "_fk";
                    Object listBoxModel = form.getByName( columnFKName );
                    XListBox listBoxControl = UnoRuntime.queryInterfaceXListBox.class,
                        view.getControl( listBoxModel ) );
                    if ( !listBoxControl.getSelectedItem().equals( displayValues[row] ) )
                    {
                        if ( failedFieldTypes.length() > 0 )
                            failedFieldTypes.append( ", " );
                        failedFieldTypes.append( fieldTypes[i] );
                    }
View Full Code Here

Examples of com.sun.star.awt.XListBox

        tEnv.addObjRelation("MODEL", the_Model);

        // adding object relation for XItemListener
        ifc.awt._XItemListener.TestItemListener listener =
                new ifc.awt._XItemListener.TestItemListener();
        XListBox list = (XListBox) UnoRuntime.queryInterface(XListBox.class,
                                                             oObj);
        list.addItemListener(listener);
        tEnv.addObjRelation("TestItemListener", listener);

        XWindow forObjRel = (XWindow) UnoRuntime.queryInterface(XWindow.class,
                                                                aControl);
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.