Examples of PopupList


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

Examples of com.scriptographer.adm.PopupList

    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

Examples of com.scriptographer.adm.PopupList

  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

Examples of com.scriptographer.adm.PopupList

  }

  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

Examples of org.eclipse.swt.custom.PopupList

      return;
    } catch (IOException e) {
      return;
    }

    PopupList popupList = new PopupList(control.getShell());
    String[] items = { "Open in new window..." };
    popupList.setItems(items);
    int HACK_MARGIN = 30;
    Point absPoint = getAbsoluteLocation(control, event.x, event.y + HACK_MARGIN);
    Rectangle rect = new Rectangle(absPoint.x, absPoint.y, 150, 25);
    control.setToolTipText("");
    String res = popupList.open(rect);

    // code to open selected file, by location or by name
    if (null != res) {
      if ((inputDescription instanceof URISpecifier) ||
          isJmsDescriptor(inputDescription)) {
View Full Code Here

Examples of org.eclipse.swt.custom.PopupList

      return;
    } catch (IOException e) {
      return;
    }

    PopupList popupList = new PopupList(control.getShell());
    String[] items = { "Open in new window..." };
    popupList.setItems(items);
    int HACK_MARGIN = 30;
    Point absPoint = getAbsoluteLocation(control, event.x, event.y + HACK_MARGIN);
    Rectangle rect = new Rectangle(absPoint.x, absPoint.y, 150, 25);
    control.setToolTipText("");
    String res = popupList.open(rect);

    // code to open selected file, by location or by name
    if (null != res) {
      if (inputDescription instanceof URISpecifier)
        editor.openTextEditor(path);
View Full Code Here

Examples of org.eclipse.swt.custom.PopupList

      return;
    } catch (IOException e) {
      return;
    }

    PopupList popupList = new PopupList(control.getShell());
    String[] items = { "Open in new window..." };
    popupList.setItems(items);
    int HACK_MARGIN = 30;
    Point absPoint = getAbsoluteLocation(control, event.x, event.y + HACK_MARGIN);
    Rectangle rect = new Rectangle(absPoint.x, absPoint.y, 150, 25);
    control.setToolTipText("");
    String res = popupList.open(rect);

    // code to open selected file, by location or by name
    if (null != res) {
      if ((inputDescription instanceof URISpecifier) ||
          isJmsDescriptor(inputDescription)) {
View Full Code Here

Examples of org.eclipse.swt.custom.PopupList

      return;
    } catch (IOException e) {
      return;
    }

    PopupList popupList = new PopupList(control.getShell());
    String[] items = { "Open in new window..." };
    popupList.setItems(items);
    int HACK_MARGIN = 30;
    Point absPoint = getAbsoluteLocation(control, event.x, event.y + HACK_MARGIN);
    Rectangle rect = new Rectangle(absPoint.x, absPoint.y, 150, 25);
    control.setToolTipText("");
    String res = popupList.open(rect);

    // code to open selected file, by location or by name
    if (null != res) {
      if (inputDescription instanceof URISpecifier)
        editor.openTextEditor(path);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.