public class ExecutionTableColumn
extends java.lang.Object
ExecutionTable
.
ExecutionTableItem
s.
ExecutionTable.add(ExecutionTableColumn)
.
Math.PI
) should be masked with the pi symbol. Therefore you create a new mask and add it to the column like:
// create the mask final Mask piMask = new Mask("pi", Symbol.getPredefinedSymbol(PredefinedSymbol.PI)); // add it to the column column.addMask(piMask);Edit cells:
// create the columns ... // create the items ... // the user can edit the first and the third cell of the item second item table.getColumn(0).setEditable(true); table.getColumn(2).setEditable(true); // after that it is not possible yet to edit the cells table.getItem(1).setEditable(true); // now the user can input values for the cells 1 and 3
Modifier and Type | Field and Description |
---|---|
static int |
CENTER
content is aligned in the center of the column
|
static int |
LEFT
content is aligned at the left side of the column
|
static int |
RIGHT
content is aligned at the right side of the column
|
Constructor and Description |
---|
ExecutionTableColumn(java.lang.String name)
Creates a new column.
|
ExecutionTableColumn(java.lang.String name,
int id)
Creates a new column.
|
Modifier and Type | Method and Description |
---|---|
void |
addMask(Mask mask)
Adds a new mask to the column.
|
int |
getAlignment()
Gets the alignment of the column content.
|
int |
getID()
Gets the identifier of the column.
|
int |
getIndex()
Gets the index of the column in the list of all table columns.
|
Mask |
getMask(int index)
Gets a mask at a given index.
|
int |
getMaskCount()
Gets the number of masks that are defined for the column.
|
java.lang.String |
getName()
Gets the name of the column.
|
int |
getWidth()
Gets the width of the column.
|
boolean |
isEditable()
Indicates whether the column is editable.
|
void |
removeMask(Mask mask)
Removes the mask from the column.
|
void |
setAlignment(int alignment)
Sets the alignment of the column content.
|
void |
setEditable(boolean editable)
Sets whether the column is editable.
|
void |
setWidth(int width)
Sets the width of the column.
|
java.lang.String |
toString() |
public static final int LEFT
public static final int RIGHT
public static final int CENTER
public ExecutionTableColumn(java.lang.String name) throws java.lang.IllegalArgumentException
name
- the name of the column that is displayed in the column header (can contain html tags to format the column text)java.lang.IllegalArgumentException
- public ExecutionTableColumn(java.lang.String name, int id) throws java.lang.IllegalArgumentException
name
- the name of the column that is displayed in the column header (can contain html tags to format the column text)id
- the identifier or -1
if the column has no identifierjava.lang.IllegalArgumentException
- public final java.lang.String getName()
public final int getID()
-1
if there is not specified an identifier for the columnpublic final int getIndex()
-1
if the column is not even added to a tablepublic int getAlignment()
public void setAlignment(int alignment) throws java.lang.IllegalArgumentException
public int getMaskCount()
public Mask getMask(int index) throws java.lang.IndexOutOfBoundsException
// create the mask final Mask piMask = new Mask("pi", Symbol.getPredefinedSymbol(PredefinedSymbol.PI)); // add it to the column column.addMask(piMask);
index
- the indexjava.lang.IndexOutOfBoundsException
- index < 0 || index >= getMaskCount()
)public void addMask(Mask mask)
// create the mask final Mask piMask = new Mask("pi", Symbol.getPredefinedSymbol(PredefinedSymbol.PI)); // add it to the column column.addMask(piMask);
mask
- the mask to be addedpublic void removeMask(Mask mask)
mask
- the mask that should be removedpublic boolean isEditable()
true
if the column is editable otherwise false
public void setEditable(boolean editable) throws java.lang.IllegalArgumentException
editable
- true
if the column should be editable otherwise false
java.lang.IllegalArgumentException
public int getWidth()
-1
if there is not specified a width (uses default width)public void setWidth(int width)
width
- the width of the columnExecutionTable.setAutoResizeColumns(boolean)
public java.lang.String toString()
toString
in class java.lang.Object