Package com.sun.star.awt

Examples of com.sun.star.awt.XComboBox


               }

               break;

            case Component.XTYPE_XCOMBOBOX :
               XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, compObject);

               if (listener instanceof ActionListener)
               {
                  xComboBox.addActionListener((XActionListener) listener);
               }
               else if (listener instanceof ItemListener)
               {
                  xComboBox.addItemListener((XItemListener) listener);
               }

               break;

            case Component.XTYPE_XLISTBOX :
View Full Code Here


            }

            Collections.sort(responses, new Comparer());
            fillItemsList();

            XComboBox xComboBox =
                     (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControlContainer.getControl(COMBO_PATH));
            xComboBox.addItem(currentHref, (short) 0);

            XTextComponent xComboText =
                     (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xControlContainer
                              .getControl(COMBO_PATH));
            xComboText.setText(currentHref);
View Full Code Here

      return getTypedFileInfo(fileName);
   }

   public String[] getTypedFileInfo(String fileName) throws DialogException
   {
      XComboBox xComboType =
               (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControlContainer.getControl(COMBO_TYPE));

      String comboText = getEditFilterValue();

      int index = -1;

      for (int i = 0; i < xComboType.getItemCount(); i++)
      {
         String comboValue = xComboType.getItem((short) i);
         if (comboValue.equals(comboText))
         {
            index = i;
            break;
         }
View Full Code Here

         return false;
      }

      try
      {
         XComboBox xComboType =
                  (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControlContainer.getControl(COMBO_TYPE));

         ArrayList<FilterType> filters = filterLoader.getFilterTypes(currentModelName);
         if (filters.size() != 0)
         {
            for (int i = filters.size() - 1; i >= 0; i--)
            {
               FilterType currentFilter = filters.get(i);
               String filterStr = currentFilter.getLocalizedName() + " [." + currentFilter.getFileExtension() + "]";
               xComboType.addItem(filterStr, (short) 0);
               if (i == 0)
               {
                  setEditFilterValue(filterStr);
               }
            }
View Full Code Here

        }
    }

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

TOP

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

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.