Package DisplayProject

Examples of DisplayProject.ArrayColumnModel


   */
  public ArrayField cloneComponent() {
    ArrayField clone = TableFactory.newArrayField(this.getName(), this.getRowHeight());

    clone.setModel(this.getModel());
    clone.setColumnModel(new ArrayColumnModel());

    // This copyProperties was just copied from ListView, so it's probably not correct.
    CloneHelper.cloneComponent(this, clone, new String[]{"UI", // class javax.swing.plaf.PanelUI
        "UIClassID", // class java.lang.String
        "accessibleContext", // class javax.accessibility.AccessibleContext
View Full Code Here


   * Returns the total number of columns in the array including hidden columns
   * @return
   */
  //PM:1/5/08
  public int getRealColumnCount() {
    ArrayColumnModel cm = (ArrayColumnModel)getColumnModel();
    return cm.getRealColumnCount();
  }
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

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

        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

    setColumnSelectionAllowed(false);
    setName(name);
    if (rowHeight > 0){//PM:22/05/2008:fixed for express
      setRowHeight( rowHeight );
    }
    setColumnModel(new ArrayColumnModel()); //Added to reduce code generated
    setRowSelectionAllowed(true);
    setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    setSelectionBackground(UIutils.PaleYellow); // This is the pale yellow row highlight - If you want it yellow use: UIutils.PaleYellow
    setSelectionForeground(Color.BLACK);
    setIntercellSpacing(new Dimension()); // CraigM: 19/07/2007 - Remove the gaps between the rows
View Full Code Here

      // notify the Model that a new row has bee added
      ((ArrayFieldModel)this.getModel()).shouldIgnoreRowChange(e); //Required to prevent multiple AfterRowEntry events

      // CraigM:12/06/2008 - If they created a new row on a button column, create an event as if they had pressed the button
      ArrayColumnModel cm = (ArrayColumnModel)getColumnModel();

      // CraigM:26/06/2008 - Don't use the getRealColumn method as we have obtained this column from x,y coords
      Component comp = this.getColumnTemplate((ArrayColumn)cm.getColumn(col));

      // CraigM:25/07/2008 - Do this for DataFields as well
      if (comp instanceof TableJButton || comp instanceof DataField) {
        // CraigM:12/06/2008 - Create a new mouse event with x,y coords in the middle of the button
        e = new MouseEvent(comp,
View Full Code Here

   * The pCol parameter is a 1-based index which represents the real column in the array field
   * @param pCol
   * @return
   */
  public JComponent getColumnTemplate(int pCol) {
    ArrayColumnModel cm = (ArrayColumnModel)getColumnModel();
    //PM:28/4/08 corrected for real column
    return this.getColumnTemplate(cm.getRealColumn(pCol-1));
  }
View Full Code Here

   * @param column the 0-based index into the array column model (using the real model)
   * @return the TextGraphic used to render the column title.
   */
  public TextGraphic getColumnTitle(int column){
    //PM:28/4/08 corrected for real column
    ArrayColumnModel cm = (ArrayColumnModel)getColumnModel();
    // TF:3/7/08:Made this 0-based for consistency with Java, not 1-based as per Forte
    String title = cm.getRealColumn(column).getHeaderValue().toString();
    return (TextGraphic)getTableHeader().getDefaultRenderer().getTableCellRendererComponent(this, title, false, false, 0, column);

  }
View Full Code Here

   */
  public ArrayField cloneComponent() {
    ArrayField clone = TableFactory.newArrayField(this.getName(), this.getRowHeight());

    clone.setModel(this.getModel());
    clone.setColumnModel(new ArrayColumnModel());

    // This copyProperties was just copied from ListView, so it's probably not correct.
    CloneHelper.cloneComponent(this, clone, new String[]{"UI", // class javax.swing.plaf.PanelUI
        "UIClassID", // class java.lang.String
        "accessibleContext", // class javax.accessibility.AccessibleContext
View Full Code Here

TOP

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