org.jbundle.base.db.Record.getDefaultScreenKeyArea()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(11.9k)|赞(0)|评价(0)|浏览(75)

本文整理了Java中org.jbundle.base.db.Record.getDefaultScreenKeyArea方法的一些代码示例,展示了Record.getDefaultScreenKeyArea的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.getDefaultScreenKeyArea方法的具体详情如下:
包路径:org.jbundle.base.db.Record
类名称:Record
方法名:getDefaultScreenKeyArea

Record.getDefaultScreenKeyArea介绍

[英]Get the default key index for grid screens. The default key area for grid screens is the first non-unique key that is a string. Override this to supply a different key area.
[中]获取网格屏幕的默认键索引。网格屏幕的默认键区域是第一个非唯一键,即字符串。覆盖此选项以提供不同的关键区域。

代码示例

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model

/**
 * Code to display a Menu.
 */
public void preSetupGrid(String strMenu)
{
  Record record = m_recDetail;
  if (record != null) if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Code to display a Menu.
 */
public void preSetupGrid(String strMenu)
{
  Record record = m_recDetail;
  if (record != null) if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Set up the default screen 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 converter The converter to set the screenfield to.
 * @param iDisplayFieldDesc Display the label? (optional).
 * @return Return the component or ScreenField that is created for this field.
 */
public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc)
{
  Record record = this.getReferenceRecord();  // Get/make the record that describes the referenced class.
  if (record != null)
    return this.setupTableLookup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, record.getDefaultScreenKeyArea(), m_iDescription, true, false); 
  else
    return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc);
}

代码示例来源:origin: org.jbundle.main/org.jbundle.main.db

/**
 * Set up the default screen 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 converter The converter to set the screenfield to.
 * @param iDisplayFieldDesc Display the label? (optional).
 * @param properties Extra properties
 * @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)
{
  Record record = this.getReferenceRecord();  // Get/make the record that describes the referenced class.
  if (record != null)
    return this.setupTableLookup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, record.getDefaultScreenKeyArea(), m_iDescription, true, false); 
  else
    return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties);
}

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Code to display a Menu.
 * @param strMenu The menu to set up.
 */
public void preSetupGrid(String strMenu)
{
  Record record = this.getMainRecord();
  if (record != null)
    record.setOpenMode(record.getOpenMode() | DBConstants.OPEN_CACHE_RECORDS);    // Cache recently used records.
  if (record != null) if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
}
/**

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model

/**
 * Code to display a Menu.
 * @param strMenu The menu to set up.
 */
public void preSetupGrid(String strMenu)
{
  Record record = this.getMainRecord();
  if (record != null)
    record.setOpenMode(record.getOpenMode() | DBConstants.OPEN_CACHE_RECORDS);    // Cache recently used records.
  if (record != null) if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base

/**
 * Set up the default screen control for this field.
 * By default, this is set to a popup.
 * @param itsLocation Location of this component on screen (ie., GridBagConstraint).
 * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
 * @param converter The converter to set the screenfield to.
 * @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)
{
  // Add code here to setup the popup or lookup button
  Record record = this.getReferenceRecord();  // Get/make the record that describes the referenced class.
  if (record != null)
    return this.setupTablePopup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, record.getDefaultScreenKeyArea(), this.getDefaultDisplayFieldSeq(), true, false); 
  else
    return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties);
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Set up the default screen control for this field.
 * By default, this is set to a popup.
 * @param itsLocation Location of this component on screen (ie., GridBagConstraint).
 * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
 * @param converter The converter to set the screenfield to.
 * @param iDisplayFieldDesc Display the label? (optional).
 * @return Return the component or ScreenField that is created for this field.
 */
public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc)
{
  // Add code here to setup the popup or lookup button
  Record record = this.getReferenceRecord();  // Get/make the record that describes the referenced class.
  if (record != null)
    return this.setupTablePopup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, record.getDefaultScreenKeyArea(), this.getDefaultDisplayFieldSeq(), true, false); 
  else
    return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc);
}
/**

代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db

/**
 * Set up the default screen control for this field.
 * By default, this is set to a popup.
 * @param itsLocation Location of this component on screen (ie., GridBagConstraint).
 * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
 * @param converter The converter to set the screenfield to.
 * @param iDisplayFieldDesc Display the label? (optional).
 * @return Return the component or ScreenField that is created for this field.
 */
public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc)
{
  // Add code here to setup the popup or lookup button
  Record record = this.getReferenceRecord();  // Get/make the record that describes the referenced class.
  if (record != null)
    return this.setupTablePopup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, record.getDefaultScreenKeyArea(), this.getDefaultDisplayFieldSeq(), true, false); 
  else
    return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc);
}
/**

代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db

/**
 * Initialize this converter.
 * @param converter The field that controls this grid query (should be a reference record).
 * @param record tour.db.Record The record to control (note, this converter adds a GridTable to the record's table).
 * @param iDisplayFieldSeq int The description field sequence in the grid record.
 * @param bIncludeBlankOption boolean Include a blank line in the popup?
 */
