Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.ArrayColumnModel


   * @param setNumber
   * @param mcat
   */
  //PM:23/4/08
  public void loadColumnHeadings(int setNumber, MsgCatalog mcat) {
    ArrayColumnModel acm = (ArrayColumnModel)this.table.getColumnModel();
   
    // 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());
View Full Code Here


    /**
     * Determine the index of the first visible column. If no visible column is found, this method returns -1
     * @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

        JTable t = ArrayFieldCellHelper.getArrayField(comp);
       
        // 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);
              }
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

    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;
          }
        }
View Full Code Here

        // TF:22/11/07:If this component is a template for an array column, get the array column first
        ArrayColumn column = this.column;
        JTable t = ArrayFieldCellHelper.getArrayField(this._component);
        if (t != null) {
            int col = ArrayFieldCellHelper.getArrayFieldColumn((JComponent)this._component);
            ArrayColumnModel model = (ArrayColumnModel) t.getColumnModel();
            column = (ArrayColumn)model.getRealColumn(col);
        }

        switch (this.colourType) {
        case cBACKGROUND:
            if (column != null) {
View Full Code Here

        CloneHelper.cloneClientProperties(source, target);
        return target;
    }

    public static JTree cloneJTree(JTree source) {
        DisplayNode root = clone((DisplayNode) source.getModel().getRoot(), true);
        TreeViewModel dtm = new TreeViewModel(root);
        JTree target = new JTree(dtm);
        CloneHelper.cloneComponent(source, target, new String[] {"UI", // class javax.swing.plaf.TreeUI
                "UIClassID", // class java.lang.String
                "accessibleContext", // class javax.accessibility.AccessibleContext
View Full Code Here

        this.editor = new BorderedComboBoxEditor();
        this.setEditor(this.editor);
        this.setRenderer(new BorderedComboBoxRenderer());
        JTextComponent comp = (JTextComponent)this.editor.getEditorComponent();
        comp.setBackground(this.getBackground());
        comp.setDocument(new FixedLengthDocument(0));

        comp.addKeyListener(new ComboBoxKeyHandler());
    }
View Full Code Here

            }
            if (autoComplete) {
                editComponent.setDocument(new FillinManagementDocument(this, showDropdowns, listEntriesOnly, maxCharacters));
            }
            else {
                editComponent.setDocument(new FixedLengthDocument(maxCharacters));
            }
        }
    }
View Full Code Here

        target.setPreferredSize(source.isPreferredSizeSet() ? source.getPreferredSize() : null);
        target.setMinimumSize(source.isMinimumSizeSet() ? source.getMinimumSize() : null);
        target.setMaximumSize(source.isMaximumSizeSet() ? source.getMaximumSize() : null);
       
        if (source instanceof JComponent) {
          GridCell orig = GridCell.getExisting((JComponent)source);
          if (orig != null) {
            GridCell cell = GridCell.get((JComponent)target);
            cell.setWidthPolicy(orig.getWidthPolicy());
            cell.setHeightPolicy(orig.getHeightPolicy());
          }
          // TF:03/11/2008:We need to clone specific client properties too, otherwise some things won't work.
          ArrayFieldCellHelper.cloneComponentArrayParts((JComponent)source, (JComponent)target);
        }
    }
View Full Code Here

TOP

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

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.