本文整理了Java中org.jbundle.base.db.Record.doAddListener
方法的一些代码示例,展示了Record.doAddListener
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.doAddListener
方法的具体详情如下:
包路径:org.jbundle.base.db.Record
类名称:Record
方法名:doAddListener
[英]Internal method to add a listener to the end of the chain. Sets the listener's owner to this.
[中]将侦听器添加到链末端的内部方法。将侦听器的所有者设置为。
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Add a listener to the chain.
* @param theBehavior Listener or Filter to add to this record - calls doAddListener.
*/
public void addListener(BaseListener listener)
{
listener.setNextListener(null); // Just being safe
if (this.getTable() != null)
this.getTable().addListener(this, (FileListener)listener); // Give the table a chance to clone this or whatever.
else
this.doAddListener((FileListener)listener);
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Add a listener to the chain.
* @param theBehavior Listener or Filter to add to this record - calls doAddListener.
*/
public void addListener(BaseListener listener)
{
listener.setNextListener(null); // Just being safe
if (this.getTable() != null)
this.getTable().addListener(this, (FileListener)listener); // Give the table a chance to clone this or whatever.
else
this.doAddListener((FileListener)listener);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Add a listener to the chain.
* @param theBehavior Listener or Filter to add to this record - calls doAddListener.
*/
public void addListener(BaseListener listener)
{
listener.setNextListener(null); // Just being safe
if (this.getTable() != null)
this.getTable().addListener(this, (FileListener)listener); // Give the table a chance to clone this or whatever.
else
this.doAddListener((FileListener)listener);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Adding a file listener to the chain.
* This just gives the table an ability to respond to listeners being added.
* @param record TODO
* @param listener The filter or listener to add to the chain.
*/
public void addListener(Record record, FileListener listener)
{
record.doAddListener(listener);
boolean bOldState = listener.setEnabledListener(false); // To disable recursive forever loop!
BaseListener nextListener = listener.setNextListener(null); // Make sure this is the ONLY listener in the chain to get this call
if (record.getEditMode() == Constants.EDIT_ADD)
{
boolean[] rgbModified = this.getRecord().getModified();
listener.doNewRecord(DBConstants.DISPLAY);
this.getRecord().setModified(rgbModified); // Restore since doNew should not change modified fields.
}
else if ((record.getEditMode() == Constants.EDIT_IN_PROGRESS) || (record.getEditMode() == Constants.EDIT_CURRENT))
listener.doValidRecord(DBConstants.DISPLAY);
listener.setNextListener(nextListener);
listener.setEnabledListener(bOldState); // Renable the listener to eliminate echos
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Adding a file listener to the chain.
* This just gives the table an ability to respond to listeners being added.
* @param record TODO
* @param listener The filter or listener to add to the chain.
*/
public void addListener(Record record, FileListener listener)
{
record.doAddListener(listener);
boolean bOldState = listener.setEnabledListener(false); // To disable recursive forever loop!
BaseListener nextListener = listener.setNextListener(null); // Make sure this is the ONLY listener in the chain to get this call
if (record.getEditMode() == Constants.EDIT_ADD)
{
boolean[] rgbModified = this.getRecord().getModified();
listener.doNewRecord(DBConstants.DISPLAY);
this.getRecord().setModified(rgbModified); // Restore since doNew should not change modified fields.
}
else if ((record.getEditMode() == Constants.EDIT_IN_PROGRESS) || (record.getEditMode() == Constants.EDIT_CURRENT))
listener.doValidRecord(DBConstants.DISPLAY);
listener.setNextListener(nextListener);
listener.setEnabledListener(bOldState); // Renable the listener to eliminate echos
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Adding a file listener to the chain.
* This just gives the table an ability to respond to listeners being added.
* @param record TODO
* @param listener The filter or listener to add to the chain.
*/
public void addListener(Record record, FileListener listener)
{
record.doAddListener(listener);
boolean bOldState = listener.setEnabledListener(false); // To disable recursive forever loop!
BaseListener nextListener = listener.setNextListener(null); // Make sure this is the ONLY listener in the chain to get this call
if (record.getEditMode() == Constants.EDIT_ADD)
{
boolean[] rgbModified = this.getRecord().getModified();
listener.doNewRecord(DBConstants.DISPLAY);
this.getRecord().setModified(rgbModified); // Restore since doNew should not change modified fields.
}
else if ((record.getEditMode() == Constants.EDIT_IN_PROGRESS) || (record.getEditMode() == Constants.EDIT_CURRENT))
listener.doValidRecord(DBConstants.DISPLAY);
listener.setNextListener(nextListener);
listener.setEnabledListener(bOldState); // Renable the listener to eliminate echos
}
/**
内容来源于网络,如有侵权,请联系作者删除!