Package net.helipilot50.stocktrade.displayproject.controls

Examples of net.helipilot50.stocktrade.displayproject.controls.FillInField


     * rows is more than the passed value, the number of rows will be
     * set to the number of rows used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setRows(final int pRows) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setRows(" + pRows + ")";
            }
            @Override
View Full Code Here


     * columns is more than the passed value, the number of columns will be
     * set to the number of columns used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setColumns(final int pColumns) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setColumns(" + pColumns + ")";
            }
            @Override
View Full Code Here

        // TF:8/8/07:Made a shallow clone in case there is a really big object attached to the list element
        Array_Of_ListElement<ListElement> clonedList = CloneHelper.clone(les, false);
        Object currentValue = this.list.getValue();
        ListElement valueToReselect = null;
        if (currentValue instanceof ListElement && clonedList != null && this.list.getSelectionHolder() instanceof TypeAwareValueModel) {
          TypeAwareValueModel tavm = (TypeAwareValueModel)this.list.getSelectionHolder();
          // We need to find an item in the new list which is the same as an item in the old list,
          // depending on the type being considered. For example, if the list is mapped to an int,
          // we need to find an element in the new list with the same IntegerValue.
          Class<?> clazz = tavm.getValueType();
          ListElement currentSelection = (ListElement)currentValue;
          for (ListElement item : clonedList) {
            if (clazz.equals(Integer.TYPE) ||
                clazz.equals(Short.TYPE) ||
                NumericData.class.isAssignableFrom(clazz) ||
View Full Code Here

      }
      else if (list.getSelectionHolder() == null) {
        requiresDefault = true;
      }
      else {
        ValueModel model = list.getSelectionHolder();
        if (model instanceof TypeAwareValueModel) {
          if (DataValue.class.isAssignableFrom(((TypeAwareValueModel)model).getValueType())) {
            requiresDefault = false;
          }
          else {
            requiresDefault = true;
          }
        }
        else {
          requiresDefault = (model.getValue() == null);
        }
      }
      if (requiresDefault) {
        // TF:05/11/2008:Fixed this up so it actually sets the underlying model
        getSelectionModel().setSelectionInterval(0, 0);
View Full Code Here

    int height = this.fifOriginal.getMinimumSize().height;
    // TF:27/11/2009:Changed this to use the passed width
//    int width = this.fifOriginal.getMinimumSize().width;

    if (this.fifPainter == null) {
        this.fifPainter = new FillInField();
    }

    // TF:02/12/2009:Set the colours based on the current fillin field.
    this.fifPainter.setForeground(this.fifOriginal.getForeground());
    this.fifPainter.setBackground(this.fifOriginal.getBackground());
View Full Code Here

  }

    private static Object getArrayFieldProperty(Component pComp, String pProperty) {
        if (pComp != null) {
            if (pComp instanceof FillInField.BorderedComboBoxEditor.Editor) {
                FillInField fif = ((FillInField.BorderedComboBoxEditor.Editor)pComp).getFillInField();
                return fif.getClientProperty(pProperty);
            }
            else if (pComp instanceof JComponent) {
                return ((JComponent)pComp).getClientProperty(pProperty);
            }
        }
View Full Code Here

        super();
    }
   
  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

        return cb;
    }

    @SuppressWarnings("unchecked")
  public static FillInField newFillinField(ListElement[] elements) {
        FillInField cb = DropFillinFactory.newFillinField();
        cb.setElementList(new Array_Of_ListElement(Arrays.asList(elements)));

        return cb;
    }
View Full Code Here

        return cb;
    }

    @SuppressWarnings("unchecked")
    public static FillInField newFillinField(Array_Of_ListElement<ListElement> elements) {
      FillInField cb = DropFillinFactory.newFillinField();
      cb.setElementList(new Array_Of_ListElement(Arrays.asList(elements)));
     
      return cb;
    }
View Full Code Here

                    ((FixedLengthDocument)doc).setMaxLength(this.value);
                }
            }
            // TF:20/7/07: Made this work on a FillInField rather than a specific data model of a combo box
            else if (component instanceof FillInField) {
                FillInField jComboBox = (FillInField)component;
                jComboBox.setMaxCharacters(this.value);
            }
        }

    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.controls.FillInField

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.