📄 linsertaction.java
字号:
package jm.form.gui.swing.game.util.action.local;
import java.awt.event.ActionEvent;
import jm.form.gui.swing.game.system.SystemManager;
import jm.form.gui.swing.game.util.action.command.CommandKeys;
import jm.framework.gui.FormTable;
import jm.framework.gui.JMEntity;
import jm.framework.gui.container.JMGUIActionListener;
import jm.util.JMUtility;
import jm.framework.gui.AppActionResult;
/**
* <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 class LInsertAction implements JMGUIActionListener {
private FormTable parent = null;
public LInsertAction (FormTable owner) {
parent = owner;
}
/**
* Invoked when an action occurs.
*
* @param e ActionEvent
* @todo Implement this java.awt.event.ActionListener method
*/
public void actionPerformed (ActionEvent e) {
SystemManager.getInstance().clearMessage();
try {
if (parent.getEditing() == false) {
JMEntity _entity = (JMEntity) parent.getReturnData(AppActionResult.ACTION_INSERT);
if (_entity != null) {
JMUtility.reflectIntoJM2DArray(
_entity,
(parent.getTableDataSource()), -1);
parent.reLoadTable();
SystemManager.getInstance().setMessage(CommandKeys.INSERT_SUCCESS);
} else {
SystemManager.getInstance().setMessage(CommandKeys.INSERT_ERROR);
}
} else {
SystemManager.getInstance().setMessage(CommandKeys.EDIT_SAVE);
}
} catch (Exception ex) {
SystemManager.getInstance().setMessageOnSystemError(ex);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -