Package DisplayProject

Source Code of DisplayProject.ArrayColumn

/*
Copyright (c) 2003-2009 ITerative Consulting Pty Ltd. All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:

o Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
 
o Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
   
o This jcTOOL Helper Class software, whether in binary or source form may not be used within,
or to derive, any other product without the specific prior written permission of the copyright holder

 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


*/
package DisplayProject;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;

import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;

import DisplayProject.controls.TextGraphic;
import DisplayProject.table.AlignedCellRenderer;
import DisplayProject.table.ArrayFieldCellEditor;
import DisplayProject.table.ArrayFieldCellRenderer;
import DisplayProject.table.ArrayFieldTableCellEditor;
import DisplayProject.table.StateColourForRow;
import DisplayProject.table.StateColourForRowDisplayer;
import Framework.MsgCatalog;
import Framework.TextData;

/**
* This class represents the column template for an Forte ArrayField
*/
@SuppressWarnings("serial")
public class ArrayColumn extends TableColumn {
  private boolean editable = true;
    private boolean defaultEditable = true;
    private String name = "";
    private TextData title;

    private int headerLines = 1;
    private int titleMsgNumber = 0;
    private int titleSetNumber = 0;
    private boolean skipOnTab = false; // CraigM: 31/01/2008
    private int headerHorizontalAlignment = SwingConstants.CENTER; // CraigM: 25/03/2008
    private int headerVerticalAlignment = SwingConstants.CENTER; // CraigM: 25/03/2008
    private Font headerFont = null; // CraigM: 25/03/2008
    private Color headerForeground = null; // CraigM: 25/03/2008
    private boolean headerEnabled = true; // COLET 13/01/2009 flag for header cell renderer.

    protected ArrayColumnModel myModel = null;
    private boolean visible = true;
    private int maxCharacters = 0;

    private TableCellEditor editor;

    private TableCellRenderer renderer;
  private float columnWeight = 0.0f;
  protected StateColourForRow stateColour;

  /**
   * The assigned width is the width of the column when it was first assigned. The array column cannot
   * shrink smaller than this. This differs to the minWidth, because a column will expand it's minimum
   * size to be the larger of the heading width and the assigned column. Should the heading then shrink
   * back down to something smaller than the assigned width, the column will reduce back down to this size.
   */
  protected int assignedWidth = 0;

    /**
     * The size policy of the column. This is FP_DEFAULT by default
     */
    protected int sizePolicy = Constants.FP_DEFAULT;

    /**
     * The name of the underlying column in a display node if this table is mapped to a display node. May be null
     */
    protected String boundColumn = null;

    public ArrayColumn() {
        super();
    }

    /**
     *
     * @param name - Column Name
     * @param modelIndex - Permanent Column position, zero based
     */
    public ArrayColumn(String name, int modelIndex) {
        super(modelIndex);
        this.name = name;
    }

