javax.rad.model
Class ColumnView

java.lang.Object
  extended by javax.rad.model.ColumnView

public class ColumnView
extends Object

A ColumnView contains all column names that should be shown.

See Also:
IRowDefinition

Constructor Summary
ColumnView(ColumnView pColumnView)
          Constructs a new ColumnView with the same columns as the given column view.
ColumnView(IDataRow pDataRow)
          Constructs a new ColumnView for all columns of the given data row.
ColumnView(IRowDefinition pRowDefinition)
          Constructs a new ColumnView for all columns of the given row definition.
ColumnView(String... pColumnNames)
          Constructs a new ColumnView.
 
Method Summary
 void addColumnNames(int pIndex, String... pColumnNames)
          Adds the column names at the specific index.
 void addColumnNames(String... pColumnNames)
          Adds the column names at the end.
 void addRowDefinition(IRowDefinition pRowDefinition)
          Adds an IRowDefinition.
 int getColumnCount()
          Returns the column count of this IRowDefintion.
 String getColumnName(int pIndex)
          Returns the column name for the given index.
 int getColumnNameIndex(String pColumnName)
          Returns the index of the column name.
 String[] getColumnNames()
          Returns the String[] of all column names.
 IRowDefinition[] getRowDefinitions()
          Gets all IRowDefinition that are currently added.
 void moveColumnName(int pFromIndex, int pToIndex)
          Moves the column name from an index to an index.
 void notifyRepaint()
          Invokes for each IControl the notifyRepaint() method.
 void removeColumnName(int pIndex)
          Removes the column name at the specific index.
 void removeColumnNames(String... pColumnNames)
          Removes the column names.
 void removeRowDefinition(IRowDefinition pRowDefinition)
          Removes an IRowDefinition.
 void setColumnNames(String... pColumnNames)
          Sets the String[] of all column names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnView

public ColumnView(String... pColumnNames)
Constructs a new ColumnView.

Parameters:
pColumnNames - the column names.

ColumnView

public ColumnView(ColumnView pColumnView)
Constructs a new ColumnView with the same columns as the given column view.

Parameters:
pColumnView - the column view.

ColumnView

public ColumnView(IRowDefinition pRowDefinition)
Constructs a new ColumnView for all columns of the given row definition.

Parameters:
pRowDefinition - the column view.

ColumnView

public ColumnView(IDataRow pDataRow)
Constructs a new ColumnView for all columns of the given data row.

Parameters:
pDataRow - the column view.
Method Detail

getColumnCount

public int getColumnCount()
Returns the column count of this IRowDefintion.

Returns:
the column count of this IRowDefintion.

getColumnName

public String getColumnName(int pIndex)
Returns the column name for the given index.

Parameters:
pIndex - the index.
Returns:
the column name for the given index.

getColumnNameIndex

public int getColumnNameIndex(String pColumnName)
Returns the index of the column name.

Parameters:
pColumnName - name of the column.
Returns:
the index of the column name.

getColumnNames

public String[] getColumnNames()
Returns the String[] of all column names.

Returns:
the String[] of all column names.

setColumnNames

public void setColumnNames(String... pColumnNames)
Sets the String[] of all column names.

Parameters:
pColumnNames - the String[] of all column names.

addColumnNames

public void addColumnNames(String... pColumnNames)
Adds the column names at the end.

Parameters:
pColumnNames - the column names.

addColumnNames

public void addColumnNames(int pIndex,
                           String... pColumnNames)
Adds the column names at the specific index.

Parameters:
pIndex - the index.
pColumnNames - the column names.

removeColumnNames

public void removeColumnNames(String... pColumnNames)
Removes the column names.

Parameters:
pColumnNames - the column names.

removeColumnName

public void removeColumnName(int pIndex)
Removes the column name at the specific index.

Parameters:
pIndex - the index.

moveColumnName

public void moveColumnName(int pFromIndex,
                           int pToIndex)
Moves the column name from an index to an index.

Parameters:
pFromIndex - the index of the column name to be moved.
pToIndex - the index where the column name should be moved to.

addRowDefinition

public void addRowDefinition(IRowDefinition pRowDefinition)
Adds an IRowDefinition. An IRowDefintion has to add and remove itself, if a ColumnView shows the specific IRowDefinition.

Parameters:
pRowDefinition - the IRowDefinition to add

removeRowDefinition

public void removeRowDefinition(IRowDefinition pRowDefinition)
Removes an IRowDefinition. An IRowDefintion has to add and remove itself, if a ColumnView shows the specific IRowDefinition.

Parameters:
pRowDefinition - the IRowDefinition to remove

getRowDefinitions

public IRowDefinition[] getRowDefinitions()
Gets all IRowDefinition that are currently added.

Returns:
all IRowDefinition that are currently added.

notifyRepaint

public void notifyRepaint()
Invokes for each IControl the notifyRepaint() method.



Copyright © 2009 SIB Visions GmbH. All Rights Reserved.