abstracteditui.java
来自「《j2ee开发全程实录》随书源码」· Java 代码 · 共 71 行
JAVA
71 行
package com.cownew.PIS.ui.commonUI;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.JToolBar;
import com.cownew.PIS.ui.base.UIPanel;
import com.cownew.PIS.ui.utils.PISAbstractAction;
public class AbstractEditUI extends UIPanel
{
protected JToolBar toolBar = null;
protected ActionSubmit actionSubmit;
public AbstractEditUI() throws Exception
{
super();
}
protected void initialize()
{
super.initialize();
setSize(200,200);
}
public JToolBar getToolBar()
{
if (toolBar == null)
{
toolBar = new JToolBar();
toolBar.setFloatable(false);
initToolBar(toolBar);
}
return toolBar;
}
protected void initAction()
{
super.initAction();
actionSubmit = new ActionSubmit("保存");
}
protected void initToolBar(JToolBar tBar)
{
JButton btnSubmit = new JButton(actionSubmit);
tBar.add(btnSubmit);
}
class ActionSubmit extends PISAbstractAction
{
public ActionSubmit(String name)
{
super(name);
}
public void onActionPerformed(ActionEvent e) throws Exception
{
actionSubmit_actionPerformed(e);
}
}
public void actionSubmit_actionPerformed(ActionEvent e) throws Exception
{
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?