    /**
     *
     * @param name - Column Name
     * @param modelIndex - Permanent Column position, zero based
     * @param TitleMsgNum - Title Message number. This is the original Forte message title number and is used as a key to access the title text as a property in the resource bundel.
     */
    public ArrayColumn(String name, int modelIndex, Integer TitleMsgNum) {
        super(modelIndex);
        this.name = name;
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    /**
     *
     * @param name - Column Name
     * @param modelIndex - Permanent Column position, zero based
     * @param width - Column width
     */
    public ArrayColumn(String name, int modelIndex, int width) {
        super(modelIndex, width);
        this.assignedWidth = width;
        this.setMinWidth(width);
        this.name = name;
    }

    /**
     *
     * @param name Column Name
     * @param modelIndex Permanent Column position, zero Based
     * @param width Column Width
     * @param TitleMsgNum Title message number
     */
    public ArrayColumn(String name, int modelIndex, int width,
            Integer TitleMsgNum) {
        this(name, modelIndex, width);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param editable
     */
    public ArrayColumn(String name, int modelIndex, boolean editable) {
        this(name, modelIndex);
        this.setEditable(editable);
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param editable
     * @param TitleMsgNum
     */
    public ArrayColumn(String name, int modelIndex, boolean editable,
            Integer TitleMsgNum) {
        this(name, modelIndex, editable);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param cellRenderer
     */
    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer) {
        super(modelIndex, width);
        this.assignedWidth = width;
        this.setMinWidth(width);
        this.name = name;
        setRenderer(cellRenderer);
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param cellRenderer
     * @param TitleMsgNum
     */
    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, Integer TitleMsgNum) {
        this(name, modelIndex, width, cellRenderer);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param cellRenderer
     * @param editable
     */
    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, boolean editable) {
        this(name, modelIndex, width, cellRenderer, null, editable);
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param cellRenderer
     * @param editable
     * @param TitleMsgNum
     */
    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, boolean editable,
            Integer TitleMsgNum) {
        this(name, modelIndex, width, cellRenderer, editable);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param cellRenderer
     * @param cellEditor
     */
    @Deprecated // CraigM:04/12/2008 - We should always supply if it is editable, and not supply the width
    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, TableCellEditor cellEditor) {
        super(modelIndex, width);
        this.assignedWidth = width;
        this.setMinWidth(width);
        this.name = name;
        setEditor(cellEditor);
        setRenderer(cellRenderer);

        if (cellRenderer instanceof DefaultTableCellRenderer){
            DefaultTableCellRenderer dtce = (DefaultTableCellRenderer)cellRenderer;
            this.setAlignment(UIutils.javaAlignementToForte(dtce.getHorizontalAlignment()));
        }
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param cellRenderer
     * @param cellEditor
     * @param TitleMsgNum
     */
    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, TableCellEditor cellEditor,
            Integer TitleMsgNum) {
        this(name, modelIndex, width, cellRenderer, cellEditor);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param editable
     */
    public ArrayColumn(String name, int modelIndex, int width, boolean editable) {
        this(name, modelIndex, width);
        this.setEditable(editable);
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param editable
     * @param TitleMsgNum
     */
    public ArrayColumn(String name, int modelIndex, int width,
            boolean editable, Integer TitleMsgNum) {
        this(name, modelIndex, width, editable);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    /**
     * Main constructor used for ArrayField columns.  CraigM:04/12/2008.
     *
     * @param name - Column Name
     * @param modelIndex - Permanent Column position, zero based
     * @param cellRenderer - The cell renderer
     * @param cellEditor - The Cell editor
     * @param editable - is the column editable
     */
    public ArrayColumn(
        String name,
        int modelIndex,
            TableCellRenderer cellRenderer,
            ArrayFieldTableCellEditor cellEditor,
            boolean editable) {
      this(name, modelIndex, cellEditor.getComponent().getMinimumSize().width, cellRenderer, cellEditor, editable);     
    }

    /**
     *
     * @param name - Column Name
     * @param modelIndex - Permanent Column position, zero based
     * @param width - Column Width in pixels
     * @param cellRenderer - The cell renderer
     * @param cellEditor - The Cell editor
     * @param editable - is the column editable
     */
    @Deprecated // CraigM:04/12/2008 - The width isn't used anymore
    public ArrayColumn(
        String name,
        int modelIndex,
        int width,
            TableCellRenderer cellRenderer,
            TableCellEditor cellEditor,
            boolean editable) {
      this(name, modelIndex, 0, cellRenderer, cellEditor);

      // CraigM:04/12/2008 - If our editor is going in an ArrayField, then use the components width and ignore the calculated width
      if (cellEditor instanceof ArrayFieldTableCellEditor) {
        this.setMinWidth(((ArrayFieldTableCellEditor)cellEditor).getComponent().getMinimumSize().width);
      }
      else {
        this.setMinWidth(width);
        this.setPreferredWidth(width);
      }
        this.setEditable(editable);
    }

    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, TableCellEditor cellEditor,
            boolean editable, String header) {
        this(name, modelIndex, width, cellRenderer, cellEditor);
        this.setEditable(editable);
        setHeaderValue(header);
    }

    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, TableCellEditor cellEditor,
            boolean editable, Integer TitleMsgNum) {
        this(name, modelIndex, width, cellRenderer, cellEditor, editable);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, TableCellEditor cellEditor,
            boolean editable, Integer TitleMsgNum, String header) {
        this(name, modelIndex, width, cellRenderer, cellEditor, editable);
        setTitleMsgNumber(TitleMsgNum.intValue());
        setHeaderValue(header);
    }

    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, TableCellEditor cellEditor,
            boolean editable, Object header) {
        this(name, modelIndex, width, cellRenderer, cellEditor, editable);
        this.setHeaderValue(header);
    }

    /**
     *
     * @param name
     * @param modelIndex
     * @param width
     * @param cellRenderer
     * @param cellEditor
     * @param editable
     * @param header
     * @param TitleMsgNum
     */
    public ArrayColumn(String name, int modelIndex, int width,
            TableCellRenderer cellRenderer, TableCellEditor cellEditor,
            boolean editable, Object header, Integer TitleMsgNum) {
        this(name, modelIndex, width, cellRenderer, cellEditor, editable, header);
        setTitleMsgNumber(TitleMsgNum.intValue());
    }

    public ArrayColumn(int alignment, int maxCharacters, TextData Name, int sizePolicy, int state, TextData title) {
        super();
        int width = UIutils.colsToPixels(maxCharacters, new JFormattedTextField());
        this.assignedWidth = width;
        this.setWidth(width);
        this.setMinWidth(width);
       
        if ((Name == null) || Name.isEqual("").getBooleanValue())
            this.name = "qq_" + title.toString();
        this.setHeaderValue(title.toString());
        this.setAlignment(alignment);
    }

    /**
     * return the width of the column as it was originally constructed. This may be smaller than the
     * minWidth, if the heading is currently larger than the assigned width
     * @return
     */
    public int getAssignedWidth() {
    return this.assignedWidth;
  }
   
    public void setAssignedWidth(int pWidth) {
    this.assignedWidth = pWidth;
  }
   
    public void setBoundColumn(String pBoundColumn) {
        this.boundColumn = pBoundColumn;
    }

    public String getBoundColumn() {
        return this.boundColumn;
    }

    public boolean isEditable() {
        return this.editable;
    }

    public void setEditable(boolean pEditable) {
        this.editable = pEditable;
        this.defaultEditable = pEditable;
    }

    public String getName() {
        return this.name;
    }

    public void setHeaderValue(Object headerValue) {
        String target = "";
        if (headerValue != null){
            switch (getAlignment()){
            case Constants.TA_LEFT:
                target = TextGraphic.formatLabelAsHTML(headerValue.toString(), JLabel.LEFT);
                break;
            case Constants.TA_CENTER:
                target = TextGraphic.formatLabelAsHTML(headerValue.toString(), JLabel.CENTER);
                break;
            case Constants.TA_RIGHT:
                target = TextGraphic.formatLabelAsHTML(headerValue.toString(), JLabel.RIGHT);
                break;
            default:
                target = TextGraphic.formatLabelAsHTML(headerValue.toString(), JLabel.LEFT);
                break;
            }
        }
        super.setHeaderValue(target);
    }


    public int getHeaderLines() {
        return this.headerLines;
    }

    public boolean isSkipOnTab() {
        return this.skipOnTab;
    }

    public void setSkipOnTab(boolean skipOnTab) {
        this.skipOnTab = skipOnTab;
    }

    public void setHeaderLines(int headerLines) {
        this.headerLines = headerLines;
    }

    public int getTitleMsgNumber() {
        return this.titleMsgNumber;
    }

    public void setTitleMsgNumber(int titleMsgNumber) {
        this.titleMsgNumber = titleMsgNumber;

        // CraigM:29/04/2008 - Set the new column name
        if (this.titleSetNumber > 0 && this.titleMsgNumber > 0) {
          String text = MsgCatalog.getInstance().getString(this.titleSetNumber, this.titleMsgNumber);
        if (text != null) {
          this.setHeaderValue(text);
        }
        }
    }

    public int getTitleSetNumber() {
        return this.titleSetNumber;
    }

    public void setTitleSetNumber(int titleSetNumber) {
        this.titleSetNumber = titleSetNumber;
       
        // CraigM:29/04/2008 - Set the new column name
        if (this.titleSetNumber > 0 && this.titleMsgNumber > 0) {
          String text = MsgCatalog.getInstance().getString(this.titleSetNumber, this.titleMsgNumber);
        if (text != null) {
          this.setHeaderValue(text);
        }
        }
    }

    public boolean isViewOnly() {
        return (!this.editable && this.defaultEditable);
    }

    public void setViewOnly(boolean viewOnly) {
        if (viewOnly) {
            this.editable = false;
        }
        else {
            this.editable = this.defaultEditable;
        }
    }

    public void setName(String name) {
      this.name = name;
    }

    public TableCellEditor getEditor() {
        return this.editor;
    }

    public void setEditor(TableCellEditor editor) {
        this.editor = editor;
       
        // Wrap the cell editor in an ArrayFieldCellEditor to handle JTable sizing issues
        // TF:04/05/2009:If we don't have an editor (eg a listview) then we don't perform this code
        if (editor != null) {
          this.setCellEditor(new ArrayFieldCellEditor(editor));
        }
    }
   
    public TableCellRenderer getRenderer() {
        return this.renderer;
    }

    public void setRenderer(TableCellRenderer renderer) {
        this.renderer = renderer;

        // CraigM:08/12/2008 - If we are a ListView cell renderer, then don't wrap the renderer
        if (renderer instanceof AlignedCellRenderer) {
          this.setCellRenderer(renderer);
        }
        // For ArrayFields, wrap the cell renderer in an ArrayFieldCellRenderer to handle JTable sizing issues
        else {
          this.setCellRenderer(new ArrayFieldCellRenderer(renderer));
        }
    }

    public void setVisible(boolean value) {
        this.visible = value;
        if (this.myModel != null) {
          this.myModel.show(this, value);
        }
    }

    public boolean isVisible() {
        if (this.myModel != null)
            return this.myModel.isColumnVisible(this);
        else {
            return visible;
        }
    }

    public int getMaxCharacters() {
        return this.maxCharacters;
    }

    public void setMaxCharacters(int maxCharacters) {
      this.maxCharacters = maxCharacters;
    }

    public int getSizePolicy() {
        return this.sizePolicy;
    }

    public void setSizePolicy(int sizePolicy) {
        this.sizePolicy = sizePolicy;
    }

    public int getAlignment() {
        int result;
        if (this.renderer instanceof DefaultTableCellRenderer) {
            DefaultTableCellRenderer dtcr = (DefaultTableCellRenderer) this.renderer;
            result = dtcr.getHorizontalAlignment();
        } else {
            result = SwingConstants.LEFT;
        }
        return UIutils.javaAlignementToForte(result);
    }

    public void setAlignment(int pAlignment) {
        if (this.renderer instanceof DefaultTableCellRenderer) {
            DefaultTableCellRenderer dtcr = (DefaultTableCellRenderer) this.renderer;
            dtcr.setHorizontalAlignment(UIutils
                    .forteAlignmentToJava(pAlignment));
        }
    }

    public void setColTitle(TextData data) {
        this.setHeaderValue(data.toString());

    }
    public TextData getTitle() {
        Object o = this.getHeaderValue();
        if (o instanceof String) {
          this.title = new TextData((String) o);
        } else {
          this.title = (TextData) o;
        }
        return this.title;
    }
   
    /**
     * @return the editor component assigned to this array column.  CraigM:05/08/2008.
     */
    public Component getComponent() {
      if (this.editor instanceof ArrayFieldTableCellEditor) {
        return ((ArrayFieldTableCellEditor)this.editor).getComponent();
      }
      return null;
    }
   
    public void setTitle(TextData title) {
        this.setColTitle(title);
    }

  public void setColumnWeight(byte weight) {
    this.columnWeight = (float)weight;
  }

  public float getColumnWeight() {
    return this.columnWeight;
  }

  public void setColumnWeight(float columnWeight) {
    this.columnWeight = columnWeight;
  }

    /**
     * Set the alignment of the header text.
     * CraigM:31/07/2008.
     *
     * @param alignment
     * Possible values are:<br>
     * <li>Constants.CG_BOTTOMCENTER
     * <li>Constants.CG_BOTTOMLEFT
     * <li>Constants.CG_BOTTOMRIGHT
     * <li>Constants.CG_MIDDLELEFT
     * <li>Constants.CG_MIDDLERIGHT
     * <li>Constants.CG_TOPCENTER
     * <li>Constants.CG_TOPLEFT
     * <li>Constants.CG_TOPRIGHT
     */
    public void setHeaderAlignment(int alignment) {
      switch (alignment) {
    case Constants.CG_BOTTOMCENTER:
      this.setHeaderHorizontalAlignment(SwingConstants.CENTER);
      this.setHeaderVerticalAlignment(SwingConstants.BOTTOM);
      break;
    case Constants.CG_BOTTOMLEFT:
      this.setHeaderHorizontalAlignment(SwingConstants.LEFT);
      this.setHeaderVerticalAlignment(SwingConstants.BOTTOM);
      break;
    case Constants.CG_BOTTOMRIGHT:
      this.setHeaderHorizontalAlignment(SwingConstants.RIGHT);
      this.setHeaderVerticalAlignment(SwingConstants.BOTTOM);
      break;
    case Constants.CG_MIDDLELEFT:
      this.setHeaderHorizontalAlignment(SwingConstants.LEFT);
      this.setHeaderVerticalAlignment(SwingConstants.CENTER);
      break;
    case Constants.CG_MIDDLERIGHT:
      this.setHeaderHorizontalAlignment(SwingConstants.RIGHT);
      this.setHeaderVerticalAlignment(SwingConstants.CENTER);
      break;
    case Constants.CG_TOPCENTER:
      this.setHeaderHorizontalAlignment(SwingConstants.CENTER);
      this.setHeaderVerticalAlignment(SwingConstants.TOP);
      break;
    case Constants.CG_TOPLEFT:
      this.setHeaderHorizontalAlignment(SwingConstants.LEFT);
      this.setHeaderVerticalAlignment(SwingConstants.TOP);
      break;
    case Constants.CG_TOPRIGHT:
      this.setHeaderHorizontalAlignment(SwingConstants.RIGHT);
      this.setHeaderVerticalAlignment(SwingConstants.TOP);
      break;
    default:
      break;
    }
    }

    /**
     * Written by CraigM.
     * @see JLabel#getHorizontalAlignment()
     * @since 25/03/2008
     */
    public int getHeaderHorizontalAlignment() {
        return headerHorizontalAlignment;
    }
   
    /**
     * Written by CraigM.
     * @see JLabel#setHorizontalAlignment(int)
     * @since 25/03/2008
     */
    public void setHeaderHorizontalAlignment(int alignment) {
      this.headerHorizontalAlignment = alignment;
    }
   
    /**
     * Written by CraigM.
     * @see JLabel#getVerticalAlignment()
     * @since 25/03/2008
     */
    public int getHeaderVerticalAlignment() {
        return headerVerticalAlignment;
    }

    /**
     * Written by CraigM.
     * @see JLabel#setVerticalAlignment(int)
     * @since 25/03/2008
     */
    public void setHeaderVerticalAlignment(int alignment) {
      this.headerVerticalAlignment = alignment;
    }

    /**
     * Written by CraigM.
     * @param font
     * @since 25/03/2008
     */
    public void setHeaderFont(Font font) {
      this.headerFont = font;
    }

    /**
     * Written by CraigM.
     * @return
     * @since 25/03/2008
     */
    public Font getHeaderFont() {
      return this.headerFont;
    }

    /**
     * Written by CraigM.
     * @since 25/03/2008
     */
    public void setHeaderForeground(Color foreground) {
      this.headerForeground = foreground;
    }

    /**
     * Written by CraigM.
     * @since 25/03/2008
     */
    public Color getHeaderForeground() {
      return this.headerForeground;
    }
    //// PM:31 Oct 2008:

  public StateColourForRow getStateColour() {
    return stateColour;
  }

  public void setStateColour(StateColourForRow stateColour) {
    this.stateColour = stateColour;
    TableCellRenderer renderer = ((ArrayFieldCellRenderer)this.getCellRenderer()).getRenderer();
    // TF:10/02/2009:Changed this to use an interface
    if (renderer instanceof StateColourForRowDisplayer){
      ((StateColourForRowDisplayer)renderer).setStateColour(stateColour);
    }
    TableCellEditor editor = this.getCellEditor();
    if (editor instanceof ArrayFieldCellEditor){
      editor = ((ArrayFieldCellEditor)this.getCellEditor()).getEditor();
      // TF:10/02/2009:Changed this to use an interface
      if (editor instanceof StateColourForRowDisplayer){
        ((StateColourForRowDisplayer)editor).setStateColour(stateColour);
     
    }
  }
  @Override
  public String toString() {
   
    return getClass().getName() + "[" +getName()+"]";
  }

    /**
     * Written by ColeT.
     * Facilitates rendering the Array Column as enabled/disabled.
     * @since 13/01/2009
     * @returns true if enabled, false if disabled.
     */
  public boolean isHeaderEnabled()
  {
    return headerEnabled;
  }

    /**
     * Written by ColeT.
     * Facilitates rendering the Array Column as enabled/disabled.
     * @since 13/01/2009
     */
  public void setHeaderEnabled(boolean headerEnabled)
  {
    this.headerEnabled = headerEnabled;
  }
}
TOP

Related Classes of DisplayProject.ArrayColumn

TOP
Copyright © 2018 www.massapi.com. 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.