Package net.helipilot50.stocktrade.displayproject

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


        CloneHelper.cloneClientProperties(source, target);
        return target;
    }

    public static JTree cloneJTree(JTree source) {
        DisplayNode root = clone((DisplayNode) source.getModel().getRoot(), true);
        TreeViewModel dtm = new TreeViewModel(root);
        JTree target = new JTree(dtm);
        CloneHelper.cloneComponent(source, target, new String[] {"UI", // class javax.swing.plaf.TreeUI
                "UIClassID", // class java.lang.String
                "accessibleContext", // class javax.accessibility.AccessibleContext
View Full Code Here


    }
    if (elements == null){
      //PM:17/7/07 add a DropListModel with the correct data
      elements =((DropListModel)this.fif.getModel()).getElementList();
    }
    this.fif.setModel(new DropListModel(elements, this.fif));
    // TF:22/12/2009:DET-137: Added this to set the popup menu
    this.fif.setComponentPopupMenu(table.getComponentPopupMenu());
    // TF:11/11/2009:DET-126:Stop spurious AfterValueChangeEvents from occurring
    if (value == null) {
      this.fif.initialise("");
View Full Code Here

        }
        if (elements == null){
            //PM:17/7/07 add a DropListModel with the correct data
            elements =((DropListModel)this.comboBox.getModel()).getElementList();
        }
        aComboBox.setModel(new DropListModel(elements, aComboBox));
        // TF:17/07/07: Added check to ensure it's editable
        aComboBox.setEditable(this.comboBox.isEditable());
        if (isSelected)
        {
            aComboBox.setForeground(table.getSelectionForeground());
View Full Code Here

           
            if (pFIF.getBackground() != null)
                this.background = pFIF.getBackground();          
            if (pFIF.getForeground() != null)
                this.foreground = pFIF.getForeground();          
            this.fifCloned.setModel(new DropListModel(new Array_Of_ListElement<ListElement>(), this.fifCloned));
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
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

        Component result = super.getTableCellEditorComponent(table, value, isSelected, row, column);
       // AD:26/6/2008 Change JComboBox to AutoResizingComboBox to reduce casting later
        if (result instanceof AutoResizingComboBox) {
            AutoResizingComboBox cb = (AutoResizingComboBox)result;
            if (cb.getModel() instanceof DropListModel){
              DropListModel model = (DropListModel)cb.getModel();
             
                Array_Of_ListElement<ListElement> elements = null;
                if (rowElements != null){
                    //PM:10/8/07
                    /*
                     * customize the element list per row, if there is
                     * no customisation for the row
                     * use the default
                     */
                    elements = rowElements.get(row);
                }
                if (elements == null){
                    //PM:17/7/07 add a DropListModel with the correct data
                    elements = this.defaultElements;
                }
                cb.setModel(new DropListModel(elements, cb));
           
              if (value instanceof Integer) {
                  model.setIntegerValue(((Integer)value).intValue());
              }
              else if (value instanceof IntegerData) {
                  model.setIntegerValue(((IntegerData)value).intValue());
              }
              else if (value instanceof TextData) {
                  model.setTextValue((TextData)value);
              }
              else if (value instanceof String) {
                  model.setTextValue(new TextData((String)value));
              }
              else {
                  model.setObjectValue(value);
              }
            }
        }
        return result;
    }
View Full Code Here

                }
                if (elements == null){
                    //PM:17/7/07 add a DropListModel with the correct data
                    elements =((DropListModel)cb.getModel()).getElementList();
                }
                cb.setModel(new DropListModel(elements, cb));

                if (value instanceof DataValue && ((DataValue)value).isNull())
                    return result;

                for (int i = 0; i < cb.getModel().getSize(); i++)
View Full Code Here

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

    }
   
  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

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.