Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.ArrayColumn


   
    // CraigM:01/05/2008:Use the total array collection (including invisible columns)
    ArrayList<ArrayColumn> allColumns = acm.getColumnList();

    for (int i = 0; i < allColumns.size(); i++){
            ArrayColumn col = allColumns.get(i);
            if (col.getTitleMsgNumber() > 0){
              String titleString = mcat.getString(setNumber, col.getTitleMsgNumber());
              col.setHeaderValue(titleString);
            }
        }
  }
View Full Code Here


     * @return integer index of the first visible column.
     */
    public int getFirstVisibleColumnIndex() {
        ArrayColumnModel acm = (ArrayColumnModel)this.table.getColumnModel();
        for (int i = 0; i < acm.getRealColumnCount(); i++){
            ArrayColumn col = (ArrayColumn)acm.getRealColumn(i);
          if (col.isVisible()) {
            return i;
          }
        }
    return -1;
  }
View Full Code Here

                  try {
                    // CraigM:22/08/2008 - Corrected checking of column.
                    // CraigM:07/11/2008 - Note: If an object was replaced that maps to 0 or more columns, then updatedColumn will be set to -1.
                    if (otm.table.getColumnModel() instanceof ArrayColumnModel) {
                      ArrayColumn ac = ((ArrayColumnModel)otm.table.getColumnModel()).findColumn(columnAttributeName);
                      if (ac != null) {
                        updatedColumn = ac.getModelIndex();
                      }
                    }
                  }
                  catch (Throwable e) {
                    // The data may not even be mapped to a column in the table
View Full Code Here

            // CraigM:16/06/2008 - Update the column model if we are in an array field
            ArrayField af = ArrayFieldCellHelper.getArrayField(this._component);

            if (af != null) {
              int col = ArrayFieldCellHelper.getArrayFieldColumn(this._component);
              ArrayColumn tc = (ArrayColumn)af.getColumnModel().getColumn(col);
              tc.setWidth(width);
              tc.setMinWidth(width);
              tc.setPreferredWidth(width);
              tc.setAssignedWidth(width);
            }
        }
    }
View Full Code Here

        MaxCharacters action = ActionMgr.getAction(comp, MaxCharacters.class);
        if (action != null) {
            return action.getValue();
        }
        int max = 0;
        ArrayColumn ac = (ArrayColumn)comp;
        if ((ac.getCellEditor() != null)
                && (ac.getCellEditor() instanceof JTextComponent)){
            Document doc = ((JTextComponent)ac.getCellEditor()).getDocument();
            if ((doc != null) && (doc instanceof FixedLengthDocument)){
                max = ((FixedLengthDocument)doc).getMaxLength();
            }
        } else {
            max = ac.getMaxCharacters();
        }
        return max;
    }
View Full Code Here

       
        // CraigM:18/10/2008 - If we are modifying a component which is in a grid in the array field, then this will not affect the column
        if (t != null && ArrayFieldCellHelper.isInGridFieldInArrayField(comp) == false) {
            int col = ArrayFieldCellHelper.getArrayFieldColumn((JComponent)comp);
            ArrayColumnModel model = (ArrayColumnModel) t.getColumnModel();
            ArrayColumn column = (ArrayColumn)model.getRealColumn(col);
            if (column != null) {
              // CraigM:17/10/2008 - If the component is not focusable (like TextFields), then don't allow it to be editable
              if (value && Focusable.is(comp)) {
                column.setEditable(true);
              }
              else {
                column.setEditable(false);
              }
            }
        }
        // TF:8/4/08:Removed the else test, so that the enabled state is set on both the
        // underlying widget and the column if the checkbox is in a column
View Full Code Here

        else if (comp instanceof ArrayField) {
          // TF:13/10/2009:Get our columns and process them as well
          ArrayField af = (ArrayField)comp;
          ArrayColumnModel model = (ArrayColumnModel)af.getColumnModel();
          for (int i = 0; i < model.getRealColumnCount(); i++) {
            ArrayColumn column = model.getRealColumn(i);
            Component childComp = column.getComponent();
            if (childComp != null) {
              // TF:29/10/2009:DET-123:Changed this to use processComponent to take into account the state of the child component.
              // set(childComp, state);
              processComponent(childComp, state);
            }
View Full Code Here

            return false;
        }
    }

    public void performAction() {
        ArrayColumn tc;
        // TF:5/11/08:If we're search by name, do a column lookup
        if (this.name != null) {
          ArrayColumnModel columnModel = (ArrayColumnModel)((JTable)this._component).getColumnModel();
          tc = columnModel.findColumn(this.name);
          if (tc == null) {
            // Nothing to do, couldn't find the column
            return;
          }
        }
        else {
          tc = ((ArrayColumnModel)((JTable)this._component).getColumnModel()).getRealColumn(column);
        }
        tc.setHeaderValue(title);
        TableModel model = ((JTable)_component).getModel();
        if (model instanceof ArrayFieldModel) {
          ((ArrayFieldModel)model).resizeTable();
        }
        // TF:29/3/08:Added a repaint to force the new change to reflect to the screen
View Full Code Here

        TextData title = null;
        ArrayColumnTitle action = (ArrayColumnTitle)ActionMgr.getAction(new ActionFilter(comp, columnName));
        if (action != null ) {
            title = TextData.getInstance(action.title);
        } else {
            ArrayColumn tc = ((ArrayColumnModel)comp.getColumnModel()).findColumnByName(columnName);

            title = TextData.getInstance(tc.getHeaderValue().toString());  
        }
        return title;
    }
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
            ArrayColumn qq_OrderListArray_SelectedForTrade_Column = new ArrayColumn("SelectedForTrade", 5, new CheckBoxCellRenderer(getqq_OrderListArray_SelectedForTrade()), new CheckBoxCellEditor(getqq_OrderListArray_SelectedForTrade()), true);
            qq_OrderListArray_SelectedForTrade_Column.setHeaderValue("Trade");
            qq_OrderListArray_SelectedForTrade_Column.setVisible(true);
            qq_OrderList.addColumn(qq_OrderListArray_SelectedForTrade_Column);

            //  === End column model ===

            TableFactory.postModelArrayField(qq_OrderList);
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.ArrayColumn

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.