Compiere 3.1

org.compiere.common
Class TableModel

java.lang.Object
  extended by org.compiere.common.TableModel
All Implemented Interfaces:
Serializable

public class TableModel
extends Object
implements Serializable

See Also:
Serialized Form

Nested Class Summary
static interface TableModel.DirtyListener
           
static class TableModel.State
           
 
Field Summary
protected  ArrayList<Integer> attachments
          Number of attachments for the record
protected  ArrayList<String> comments
           
protected  ArrayList<Boolean> dirty
           
 HashMap<Integer,ArrayList<NamePair>> exceptionValues
          If this is populated, table model also carries exception IDs. so no need to call later
protected  ArrayList<Boolean> isGroupRow
           
static CompiereLogger log
           
protected  ArrayList<FieldVO> m_fieldVOs
          If this is populated, that means that the table needs to do a in-place replacement of its column definitions (e.g. add or remove columns)
protected  ArrayList<Boolean> readOnly
           
protected  ArrayList<TableModel.State> states
           
protected  ArrayList<String[]> values
           
 
Constructor Summary
TableModel()
           
 
Method Summary
 void addRow(int row, String[] r)
           
 void addRow(String[] r, int numAttachments, String comments)
           
 void copyRow(int toRow, int fromRow)
           
 String get(int row, int col)
           
 String getComments(int row)
           
 ArrayList<FieldVO> getFieldVOs()
           
 int getNumAttachments(int row)
           
 String[] getRow(int row)
           
 TableModel.State getRowState(int row)
           
 boolean isDirty(int row)
           
 boolean isEmpty()
           
 boolean isGroupRow(int row)
           
 boolean isReadOnly(int row)
           
 boolean nullValue(int row, int col)
           
 void removeRow(int row)
           
 void resetStates()
           
 int rows()
           
 void set(int row, int col, String v)
           
 void setComments(int row, String comments)
           
 void setDirty(int row, boolean flag)
           
 void setDirtyListener(TableModel.DirtyListener dirtyListener)
           
 void setFieldVOs(ArrayList<FieldVO> fieldVOs)
           
 void setGroupRow(int row, boolean b)
           
 void setNumAttachments(int row, int intValue)
           
 void setReadOnly(int row, boolean readonly)
           
 void setRow(int row, String[] r)
           
 void setRowState(int row, TableModel.State state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final CompiereLogger log

exceptionValues

public HashMap<Integer,ArrayList<NamePair>> exceptionValues
If this is populated, table model also carries exception IDs. so no need to call later


m_fieldVOs

protected ArrayList<FieldVO> m_fieldVOs
If this is populated, that means that the table needs to do a in-place replacement of its column definitions (e.g. add or remove columns)


readOnly

protected ArrayList<Boolean> readOnly

values

protected ArrayList<String[]> values

attachments

protected ArrayList<Integer> attachments
Number of attachments for the record


comments

protected ArrayList<String> comments

isGroupRow

protected ArrayList<Boolean> isGroupRow

states

protected transient ArrayList<TableModel.State> states

dirty

protected transient ArrayList<Boolean> dirty
Constructor Detail

TableModel

public TableModel()
Method Detail

get

public String get(int row,
                  int col)

set

public void set(int row,
                int col,
                String v)

isDirty

public boolean isDirty(int row)

setDirty

public void setDirty(int row,
                     boolean flag)

getRowState

public TableModel.State getRowState(int row)

setRowState

public void setRowState(int row,
                        TableModel.State state)

getRow

public String[] getRow(int row)

setRow

public void setRow(int row,
                   String[] r)

getNumAttachments

public int getNumAttachments(int row)

setNumAttachments

public void setNumAttachments(int row,
                              int intValue)

getComments

public String getComments(int row)

setComments

public void setComments(int row,
                        String comments)

addRow

public void addRow(String[] r,
                   int numAttachments,
                   String comments)

copyRow

public void copyRow(int toRow,
                    int fromRow)

addRow

public void addRow(int row,
                   String[] r)

removeRow

public void removeRow(int row)

isEmpty

public boolean isEmpty()

rows

public int rows()

resetStates

public void resetStates()

isReadOnly

public boolean isReadOnly(int row)

setReadOnly

public void setReadOnly(int row,
                        boolean readonly)

setDirtyListener

public void setDirtyListener(TableModel.DirtyListener dirtyListener)

nullValue

public boolean nullValue(int row,
                         int col)

getFieldVOs

public ArrayList<FieldVO> getFieldVOs()

setFieldVOs

public void setFieldVOs(ArrayList<FieldVO> fieldVOs)

setGroupRow

public void setGroupRow(int row,
                        boolean b)

isGroupRow

public boolean isGroupRow(int row)

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.