Example #1
0
 public void redraw() {
   super.redraw();
   text.redraw();
   arrow.redraw();
   if (icon != null) icon.redraw();
   if (popup.isVisible()) list.redraw();
 }
  private void refresh() {
    wSelection.removeAll();

    for (int i = 0; i < choices.length; i++) {
      if (quickSearch) {
        if (wbRegex.getSelection()) {
          // use regex
          if (pattern != null) {
            Matcher matcher = pattern.matcher(choices[i]);
            if (matcher.matches()) {
              wSelection.add(choices[i]);
            }
          } else {
            wSelection.add(choices[i]);
          }
        } else {
          if (filterString != null) {
            if (choices[i].toUpperCase().contains(filterString)) {
              wSelection.add(choices[i]);
            }
          } else {
            wSelection.add(choices[i]);
          }
        }
      } else {
        wSelection.add(choices[i]);
      }
    }
    wSelection.redraw();
    /*
     * selectedNrs = new int[] {}; if (selectedNrs!=null){ wSelection.select(selectedNrs); wSelection.showSelection(); }
     */
  }
 public void propertyChange(PropertyChangeEvent evt) {
   super.propertyChange(evt);
   valueProvider.removeValueChangeListener(this);
   if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
     elements = null;
     if (list != null) {
       list.setItems(getItems());
       list.redraw();
     }
   }
   valueProvider.addValueChangeListener(this);
 }