Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.DataField$RollbackAction


     * Provided for backwards compatibility.
     * @param pFormat
     * @param pAlignment
     */
    public FormattedCellRenderer(Format pFormat, int pAlignment) {
      this(new DataField(pFormat));
      this.dataFieldCloned.setHorizontalAlignment(pAlignment);
    this.dataFieldCloned.getCaret().setVisible(false);
    }
View Full Code Here


     * Provided for backwards compatibility.
     * @param pFormat
     * @param pAlignment
     */
    public FormattedCellRenderer(DefaultFormatter pFormat, int pAlignment) {
      this(new DataField(pFormat));
      this.dataFieldCloned.setHorizontalAlignment(pAlignment);
    }
View Full Code Here

    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {
     
      // This null check is for the visual editors
      if (this.dataFieldCloned == null) {
        this.dataFieldCloned = new DataField();
        this.dataFieldOriginal = new DataField();
      }
     
      //PM:29/4/08 Set correct border
      this.dataFieldCloned.setBorder(this.dataFieldOriginal.getBorder());
View Full Code Here

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

    if (this.dataFieldPainter == null) {
        this.dataFieldPainter = new DataField();
      }
    this.dataFieldPainter.setForeground(this.dataFieldOriginal.getForeground());
    this.dataFieldPainter.setBackground(this.dataFieldOriginal.getBackground());
    this.dataFieldPainter.setBorder(this.dataFieldOriginal.getBorder());
   
View Full Code Here

       * We now use a clone of the DataField
       * This may cause missing events
       */
      // This null check is for the visual editors
      if (this.dataFieldCloned == null) {
        this.dataFieldCloned = new DataField();
        this.dataFieldOriginal = new DataField();
      }
        this.dataFieldCloned.setLastValue(null);
        this.dataFieldCloned.setValue(value);
        this.dataFieldOriginal.setTable(table);
        this.dataFieldOriginal.setTableColumn(column);
View Full Code Here

        if (this.getState() != Constants.FS_UPDATE) {
          this.cancelCellEditing();
          return true;
         
        }
        DataField df = this.dataFieldCloned;

        try
        {
            // Force the textfield to commit it itself. Even though a focus lost event
            // will usually cause this, when used inside a jtable, this event is NOT
            // processed until after the cell editors getCellEditorValue is called.
            df.commitEdit();
        }
        catch (ParseException e)
        {
            // Unable to format so stop editing
            return false;
        }

        if (!df.getInputVerifier().verify(df)) {
            return false;

        }
      fireEditingStopped();
      resetTableData(this.dataFieldOriginal, this.dataFieldCloned);
View Full Code Here

    }

    public void cancelCellEditing()
    {
        logger.debug("cancelCellEditing()");
        DataField df = (DataField)getComponent();
        resetTableData(this.dataFieldOriginal, this.dataFieldCloned);
        df.disableEvents();
        super.cancelCellEditing();

    }
View Full Code Here

     * value model (and it probably should be) then the underlying type of the bound property
     * will be set as the mapped type on the underlying formatter factory
     */
    public void bind(JComponent control, ValueModel valueModel)
    {   
        DataField df = (DataField)control;
        if (valueModel instanceof TypeAwareValueModel) {
            TypeAwareValueModel value = (TypeAwareValueModel)valueModel;
            AbstractFormatterFactory aff = df.getFormatterFactory();
            if (aff != null && aff instanceof DataFieldFormatterFactory) {
                ((DataFieldFormatterFactory)aff).setMappedType(value.getValueType());
            }
        }
        Bindings.bind(df, valueModel);
View Full Code Here

     *
     * @param allowsNull Indicates weather a null value is allowed, used with Nullable Data types
     * @return
     */
    public static DataField newDataField(String name, int columns, int MaskType, boolean allowsNull){
        DataField df = newDataField(name, columns, MaskType);
        df.setNullValueAllowed(allowsNull);
        return df;
    }
View Full Code Here

     * <li> Constants.MK_TEMPLATE</li>
     * <li> Constants.MK_UPPERCASE</li>
     *
     */
    public static DataField newDataField(String name, int columns, int maskType){
        DataField df = newDataField(name, columns);
        df.setMaskType(maskType);
        df.setInputVerifier(new DataFieldVerifier());
        return df;
    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.DataField$RollbackAction

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.