Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.DropListModel$SelectionChangeHandler


    }

    @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

          // 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

        @SuppressWarnings("unchecked")
    public void performAction() {
          try {
              if (this.bg == null){
                  if (this._component instanceof JComboBox){
                      DropListModel dlm = (DropListModel)((JComboBox)this._component).getModel();
                      dlm.setSelectedIndex(value-1);
                  }
                  else if (this._component instanceof RadioList) {
                    // TF:23/07/2008:Changed this to use the radio list instead of the model to make the code cleaner
                      ((RadioList)this._component).setIndexValue(value-1);
                  }
View Full Code Here

        this.editor = new BorderedComboBoxEditor();
        this.setEditor(this.editor);
        this.setRenderer(new BorderedComboBoxRenderer());
        JTextComponent comp = (JTextComponent)this.editor.getEditorComponent();
        comp.setBackground(this.getBackground());
        comp.setDocument(new FixedLengthDocument(0));

        comp.addKeyListener(new ComboBoxKeyHandler());
    }
View Full Code Here

            }
            if (autoComplete) {
                editComponent.setDocument(new FillinManagementDocument(this, showDropdowns, listEntriesOnly, maxCharacters));
            }
            else {
                editComponent.setDocument(new FixedLengthDocument(maxCharacters));
            }
        }
    }
View Full Code Here

        target.setPreferredSize(source.isPreferredSizeSet() ? source.getPreferredSize() : null);
        target.setMinimumSize(source.isMinimumSizeSet() ? source.getMinimumSize() : null);
        target.setMaximumSize(source.isMaximumSizeSet() ? source.getMaximumSize() : null);
       
        if (source instanceof JComponent) {
          GridCell orig = GridCell.getExisting((JComponent)source);
          if (orig != null) {
            GridCell cell = GridCell.get((JComponent)target);
            cell.setWidthPolicy(orig.getWidthPolicy());
            cell.setHeightPolicy(orig.getHeightPolicy());
          }
          // TF:03/11/2008:We need to clone specific client properties too, otherwise some things won't work.
          ArrayFieldCellHelper.cloneComponentArrayParts((JComponent)source, (JComponent)target);
        }
    }
View Full Code Here

                    ((TitledBorder) border).setTitle("");
                }
            } else {
                if (pCaption != null) {
                    // TitledBorder tb = BorderFactory.createTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    TitledBorder tb = new GridTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    if (this.captionFont != null) {
                        tb.setTitleFont(this.captionFont);
                    }
                    setBorder(tb);
                }
            }
        } else {
          GridTitledBorder gridBorder;
            if (pCaption != null) {
              gridBorder = new GridTitledBorder(pCaption.toString());
            } else {
              gridBorder = new GridTitledBorder("");
            }
            if (this.captionFont != null) {
              gridBorder.setTitleFont(this.captionFont);
            }
            setBorder(gridBorder);
        }
    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.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.