Package DisplayProject.controls

Examples of DisplayProject.controls.AutoResizingComboBox$ComboBoxResizer


            return;
        }

        // CraigM:03/07/2008 - Added a special read only flag so combo boxes can be focusable but not editable.
        else if (comp instanceof AutoResizingComboBox) {
          AutoResizingComboBox autoResizingComboBox = (AutoResizingComboBox)comp;
          switch (state) {
          case Constants.FS_UPDATE:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, true);
            Visible.set(comp, true);
            Focusable.set(comp, true);
            removeSelectionListener(comp);
            break;
          case Constants.FS_DISABLED:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, false);
            Visible.set(comp, true);
            Focusable.set(comp, false);
            removeSelectionListener(comp);
            break;
          case Constants.FS_INVISIBLE:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, false);
            Visible.set(comp, false);
            Focusable.set(comp, false);
            removeSelectionListener(comp);
            break;
          case Constants.FS_VIEWONLY:
            autoResizingComboBox.setReadOnly(true);
            Enabled.set(comp, true);
            Visible.set(comp, true);
            Focusable.set(comp, true);
            removeSelectionListener(comp);
            break;
          case Constants.FS_INACTIVE:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, false);
            Visible.set(comp, true);
            Focusable.set(comp, false);
            removeSelectionListener(comp);
            break;
          case Constants.FS_SELECTONLY:
            // TF:08/11/2009:Changed this so it's not enabled
            autoResizingComboBox.setReadOnly(true);
            Enabled.set(comp, false);
            Visible.set(comp, true);
            Focusable.set(comp, false);
                // TF:27/04/2009:Changed this to use the new selection listener method
                addSelectionListener(comp);
View Full Code Here


            }
           
            // Now we've got the top level manager, we need to bind our component to it.
            if (topLevelManager != null) {
              if (newComponent instanceof AutoResizingComboBox) {
                AutoResizingComboBox box = (AutoResizingComboBox)newComponent;
                topLevelManager.bindComponent(box, BindingManager.getDataObjectPath(origComponent), ElementList.get(box));
              }
              else if (newComponent instanceof PaletteList) {
                PaletteList list = (PaletteList)newComponent;
                topLevelManager.bindComponent(list, BindingManager.getDataObjectPath(origComponent), ElementList.get(list));
View Full Code Here

                                                    int row,
                                                    int column) {
        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) {
View Full Code Here

        }
        /*
         * DropList and FillInFields
         */
        else if (comp instanceof AutoResizingComboBox) {
          AutoResizingComboBox acr = (AutoResizingComboBox)comp;
          Object oldValue = acr.getPreviousValue();
          s.push(new DropFillinFocus(acr, oldValue));
        }
        oldComp = comp;
        Container c = (Container)comp.getParent();
        if (c instanceof JComponent) {
View Full Code Here

            return;
        }

        // CraigM:03/07/2008 - Added a special read only flag so combo boxes can be focusable but not editable.
        else if (comp instanceof AutoResizingComboBox) {
          AutoResizingComboBox autoResizingComboBox = (AutoResizingComboBox)comp;
          switch (state) {
          case Constants.FS_UPDATE:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, true);
            Visible.set(comp, true);
            Focusable.set(comp, true);
            removeSelectionListener(comp);
            break;
          case Constants.FS_DISABLED:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, false);
            Visible.set(comp, true);
            Focusable.set(comp, false);
            removeSelectionListener(comp);
            break;
          case Constants.FS_INVISIBLE:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, false);
            Visible.set(comp, false);
            Focusable.set(comp, false);
            removeSelectionListener(comp);
            break;
          case Constants.FS_VIEWONLY:
            autoResizingComboBox.setReadOnly(true);
            Enabled.set(comp, true);
            Visible.set(comp, true);
            Focusable.set(comp, true);
            removeSelectionListener(comp);
            break;
          case Constants.FS_INACTIVE:
            autoResizingComboBox.setReadOnly(false);
            Enabled.set(comp, false);
            Visible.set(comp, true);
            Focusable.set(comp, false);
            removeSelectionListener(comp);
            break;
          case Constants.FS_SELECTONLY:
            // TF:08/11/2009:Changed this so it's not enabled
            autoResizingComboBox.setReadOnly(true);
            Enabled.set(comp, false);
            Visible.set(comp, true);
            Focusable.set(comp, false);
                // TF:27/04/2009:Changed this to use the new selection listener method
                addSelectionListener(comp);
View Full Code Here

        postEvent((JComponent)e.getSource());
    }

    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

TOP

Related Classes of DisplayProject.controls.AutoResizingComboBox$ComboBoxResizer

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.