Package com.sun.star.awt

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


        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

                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;
                    XControl xValueControl = CurUnoDialog.xDlgContainer.getControl(sControlNameTextValue);
                    XInterface xValueModel = (XInterface) UnoDialog.getModel(xValueControl);
View Full Code Here

        protected void setCondition(PropertyValue _filtercondition)
        {
            try
            {
                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

                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

  // deletes the first entry when this is equal to "DelEntryName"
  // returns true when a new item is selected
  public void deletefirstListboxEntry(String ListBoxName, String DelEntryName){ //, boolean[] bSelectItem){
  try{
      XControl xListControl  = xDlgContainer.getControl(ListBoxName);
      XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xListControl);
      String FirstItem = xListBox.getItem((short) 0);
      if (FirstItem.equals(DelEntryName)){
    short SelPos = xListBox.getSelectedItemPos();
        xListBox.removeItems((short) 0, (short) 1);
        if (SelPos > 0){   
//      bSelectItem[0] = true;
      assignPropertyToDialogControl(ListBoxName, "SelectedItems", new short[SelPos]);
      xListBox.selectItemPos((short) (SelPos-1), true);
        }
      }
//      bSelectItem[0] = true;
  }
  catch (Exception exception){
View Full Code Here

      Multistatus multistatus = davReport.getMultistatus();
      responses = multistatus.getResponses();

      Collections.sort(responses, new VersionComparer());

      XListBox xListBox =
               (XListBox) UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl(LST_VERSIONS));
      xListBox.removeItems((short) 0, xListBox.getItemCount());

      for (int i = responses.size() - 1; i >= 0; i--)
      {
         ResponseDoc curResponse = responses.get(i);
         xListBox.addItem(formatLine(curResponse), (short) 0);
      }

      return true;
   }
View Full Code Here

   protected void doOpenVersion()
   {
      try
      {
         XListBox xListBox =
                  (XListBox) UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl(LST_VERSIONS));
         short selectedItem = xListBox.getSelectedItemPos();
         if (selectedItem < 0)
         {
            return;
         }
View Full Code Here

               }

               break;

            case Component.XTYPE_XLISTBOX :
               XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, compObject);
               if (listener instanceof XActionListener)
               {
                  xListBox.addActionListener((XActionListener) listener);
               }

               break;
         }
      }
View Full Code Here

      return fileItem;
   }

   protected void fillItemsList()
   {
      XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl(LST_ITEMS));
      xListBox.removeItems((short) 0, xListBox.getItemCount());

      for (int i = responses.size() - 1; i >= 0; i--)
      {
         ResponseDoc response = responses.get(i);
         xListBox.addItem(formatResponseLine(response), (short) 0);
      }
   }
View Full Code Here

TOP

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

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.