本文整理了Java中org.jbundle.base.db.Record.getListener
方法的一些代码示例,展示了Record.getListener
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.getListener
方法的具体详情如下:
包路径:org.jbundle.base.db.Record
类名称:Record
方法名:getListener
[英]Get the listener.
[中]抓住听众。
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Get the listener with this identifier.
* @return The first listener of this class or null if no match.
*/
public FileListener getListener(Object strBehaviorClass)
{
return this.getListener(strBehaviorClass, true); // By default need exact match
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Get the listener with this identifier.
* @return The first listener of this class or null if no match.
*/
public FileListener getListener(Object strBehaviorClass)
{
return this.getListener(strBehaviorClass, true); // By default need exact match
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Get the listener with this identifier.
* @return The first listener of this class or null if no match.
*/
public FileListener getListener(Object strBehaviorClass)
{
return this.getListener(strBehaviorClass, true); // By default need exact match
}
/**
代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model
/**
* Code to display a Menu.
*/
public void postSetupGrid()
{
Record menu = m_recDetail;
BaseListener behMenu = menu.getListener(StringSubFileFilter.class.getName());
menu.removeListener(behMenu, true);
}
}
代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model
/**
* Code to display a Menu.
*/
public void postSetupGrid()
{
Record menu = this.getMainRecord();
BaseListener behMenu = menu.getListener(StringSubFileFilter.class.getName());
menu.removeListener(behMenu, true);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Move the physical binary data to this field.
* If there is not SubFileFilter, then don't allow the field to be inited.
* @param objData the raw data to set the basefield to.
* @param bDisplayOption If true, display the change.
* @param iMoveMode The type of move being done (init/read/screen).
* @return The error code (or NORMAL_RETURN if okay).
*/
public int doSetData(Object fieldPtr, boolean bDisplayOption, int iMoveMode)
{
int iErrorCode = DBConstants.NORMAL_RETURN;
boolean bSubExists = (this.getOwner().getRecord().getListener(SubFileFilter.class.getName()) != null);
if (bSubExists)
iErrorCode = super.doSetData(fieldPtr, bDisplayOption, iMoveMode);
return iErrorCode;
}
}
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Move the physical binary data to this field.
* If there is not SubFileFilter, then don't allow the field to be inited.
* @param objData the raw data to set the basefield to.
* @param bDisplayOption If true, display the change.
* @param iMoveMode The type of move being done (init/read/screen).
* @return The error code (or NORMAL_RETURN if okay).
*/
public int doSetData(Object fieldPtr, boolean bDisplayOption, int iMoveMode)
{
int iErrorCode = DBConstants.NORMAL_RETURN;
boolean bSubExists = (this.getOwner().getRecord().getListener(SubFileFilter.class.getName()) != null);
if (bSubExists)
iErrorCode = super.doSetData(fieldPtr, bDisplayOption, iMoveMode);
return iErrorCode;
}
}
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.genled.screen
/**
* AddSubFileFilter Method.
*/
public void addSubFileFilter()
{
super.addSubFileFilter();
SubFileFilter listener = (SubFileFilter)this.getMainRecord().getListener(SubFileFilter.class);
if (listener != null)
listener.setAddNewHeaderOnAdd(true); // Create header record if none
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Get the sub-record.
*/
public Record getSubRecord()
{
if (m_recDependent == null)
m_recDependent = this.createSubRecord();
if (m_recDependent != null)
{
if (m_recDependent.getListener(SubFileFilter.class.getName()) == null)
m_recDependent.addListener(new SubFileFilter(this.getOwner()));
}
return m_recDependent;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Get the sub-record.
*/
public Record getSubRecord()
{
if (m_recDependent == null)
m_recDependent = this.createSubRecord();
if (m_recDependent != null)
{
if (m_recDependent.getListener(SubFileFilter.class.getName()) == null)
m_recDependent.addListener(new SubFileFilter(this.getOwner()));
}
return m_recDependent;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Get the sub-record.
*/
public Record getSubRecord()
{
if (m_recDependent == null)
m_recDependent = this.createSubRecord();
if (m_recDependent != null)
{
if (m_recDependent.getListener(SubFileFilter.class.getName()) == null)
m_recDependent.addListener(new SubFileFilter(this.getOwner()));
}
return m_recDependent;
}
/**
代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.product.screen
/**
* Select the fields for the maint screen.
*/
public void selectMaintFields()
{
Record record = this.getMainRecord();
record.setSelected(true);
record.getField(Product.DESC_SORT).setSelected(false);
record.getField(Product.ITINERARY_DESC).setSelected(false);
GetProductCostHandler listener = (GetProductCostHandler)record.getListener(GetProductCostHandler.class, false);
if (listener != null)
listener.clearCache();
GetProductAvailabilityHandler listener2 = (GetProductAvailabilityHandler)record.getListener(GetProductAvailabilityHandler.class, false);
if (listener2 != null)
listener2.clearCache();
}
/**
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.product.screen
/**
* Select the fields for the maint screen.
*/
public void selectMaintFields()
{
Record record = this.getMainRecord();
record.setSelected(true);
record.getField(Product.DESC_SORT).setSelected(false);
record.getField(Product.ITINERARY_DESC).setSelected(false);
GetProductCostHandler listener = (GetProductCostHandler)record.getListener(GetProductCostHandler.class, false);
if (listener != null)
listener.clearCache();
GetProductAvailabilityHandler listener2 = (GetProductAvailabilityHandler)record.getListener(GetProductAvailabilityHandler.class, false);
if (listener2 != null)
listener2.clearCache();
}
/**
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.acctrec.screen
/**
* Set up the default control for this field.
* @param itsLocation Location of this component on screen (ie., GridBagConstraint).
* @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
* @param iDisplayFieldDesc Display the label? (optional).
* @return Return the component or ScreenField that is created for this field.
*/
public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties)
{
ScreenComponent sField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties);
((BaseField)this.getField()).getRecord().removeListener(((BaseField)this.getField()).getRecord().getListener(AddNewCashDistHandler.class.getName()), true);
((BaseField)this.getField()).getRecord().addListener(new AddNewMcoDistHandler(null));
return sField;
}
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.acctrec.screen
/**
* Set up the default control for this field.
* @param itsLocation Location of this component on screen (ie., GridBagConstraint).
* @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
* @param iDisplayFieldDesc Display the label? (optional).
* @return Return the component or ScreenField that is created for this field.
*/
public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties)
{
ScreenComponent sField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties);
((BaseField)this.getField()).getRecord().removeListener(((BaseField)this.getField()).getRecord().getListener(AddNewMcoDistHandler.class.getName()), true);
((BaseField)this.getField()).getRecord().addListener(new AddNewCreditCardDistHandler(null));
return sField;
}
代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.product.db
public Record getSubRecord()
{
if (m_recDependent == null)
m_recDependent = this.createSubRecord();
if (m_recDependent != null)
{
m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY);
StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null);
m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption));
fldTourOrOption.setString(TourHeaderOption.OPTION);
if (m_recDependent.getListener(SubFileFilter.class.getName()) == null)
m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null));
}
return m_recDependent;
}
public Record createSubRecord()
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.product.db
public Record getSubRecord()
{
if (m_recDependent == null)
m_recDependent = this.createSubRecord();
if (m_recDependent != null)
{
m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY);
StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null);
m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption));
fldTourOrOption.setString(TourHeaderOption.OPTION);
if (m_recDependent.getListener(SubFileFilter.class.getName()) == null)
m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null));
}
return m_recDependent;
}
public Record createSubRecord()
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.product.db
public Record getSubRecord()
{
if (m_recDependent == null)
m_recDependent = this.createSubRecord();
if (m_recDependent != null)
{
m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY);
StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null);
m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption));
fldTourOrOption.setString(TourHeaderOption.TOUR);
if (m_recDependent.getListener(SubFileFilter.class.getName()) == null)
m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null));
}
return m_recDependent;
}
public Record createSubRecord()
代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.product.db
public Record getSubRecord()
{
if (m_recDependent == null)
m_recDependent = this.createSubRecord();
if (m_recDependent != null)
{
m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY);
StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null);
m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption));
fldTourOrOption.setString(TourHeaderOption.TOUR);
if (m_recDependent.getListener(SubFileFilter.class.getName()) == null)
m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null));
}
return m_recDependent;
}
public Record createSubRecord()
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.acctrec.screen
/**
* Add all the screen listeners.
*/
public void addListeners()
{
super.addListeners();
this.setEditing(false); // Can't change current rows
this.getMainRecord().getField(ArTrx.TRX_DATE).setEnabled(true);
this.getMainRecord().getField(ArTrx.AMOUNT).setEnabled(true);
this.getMainRecord().getField(ArTrx.COMMENTS).setEnabled(true);
this.setAppending(true); // CAN append
this.getMainRecord().setOpenMode(DBConstants.OPEN_APPEND_ONLY); // This makes it possible
this.getMainRecord().getListener(UpdateArTrxAcctDetailHandler.class, true).setEnabledListener(false); // Since I will be doing the updating
this.getMainRecord().addListener(new UpdateCrDrAcctDetailHandler(this.getRecord(Booking.BOOKING_FILE)));
this.getMainRecord().getField(ArTrx.AMOUNT).addListener(new SetCrDrTypeHandler(null));
}
/**
内容来源于网络,如有侵权,请联系作者删除!