Package net.helipilot50.stocktrade.displayproject.table

Examples of net.helipilot50.stocktrade.displayproject.table.FormattedCellRenderer


                null); // null value
        dataField.setFormatterFactory(factory);
        if (dataField.getTable() != null) {
            JTable table = dataField.getTable();
            ArrayColumn ac = (ArrayColumn) table.getColumnModel().getColumn(dataField.getTableColumn());
            ac.setCellRenderer(new FormattedCellRenderer(nf, SwingUtilities.LEFT));
        }
    }
View Full Code Here


      TableColumn column = getColumnModel().getColumn(columnAtPoint);
      if (column instanceof ArrayColumn) {
        ArrayColumn arrayColumn = (ArrayColumn) column;
        TableCellRenderer renderer = arrayColumn.getRenderer();
        if (renderer instanceof FormattedCellRenderer) {
          FormattedCellRenderer formatedRenderer = (FormattedCellRenderer) renderer;
          statusTextValue = (TextData) formatedRenderer.getDataFieldOriginalComponent().getClientProperty(StatusText.cSTATUS_TEXT);
        } else if (renderer instanceof ComboBoxCellRenderer) {
          statusTextValue = (TextData) ((ComboBoxCellRenderer)renderer).getComboBox().getClientProperty(StatusText.cSTATUS_TEXT);
        } else {
          Component tableCellRendererComponent = renderer.getTableCellRendererComponent(ArrayField.this, null, false, false, 0, 0);
          if (tableCellRendererComponent instanceof JComponent) {
View Full Code Here

            qq_OrderList.setVisibleRows(8);

            //  === Column model setup ===

            // CustomerName converted from qqds_DataField
            ArrayColumn qq_OrderListArray_CustomerName_Column = new ArrayColumn("CustomerName", 0, new FormattedCellRenderer(getqq_OrderListArray_CustomerName()), new FormattedCellEditor(getqq_OrderListArray_CustomerName()), false);
            qq_OrderListArray_CustomerName_Column.setHeaderValue("CustomerName");
            qq_OrderListArray_CustomerName_Column.setVisible(true);
            qq_OrderList.addColumn(qq_OrderListArray_CustomerName_Column);

            // StockName converted from qqds_DataField
            ArrayColumn qq_OrderListArray_StockName_Column = new ArrayColumn("StockName", 1, new FormattedCellRenderer(getqq_OrderListArray_StockName()), new FormattedCellEditor(getqq_OrderListArray_StockName()), true);
            qq_OrderListArray_StockName_Column.setHeaderValue("StockName");
            qq_OrderListArray_StockName_Column.setVisible(true);
            qq_OrderList.addColumn(qq_OrderListArray_StockName_Column);

            // Quantity converted from qqds_DataField
            ArrayColumn qq_OrderListArray_Quantity_Column = new ArrayColumn("Quantity", 2, new FormattedCellRenderer(getqq_OrderListArray_Quantity()), new FormattedCellEditor(getqq_OrderListArray_Quantity()), true);
            qq_OrderListArray_Quantity_Column.setHeaderValue("Quantity");
            qq_OrderListArray_Quantity_Column.setVisible(true);
            qq_OrderList.addColumn(qq_OrderListArray_Quantity_Column);

            // Price converted from qqds_DataField
            ArrayColumn qq_OrderListArray_Price_Column = new ArrayColumn("Price", 3, new FormattedCellRenderer(getqq_OrderListArray_Price()), new FormattedCellEditor(getqq_OrderListArray_Price()), true);
            qq_OrderListArray_Price_Column.setHeaderValue("Price");
            qq_OrderListArray_Price_Column.setVisible(true);
            qq_OrderList.addColumn(qq_OrderListArray_Price_Column);

            // Type converted from qqds_DataField
            ArrayColumn qq_OrderListArray_Type_Column = new ArrayColumn("Type", 4, new FormattedCellRenderer(getqq_OrderListArray_Type()), new FormattedCellEditor(getqq_OrderListArray_Type()), true);
            qq_OrderListArray_Type_Column.setHeaderValue("Type");
            qq_OrderListArray_Type_Column.setVisible(true);
            qq_OrderList.addColumn(qq_OrderListArray_Type_Column);

            // SelectedForTrade converted from qqds_ToggleField
View Full Code Here

            qq_CustomerGrid_HoldingList.setVisibleRows(5);

            //  === Column model setup ===

            // StockName converted from qqds_DataField
            ArrayColumn qq_CustomerGrid_HoldingListArray_StockName_Column = new ArrayColumn("StockName", 0, new FormattedCellRenderer(getqq_CustomerGrid_HoldingListArray_StockName()), new FormattedCellEditor(getqq_CustomerGrid_HoldingListArray_StockName()), true);
            qq_CustomerGrid_HoldingListArray_StockName_Column.setHeaderValue("StockName");
            qq_CustomerGrid_HoldingListArray_StockName_Column.setVisible(true);
            qq_CustomerGrid_HoldingList.addColumn(qq_CustomerGrid_HoldingListArray_StockName_Column);

            // Quantity converted from qqds_DataField
            ArrayColumn qq_CustomerGrid_HoldingListArray_Quantity_Column = new ArrayColumn("Quantity", 1, new FormattedCellRenderer(getqq_CustomerGrid_HoldingListArray_Quantity()), new FormattedCellEditor(getqq_CustomerGrid_HoldingListArray_Quantity()), true);
            qq_CustomerGrid_HoldingListArray_Quantity_Column.setHeaderValue("Quantity");
            qq_CustomerGrid_HoldingListArray_Quantity_Column.setVisible(true);
            qq_CustomerGrid_HoldingList.addColumn(qq_CustomerGrid_HoldingListArray_Quantity_Column);

            // Price converted from qqds_DataField
            ArrayColumn qq_CustomerGrid_HoldingListArray_Price_Column = new ArrayColumn("Price", 2, new FormattedCellRenderer(getqq_CustomerGrid_HoldingListArray_Price()), new FormattedCellEditor(getqq_CustomerGrid_HoldingListArray_Price()), true);
            qq_CustomerGrid_HoldingListArray_Price_Column.setHeaderValue("Price");
            qq_CustomerGrid_HoldingListArray_Price_Column.setVisible(true);
            qq_CustomerGrid_HoldingList.addColumn(qq_CustomerGrid_HoldingListArray_Price_Column);

            //  === End column model ===
View Full Code Here

              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here

    // We're already closed, just discard the result set if any
    resultSet = null;
  }
 
  public boolean execute() throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute());
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

    });
    return updateCount;
  }

  public boolean execute(final String sql) throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute(sql));
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

    });
    return result.getValue();
  }

  public boolean execute(final String sql, final int autoGeneratedKeys) throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute(sql, autoGeneratedKeys));
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

              cachedRowSet.updateDouble(pColOrdinal, doubleValue.getDoubleValue());
            } else if (pValue instanceof DecimalData) {
              DecimalData value = (DecimalData) pValue;
              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here

      lastCID = id;
    }
    //PM:04/09/2008:Adding modifiable config instruments as operations
    protected void addCommandForAttribute(Instrument inst){
      if (inst instanceof ConfigValueInst){
        CommandDesc desc = new CommandDesc();
            desc.setCmdName("set" + inst.Name.asString());
            desc.setArgDesc("s");
            desc.setCmdIndex((short) (getLastCID() + 1000 + inst.getInstrumentID()));
            desc.setHelpText("set the value of " + inst.Name.asString());
            desc.setCmdFlags((short)1);
            desc.setArgNames("set " + inst.getName());
            desc.setGroupName("");
            desc.setMenuString("Utility");
        processOneCommandDescriptor(desc);
      }
    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.table.FormattedCellRenderer

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.