Package DisplayProject

Examples of DisplayProject.ArrayColumn


            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

        super(table);
        this.column = column;
    }

    public void performAction() {
        ArrayColumn ac = (ArrayColumn)((ArrayColumnModel)((JTable)this._component).getColumnModel()).getColumn(column -1);
        ((JTable)this._component).getColumnModel().removeColumn(ac);
    }
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: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

       
        // 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

   
    // 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

        } else { // must be a JTable
            JTable table = (JTable)target;
            colModel = table.getColumnModel();
        }
        for (int col = 0; col < colModel.getColumnCount(); col ++){
            ArrayColumn ac = (ArrayColumn)colModel.getColumn(col);
            DefaultTableCellRenderer cr = (DefaultTableCellRenderer)ac.getHeaderRenderer();
            if (cr == null){
                cr = new DefaultTableCellRenderer();
                cr.setText(" ");
            }
            GridBagConstraints gbc = new GridBagConstraints();
View Full Code Here

TOP

Related Classes of 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.