Package com.scriptographer.adm

Examples of com.scriptographer.adm.PopupList


        }
      };
    }
    break;
    case LIST: {
      item = new PopupList(dialog, true) {
        protected void onChange() {
          selectedIndex = this.getSelectedEntry().getIndex();
          AdmComponentProxy.this.onChange(true);
        }
      };
View Full Code Here


    case BOOLEAN: {
      ((CheckBox) item).setChecked(ConversionUtils.toBoolean(value));
    }
    break;
    case LIST: {
      PopupList list = (PopupList) item;
      int index = selectedIndex != null ? selectedIndex : 0;
      for (int i = 0, l = list.size(); i < l; i++) {
        Object option = component.getOption(i);
        if (ConversionUtils.equals(value, option)) {
          index = i;
          break;
        }
View Full Code Here

  public boolean setSelectedIndex(Integer index, boolean callback) {
    selectedIndex = index;
    if (item == null)
      return false;
    // TODO: Handle index == null ?
    PopupList list = (PopupList) item;
    list.setSelectedEntry(list.get(index));
    return true;
  }
View Full Code Here

  }

  public void setOptions(Object[] options, Object current) {
    if (item == null)
      return;
    PopupList list = (PopupList) item;
    list.removeAll();
    if (options != null && options.length > 0) {
      int index = selectedIndex != null ? selectedIndex : 0;
      for (int i = 0; i < options.length; i++) {
        Object option = options[i];
        if (option.equals(current))
          index = i;
        ListEntry entry = null;
        if (option instanceof ListEntry) {
          entry = (ListEntry) option;
          entry = list.add(entry);
        } else {
          entry = new ListEntry(list);
          // Simplify names for art items
          String name = option instanceof com.scriptographer.ai.Item
              ? ((com.scriptographer.ai.Item) option).getName()
View Full Code Here

TOP

Related Classes of com.scriptographer.adm.PopupList

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.