Package DisplayProject

Examples of DisplayProject.DropListModel$SelectionChangeHandler


            // The current minimum width is the lower bound for any new minimum width.
            double minWidth = Math.max(butWidth + 15, AutoResizingComboBox.super.getMinimumSize().width);

            int numItems = getModel().getSize();
            boolean doResize = false;
            DropListModel model = null;
            if (AutoResizingComboBox.this.getModel() != null && AutoResizingComboBox.this.getModel() instanceof DropListModel) {
                model = (DropListModel)AutoResizingComboBox.this.getModel();
            }
            if (model == null || WidthPolicy.get(AutoResizingComboBox.this) != Constants.SP_EXPLICIT) {
                for (int i = 0; i < numItems; i++)
View Full Code Here


          // This latter situation is probably the more important situation, so we default the behaviour to this.
          elementConverter.setForceValidValue(true);
        }
       
        //SelectionInList selection = new SelectionInList(newList,elementConverter);
        comboBox.setModel(new DropListModel(newList, elementConverter, comboBox));
    }
View Full Code Here

    }

    public void actionPerformed(ActionEvent e) {
        if (e.getSource() instanceof AutoResizingComboBox) {
            AutoResizingComboBox cb = (AutoResizingComboBox)e.getSource();
            DropListModel model = (DropListModel)cb.getModel();

            if (model.isAdjusting() || !cb.isEnabled()) {
                return;
            }
            // TF:28/3/07: Editable comboboxes will post an afterValueChange event when they lose the
            // focus, because their value is not necessarily equal to their selected value. However,
            // in this case we'll have a data field that will post the AfterValueChange event for us.184157
View Full Code Here

    }
   
  public static FillInField newFillinField() {
      // CraigM:01/05/2008:Override the enabled, focusable, and paint methods, so we can draw the text as black if we are disabled but focusable
        FillInField cb = new FillInField();
        cb.setModel(new DropListModel(new Array_Of_ListElement<ListElement>(),cb));
        cb.setEditable(true);
        return cb;
    }
View Full Code Here

  public static DropList newDropList()
    {
        final DropList cb = new DropList();
        cb.setEditable(false);
        cb.setRenderer(new ForteSizedListElementCellRenderer());
        cb.setModel(new DropListModel(new Array_Of_ListElement<ListElement>(),cb));
        return cb;
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
  public static DropList newDropList(ListElement[] elements) {
        DropList cb = DropFillinFactory.newDropList();
        DropListModel model = new DropListModel(new Array_Of_ListElement(Arrays.asList(elements)),cb);
        cb.setModel(model);
        //cb.addActionListener(model);
        //cb.setModel(new DefaultComboBoxModel(elements));
        cb.setMaximumRowCount(elements.length);
        return cb;
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public static DropList newDropList(Array_Of_ListElement<ListElement> elements) {
      DropList cb = DropFillinFactory.newDropList();
      DropListModel model = new DropListModel(new Array_Of_ListElement(Arrays.asList(elements)),cb);
      cb.setModel(model);
      //cb.addActionListener(model);
      //cb.setModel(new DefaultComboBoxModel(elements));
      cb.setMaximumRowCount(elements.size());
      return cb;
View Full Code Here

                  }
              }
            }
        }
        else {
            comp.setModel(new DropListModel(les, comp));
        }
    }
View Full Code Here

        for (int i=0; i<comp.getModel().getSize(); i++) {
          if (comp.getModel().getElementAt(i) instanceof ListElement) {
            elements.add((ListElement)comp.getModel().getElementAt(i));
          }
        }
        comp.setModel(new DropListModel(elements, comp));
      }
      // TF:28/07/2009:Changed this to return the data from the underlying model. We cannot pass (ListField)comp as the
      // second parameter for historical reasons -- this get method was invoked directly from the main thread due to a
      // generator bug, and the solution admistered to the code was to have this method calling ElementList.get() indirectly.
      // If we pass (ListField)comp here, it will call ElementList.get(comp) which is this method and hence enters
View Full Code Here

                  }
              }
            }
        }
        else {
            comp.setModel(new DropListModel(les, comp));
        }
    }
View Full Code Here

TOP

Related Classes of DisplayProject.DropListModel$SelectionChangeHandler

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.