|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.model.GridTab
public class GridTab
Tab Model. - a combination of AD_Tab (the display attributes) and AD_Table information.
The Tab owns also it's Table model and listens to data changes to update the Field values.
The Tab maintains the bound property: CurrentRow
Event Hierarchies:
- dataChanged (from MTable)
- setCurrentRow
- Update all Field Values
- setValue
- Update Field Value
- Callout
to FR [1877902],
Serialized Form| Field Summary | |
|---|---|
static String |
CTX_AccessLevel
|
static String |
CTX_AD_Tab_ID
|
static String |
CTX_AD_Table_ID
|
static String |
CTX_KeyColumnName
|
static String |
CTX_LinkColumnName
|
static String |
CTX_Name
|
static String |
CTX_TabLevel
|
protected CLogger |
log
Logger |
protected EventListenerList |
m_listenerList
A list of event listeners for this component. |
static String |
PROPERTY
Property Change Type |
| Constructor Summary | |
|---|---|
GridTab(GridTabVO vo)
Create Tab (Model) from Value Object. |
|
| Method Summary | |
|---|---|
void |
addDataStatusListener(DataStatusListener l)
|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addStateChangeListener(StateChangeListener l)
|
boolean |
canHaveAttachment()
Can this tab have Attachments?. |
boolean |
dataDelete()
Delete current Row |
void |
dataIgnore()
Ignore data changes |
boolean |
dataNew(boolean copy)
Create (copy) new Row and process Callouts |
void |
dataRefresh()
Refresh current row data |
void |
dataRefresh(int row)
Refresh row data |
void |
dataRefreshAll()
Refresh all data |
boolean |
dataSave(boolean manualCmd)
Uncoditionally Save data |
void |
dataStatusChanged(DataStatusEvent e)
Data Status Listener from MTable |
protected void |
dispose()
Dispose - clean up resources |
void |
enableEvents()
Enable Events - enable data events of tabs (add listeners) |
void |
fireDataStatusEEvent(String AD_Message,
String info,
boolean isError)
Create and fire Data Status Error Event |
void |
fireDataStatusEEvent(ValueNamePair errorLog)
Create and fire Data Status Error Event (from Error Log) |
String |
get_ValueAsString(String variableName)
Get Variable Value (Evaluatee) |
Callout[] |
getActiveCalloutInstance()
|
String[] |
getActiveCallouts()
|
int |
getAD_AttachmentID()
Get Attachment_ID for current record. |
int |
getAD_ColumnSortOrder_ID()
Get Order column for sort tab |
int |
getAD_ColumnSortYesNo_ID()
Get Yes/No column for sort tab |
int |
getAD_Process_ID()
Get Process ID |
int |
getAD_Tab_ID()
Get Tab ID |
int |
getAD_Table_ID()
Get Table ID |
int |
getAD_Window_ID()
Get Window ID |
int |
getCM_ChatID()
Get Chat_ID for this record. |
String |
getCommitWarning()
Get Commit Warning |
int |
getCurrentRow()
Get Current Row |
ArrayList<GridField> |
getDependantFields(String columnName)
Get dependents fields of columnName |
ArrayList<String> |
getDependentOn()
Get a list of variables, this tab is dependent on |
String |
getDescription()
Get Description of Tab |
String |
getDisplayLogic()
Get Display Logic |
GridField |
getField(int index)
Get Field by index |
GridField |
getField(String columnName)
Get Field by DB column name |
int |
getFieldCount()
Get Column/Field Count |
GridField[] |
getFields()
Get all Fields |
String |
getHelp()
Get Help of Tab |
Icon |
getIcon()
Get Tab Icon |
int |
getIncluded_Tab_ID()
Get Included Tab ID |
String |
getKeyColumnName()
Return the name of the key column - may be "" |
int |
getKeyID(int row)
Get Key ID of row |
String |
getLinkColumnName()
Return Name of link column |
protected GridTable |
getMTable()
Return Table Model |
String |
getName()
Get Name of Tab |
ArrayList<String> |
getParentColumnNames()
Return Parent ArrayList |
MQuery |
getQuery()
Get Query |
int |
getRecord_ID()
Get Current Table Key ID |
int |
getRowCount()
Get RowCount |
GridTable |
getTableModel()
Get TableModel. |
String |
getTableName()
Get TableName |
int |
getTabLevel()
Get Tab Level |
int |
getTabNo()
Get TabNo |
String |
getTrxInfo()
Transaction support. |
Object |
getValue(GridField field)
Get Value of Field |
Object |
getValue(int row,
String columnName)
Get Value of Field in row |
Object |
getValue(String columnName)
Get Value of Field with columnName |
boolean |
getValueAsBoolean(String columnName)
Get Boolean Value of Field with columnName. |
String |
getWhereClause()
Get Tab Where Clause |
String |
getWhereExtended()
Get extended Where Clause (parent link) |
int |
getWindowNo()
Get WindowNo |
boolean |
hasAttachment()
Returns true, if current row has an Attachment |
boolean |
hasChat()
Returns true, if current row has a Chat |
boolean |
hasDependants(String columnName)
Has this field dependents ? |
boolean |
initTab(boolean async)
Initialize Tab with record from AD_Tab_v |
boolean |
isActive()
Is the current record active |
boolean |
isAlwaysUpdateField()
Tab contains Always Update Field |
boolean |
isCurrent()
Is the tab current?. |
boolean |
isDetail()
Returns true if this is a detail record |
boolean |
isDisplayed()
Is the Tab Visible. |
boolean |
isHighVolume()
Is High Volume? |
boolean |
isIncluded()
Is Tab Incluced in other Tab |
boolean |
isInsertRecord()
Can we Insert Records? |
boolean |
isLoadComplete()
|
boolean |
isLocked()
Record Is Locked |
boolean |
isOnlyCurrentRows()
Are Only Current Rows displayed |
boolean |
isOpen()
Is the tab/table currently open |
boolean |
isPrinted()
Is Printed (Document can be printed) |
boolean |
isProcessed()
Is Processed |
boolean |
isQueryActive()
Is Query Active |
boolean |
isQueryNewRecord()
Is Query New Record |
boolean |
isReadOnly()
Is Read Only? |
boolean |
isSingleRow()
Is Single Row |
boolean |
isSortTab()
Is Sort Tab |
boolean |
isTreeTab()
Has Tree |
void |
loadAttachments()
Load Attachments for this table |
void |
loadChats()
Load Chats for this table |
void |
loadLocks()
Load Locks for Table and User |
protected boolean |
loadTab()
|
void |
lock(Properties ctx,
int Record_ID,
boolean lock)
Lock Record |
int |
navigate(int targetRow)
Navigate absolute - goto Row - (zero based) |
int |
navigateCurrent()
Navigate to current now (reload) |
int |
navigateRelative(int rowChange)
Navigate relatively - i.e. plus/minus from current position |
boolean |
needSave(boolean rowChange,
boolean onlyRealChange)
Do we need to Save? |
String |
processCallout(GridField field)
Process Callout(s). |
String |
processFieldChange(GridField changedField)
Process Field Change - evaluate Dependencies and process Callouts. |
void |
query(boolean onlyCurrentRows)
Assemble whereClause and query MTable and position to row 0. |
void |
query(boolean onlyCurrentRows,
int onlyCurrentDays,
int maxRows)
Assemble whereClause and query MTable and position to row 0. |
void |
removeDataStatusListener(DataStatusListener l)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
removeStateChangeListener(StateChangeListener l)
|
void |
setCurrentRow(int row)
Set current row - used for deleteSelection |
void |
setFieldVFormat(String identifier,
String strNewFormat)
Feature Request [1707462] Enable runtime change of VFormat |
void |
setIncluded(boolean isIncluded)
Is Tab Incluced in other Tab |
void |
setLinkColumnName(String linkColumnName)
Set Name of link column. |
void |
setQuery(MQuery query)
Set Query |
void |
setSingleRow(boolean isSingleRow)
Set Single Row. |
String |
setValue(GridField field,
Object value)
Set New Value & call Callout |
String |
setValue(String columnName,
Object value)
Set New Value & call Callout |
void |
switchRows(int from,
int to,
int sortColumn,
boolean ascending)
Switches the line/seqNo of the two rows |
String |
toString()
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY
protected EventListenerList m_listenerList
protected CLogger log
public static final String CTX_KeyColumnName
public static final String CTX_LinkColumnName
public static final String CTX_TabLevel
public static final String CTX_AccessLevel
public static final String CTX_AD_Tab_ID
public static final String CTX_Name
public static final String CTX_AD_Table_ID
| Constructor Detail |
|---|
public GridTab(GridTabVO vo)
MTab provides a property listener for changed rows and a DataStatusListener for communicating changes of the underlying data
vo - Value Object| Method Detail |
|---|
public boolean isLoadComplete()
public boolean initTab(boolean async)
async - async
protected boolean loadTab()
protected void dispose()
public ArrayList<String> getDependentOn()
public String getDisplayLogic()
public GridTable getTableModel()
public Icon getIcon()
public boolean hasDependants(String columnName)
columnName - column name
public ArrayList<GridField> getDependantFields(String columnName)
columnName - column name
public void setQuery(MQuery query)
query - querypublic MQuery getQuery()
public boolean isQueryActive()
public boolean isQueryNewRecord()
public void enableEvents()
public void query(boolean onlyCurrentRows)
Scenarios:
- Never opened (full query)
- query changed (full query)
- Detail link value changed (full query)
- otherwise (refreshAll)
onlyCurrentRows - only current rows (1 day)
public void query(boolean onlyCurrentRows,
int onlyCurrentDays,
int maxRows)
Scenarios:
- Never opened (full query)
- query changed (full query)
- Detail link value changed (full query)
- otherwise (refreshAll)
onlyCurrentRows - only current rowsonlyCurrentDays - if only current row, how many days backmaxRows - maximim rows or 0 for allpublic void dataRefreshAll()
public void dataRefresh()
public void dataRefresh(int row)
row - indexpublic boolean dataSave(boolean manualCmd)
manualCmd - if true, no vetoable PropertyChange will be fired for save confirmation from MTable
public boolean needSave(boolean rowChange,
boolean onlyRealChange)
rowChange - row changeonlyRealChange - if true the value of a field was actually changed
(e.g. for new records, which have not been changed) - default false
public void dataIgnore()
public boolean dataNew(boolean copy)
copy - copy
public boolean dataDelete()
public String getName()
public String getDescription()
public String getHelp()
public int getTabLevel()
public String getCommitWarning()
protected GridTable getMTable()
public String getKeyColumnName()
public String getLinkColumnName()
public void setLinkColumnName(String linkColumnName)
linkColumnName - name of column - or sets name to AD_Column_ID, if existspublic boolean isCurrent()
Yes - Table must be open
- Query String is the same
- Not Detail
- Old link column value is same as current one
public boolean isOpen()
public boolean isIncluded()
public void setIncluded(boolean isIncluded)
isIncluded - true if includedpublic boolean isOnlyCurrentRows()
public ArrayList<String> getParentColumnNames()
public boolean isDetail()
public boolean isPrinted()
public int getWindowNo()
public int getTabNo()
public int getAD_Process_ID()
public boolean isHighVolume()
public boolean isReadOnly()
public boolean isAlwaysUpdateField()
public boolean isInsertRecord()
public boolean isDisplayed()
public String get_ValueAsString(String variableName)
get_ValueAsString in interface EvaluateevariableName - name
public boolean isSingleRow()
public void setSingleRow(boolean isSingleRow)
isSingleRow - togglepublic boolean isTreeTab()
public int getAD_Tab_ID()
public int getAD_Table_ID()
public int getAD_Window_ID()
public int getIncluded_Tab_ID()
public String getTableName()
public String getWhereClause()
public boolean isSortTab()
public int getAD_ColumnSortOrder_ID()
public int getAD_ColumnSortYesNo_ID()
public String getWhereExtended()
public String getTrxInfo()
public void loadAttachments()
public boolean canHaveAttachment()
It can have an attachment if it has a key column ending with _ID. The key column is empty, if there is no single identifying key.
public boolean hasAttachment()
public int getAD_AttachmentID()
public void loadChats()
public boolean hasChat()
public int getCM_ChatID()
public void loadLocks()
public boolean isLocked()
public void lock(Properties ctx,
int Record_ID,
boolean lock)
ctx - contextRecord_ID - idlock - true if lock, otherwise unlockpublic void dataStatusChanged(DataStatusEvent e)
dataStatusChanged in interface DataStatusListenere - event
public void fireDataStatusEEvent(String AD_Message,
String info,
boolean isError)
AD_Message - messageinfo - infoisError - if not true, it is a Warningpublic void fireDataStatusEEvent(ValueNamePair errorLog)
errorLog - logpublic int getCurrentRow()
public int getRecord_ID()
public int getKeyID(int row)
row - row number
public int navigate(int targetRow)
targetRow - target row
public int navigateRelative(int rowChange)
rowChange - row change
public int navigateCurrent()
public void setCurrentRow(int row)
public int getRowCount()
public int getFieldCount()
public GridField getField(int index)
index - index
public GridField getField(String columnName)
columnName - column name
public GridField[] getFields()
public String setValue(String columnName,
Object value)
columnName - database column namevalue - value
public String setValue(GridField field,
Object value)
field - fieldvalue - value
public boolean isProcessed()
public boolean isActive()
public String processFieldChange(GridField changedField)
changedField - changed field
public String[] getActiveCallouts()
public Callout[] getActiveCalloutInstance()
public String processCallout(GridField field)
The Callout is in the string of "class.method;class.method;" If there is no class name, i.e. only a method name, the class is regarded as CalloutSystem. The class needs to comply with the Interface Callout. For a limited time, the old notation of Sx_matheod / Ux_menthod is maintained.
field - field
Calloutpublic Object getValue(String columnName)
columnName - column name
public boolean getValueAsBoolean(String columnName)
columnName - column name
public Object getValue(GridField field)
field - field
public Object getValue(int row,
String columnName)
row - rowcolumnName - column name
public String toString()
toString in class Objectpublic void removePropertyChangeListener(PropertyChangeListener l)
l - listenerpublic void addPropertyChangeListener(PropertyChangeListener l)
l - listenerpublic void removeDataStatusListener(DataStatusListener l)
l - listenerpublic void addDataStatusListener(DataStatusListener l)
l - listenerpublic void addStateChangeListener(StateChangeListener l)
l - public void removeStateChangeListener(StateChangeListener l)
l -
public void setFieldVFormat(String identifier,
String strNewFormat)
Identifier - field identstrNewFormat - new mask
public void switchRows(int from,
int to,
int sortColumn,
boolean ascending)
from - row indexto - row indexsortColumn - column index of sort columnascending - sorting modus
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||