public void init(Converter converter, Record record, int iDisplayFieldSeq, boolean bIncludeBlankOption)
{
  super.init(converter);
  if (converter == null)
    converter = record.getField(iDisplayFieldSeq);
  m_iHandleType = DBConstants.BOOKMARK_HANDLE;
  if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
  record.setOpenMode(DBConstants.OPEN_READ_ONLY);   // Can't change a popup!
  m_record = record;
  if (record.getTable() instanceof GridTable)
    m_gridTable = (GridTable)record.getTable();     // Never
  else
    m_gridTable = new GridTable(null, record);
  m_bIncludeBlankOption = bIncludeBlankOption;
  m_iFieldSeq = iDisplayFieldSeq;
  try   {
    m_gridTable.open();
  } catch (DBException e)   {
    m_gridTable = null;
  }
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Get the default display field for this record (for popups and lookups).
 * @return The sequence of the field that should be displayed.
 */
public int getDefaultDisplayFieldSeq()
{
  int iKeyOrder = this.getDefaultScreenKeyArea();
  if (iKeyOrder == -1)
  {
    for (int i = 0; i < this.getFieldCount(); i++)
    {
      if (this.getField(i).isHidden())
        continue;
      if (this.getField(i) instanceof StringField)
        return i;
    }
    return DBConstants.MAIN_FIELD + 1;
  }
  for (int i = 0; i < this.getFieldCount(); i++)
  {
    if (this.getField(i) == this.getKeyArea(iKeyOrder).getField(DBConstants.FILE_KEY_AREA))
      return i;
  }
  return DBConstants.MAIN_FIELD + 1;
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Initialize this converter.
 * @param converter The field that controls this grid query (should be a reference record).
 * @param record tour.db.Record The record to control (note, this converter adds a GridTable to the record's table).
 * @param iDisplayFieldSeq int The description field sequence in the grid record.
 * @param bIncludeBlankOption boolean Include a blank line in the popup?
 */
public void init(Converter converter, Record record, int iDisplayFieldSeq, boolean bIncludeBlankOption)
{
  super.init(converter);
  if (converter == null)
    converter = record.getField(iDisplayFieldSeq);
  m_iHandleType = DBConstants.BOOKMARK_HANDLE;
  if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
  record.setOpenMode(DBConstants.OPEN_READ_ONLY);   // Can't change a popup!
  m_record = record;
  if (record.getTable() instanceof GridTable)
    m_gridTable = (GridTable)record.getTable();     // Never
  else
    m_gridTable = new GridTable(null, record);
  m_bIncludeBlankOption = bIncludeBlankOption;
  m_iFieldSeq = iDisplayFieldSeq;
  try   {
    m_gridTable.open();
  } catch (DBException e)   {
    m_gridTable = null;
  }
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base

/**
 * Get the default display field for this record (for popups and lookups).
 * @return The sequence of the field that should be displayed.
 */
public int getDefaultDisplayFieldSeq()
{
  String iKeyOrder = this.getDefaultScreenKeyArea();
  if (iKeyOrder == null)
  {
    for (int i = 0; i < this.getFieldCount(); i++)
    {
      if (this.getField(i).isHidden())
        continue;
      if (this.getField(i) instanceof StringField)
        return i;
    }
    return DBConstants.MAIN_FIELD + 1;
  }
  for (int i = 0; i < this.getFieldCount(); i++)
  {
    if (this.getField(i) == this.getKeyArea(iKeyOrder).getField(DBConstants.FILE_KEY_AREA))
      return i;
  }
  return DBConstants.MAIN_FIELD + 1;
}
/**

代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db

/**
 * Get the default display field for this record (for popups and lookups).
 * @return The sequence of the field that should be displayed.
 */
public int getDefaultDisplayFieldSeq()
{
  int iKeyOrder = this.getDefaultScreenKeyArea();
  if (iKeyOrder == -1)
  {
    for (int i = 0; i < this.getFieldCount(); i++)
    {
      if (this.getField(i).isHidden())
        continue;
      if (this.getField(i) instanceof StringField)
        return i;
    }
    return DBConstants.MAIN_FIELD + 1;
  }
  for (int i = 0; i < this.getFieldCount(); i++)
  {
    if (this.getField(i) == this.getKeyArea(iKeyOrder).getField(DBConstants.FILE_KEY_AREA))
      return i;
  }
  return DBConstants.MAIN_FIELD + 1;
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base

m_iHandleType = DBConstants.BOOKMARK_HANDLE;
if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
  record.setKeyArea(record.getDefaultScreenKeyArea());

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

if (mainRecord.getKeyArea() != null)
    if (mainRecord.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
      mainRecord.setKeyArea(mainRecord.getDefaultScreenKeyArea());
this.openOtherRecords();    // Open the other files
this.setScreenRecord(this.addScreenRecord());

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model

if (((Record)mainRecord).getKeyArea() != null)
    if (((Record)mainRecord).getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
        ((Record)mainRecord).setKeyArea(((Record)mainRecord).getDefaultScreenKeyArea());
this.openOtherRecords();    // Open the other files
this.setScreenRecord(this.addScreenRecord());

代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.request.db

recItem.setKeyArea(recItem.getDefaultScreenKeyArea());
BaseListener listener = recBundleDetail.getField(BundleDetail.BROCHURE_ID).getListener(ReadSecondaryHandler.class.getName());
if (listener != null)

相关文章

微信公众号

最新文章

更多

Record类方法