Package DisplayProject

Examples of DisplayProject.DropListModel


        }
        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

    }
    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

        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

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

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

                }
                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

        }
        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

TOP

Related Classes of DisplayProject.DropListModel

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.