📄 abstractbasedialog.java
字号:
package jm.form.gui.swing.game.util.model;
import jm.framework.gui.AppActionResult;
import jm.framework.gui.FormTable;
import jm.framework.gui.JMEntity;
import jm.framework.gui.module.jmtable.SimpleTable;
import jm.util.JM2DArray;
import jm.util.JMUtility;
/**
* <p>Title: JM 整合Swing控件,使用配置信息</p>
*
* <p>Copyright: Copyright (c) 2004-2006</p>
*
* <p>Company: 1SHome</p>
*
* <p>@author Spook</p>
*
* @since 1.3
* @see JDK 1.5.0.6
*/
public abstract class AbstractBaseDialog extends BaseDialog implements FormTable {
protected SimpleTable table = null;
protected JM2DArray datasSource = new JM2DArray();
protected boolean isEdit = false;
public void setEditing (boolean edit) {
isEdit = edit;
}
protected String[] fields = null;
public String[] getTableItemsData () {
return fields;
}
public boolean getEditing () {
return isEdit;
}
public JM2DArray getTableDataSource () {
return datasSource;
}
public void setTableDataSource (JM2DArray datasSources) {
try {
datasSource.delAllRow();
datasSource.addAll(datasSources);
} catch (Exception e) {
e.printStackTrace();
}
}
public boolean queryClose () {
return true;
}
/**
* 更新当前数据
*/
public void reLoadTable () {
table.reLoad();
}
public void clearSelectLine () {
table.clearSelection();
}
public JMEntity getSelectData () {
try {
JMEntity _entity = (JMEntity) getReturnData(AppActionResult.ACTION_SELECT);
if (_entity != null) {
JMEntity _tableEntity = (JMEntity) (Class.forName(_entity.getClass().getName()).newInstance());
JMUtility.reflectIntoEntity(_tableEntity, (getTableDataSource()), getSelectLine());
return _tableEntity;
}
} catch (Exception e) {
}
return null;
}
public int getSelectLine () {
return table.getSelectLine();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -