MPXJ: Microsoft Project Exchange

net.sf.mpxj
Class Column

java.lang.Object
  extended by net.sf.mpxj.Column

public final class Column
extends java.lang.Object

This class represents a column in an MS Project table. The attributes held here describe the layout of the column, along with the title text that has been associated with the column. The title text will either be the default value supplied by MS Project, or it will be a user defined value.


Field Summary
static int ALIGN_CENTER
           
static int ALIGN_LEFT
          Column alignment constants.
static int ALIGN_RIGHT
           
 
Constructor Summary
Column(ProjectFile project)
          Constructor.
 
Method Summary
 int getAlignData()
          Retrieves a value representing the alignment of data displayed in the column.
 int getAlignTitle()
          Retrieves a value representing the alignment of the column title text.
 FieldType getFieldType()
          Retrieves the type data displayed in the column.
 java.lang.String getTitle()
          Retrieves the column title.
 java.lang.String getTitle(java.util.Locale locale)
          Retrieves the column title for the given locale.
 int getWidth()
          Retrieves the width of the column represented as a number of characters.
 void setAlignData(int alignment)
          Sets the alignment of the data in the column.
 void setAlignTitle(int alignment)
          Sets the alignment of the column title.
 void setFieldType(FieldType type)
          Sets the type data displayed in the column.
 void setTitle(java.lang.String title)
          Sets the user defined column title.
 void setWidth(int width)
          Sets the width of the column in characters.
 java.lang.String toString()
          This method dumps the contents of this column as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIGN_LEFT

public static final int ALIGN_LEFT
Column alignment constants.

See Also:
Constant Field Values

ALIGN_CENTER

public static final int ALIGN_CENTER
See Also:
Constant Field Values

ALIGN_RIGHT

public static final int ALIGN_RIGHT
See Also:
Constant Field Values
Constructor Detail

Column

public Column(ProjectFile project)
Constructor.

Parameters:
project - reference to the parent project
Method Detail

getAlignData

public int getAlignData()
Retrieves a value representing the alignment of data displayed in the column.

Returns:
alignment type

getAlignTitle

public int getAlignTitle()
Retrieves a value representing the alignment of the column title text.

Returns:
alignment type

getFieldType

public FieldType getFieldType()
Retrieves the type data displayed in the column. This identifier indicates what data will appear in the column, and the default column title that will appear if the user has not provided a user defined column title.

Returns:
field type

getTitle

public java.lang.String getTitle()
Retrieves the column title.

Returns:
column title

getTitle

public java.lang.String getTitle(java.util.Locale locale)
Retrieves the column title for the given locale.

Parameters:
locale - required locale for the default column title
Returns:
column title

getWidth

public int getWidth()
Retrieves the width of the column represented as a number of characters.

Returns:
column width

setAlignData

public void setAlignData(int alignment)
Sets the alignment of the data in the column.

Parameters:
alignment - data alignment

setAlignTitle

public void setAlignTitle(int alignment)
Sets the alignment of the column title.

Parameters:
alignment - column title alignment

setFieldType

public void setFieldType(FieldType type)
Sets the type data displayed in the column. This identifier indicates what data will appear in the column, and the default column title that will appear if the user has not provided a user defined column title.

Parameters:
type - field type

setTitle

public void setTitle(java.lang.String title)
Sets the user defined column title.

Parameters:
title - user defined column title

setWidth

public void setWidth(int width)
Sets the width of the column in characters.

Parameters:
width - column width

toString

public java.lang.String toString()
This method dumps the contents of this column as a String. Note that this facility is provided as a debugging aid.

Overrides:
toString in class java.lang.Object
Returns:
formatted contents of this column


Copyright © 2000-2014 Packwood Software. All Rights Reserved.