📄 abilitypanel1.java.svn-base
字号:
package jm.form.gui.swing.game.form.layout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Rectangle;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import jm.entity.util.MenuFrameBean;
import jm.form.gui.swing.game.util.model.BaseIDTextField;
import jm.form.gui.swing.game.util.model.BaseLabel;
import jm.framework.gui.AppActionHandler;
/**
* <p>能力数值</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 AbilityPanel1 extends JPanel implements AppActionHandler{
public AbilityPanel1 () {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
public Object getReturnData (int type) {
// Ability1 aititonData = new Ability1();
//
// aititonData.setLevels(Level.getText());
// aititonData.setLife(Life.getText());
// aititonData.setExperience(Experience.getText());
// aititonData.setPAttackMin(PAttackMin.getText());
// aititonData.setPAttackMax(PAttackMax.getText());
// aititonData.setPRecoveryMin(PRecoveryMin.getText());
// aititonData.setPRecoveryMax(PRecoveryMax.getText());
// aititonData.setMAttackMin(MAttackMin.getText());
// aititonData.setMAttackMax(MAttackMax.getText());
// aititonData.setMRecoveryMin(MRecoveryMin.getText());
// aititonData.setMRecoveryMax(MRecoveryMax.getText());
// aititonData.setDeadliness(Deadliness.getText());
// aititonData.setSpeed(Speed.getText());
return null;
}
public void actionPerformed (MenuFrameBean bean, Object aoParams) {
// if(aoParams!=null&&aoParams instanceof Ability1){
// Ability1 aititonData = (Ability1)aoParams;
// Level.setText(aititonData.getLevels());
// Life.setText(aititonData.getLife());
// Experience.setText(aititonData.getExperience());
// PAttackMin.setText(aititonData.getPAttackMin());
// PAttackMax.setText(aititonData.getPAttackMax());
// PRecoveryMin.setText(aititonData.getPRecoveryMin());
// PRecoveryMax.setText(aititonData.getPRecoveryMax());
// MAttackMin.setText(aititonData.getMAttackMin());
// MAttackMax.setText(aititonData.getMAttackMax());
// MRecoveryMin.setText(aititonData.getMRecoveryMin());
// MRecoveryMax.setText(aititonData.getMRecoveryMax());
// Deadliness.setText(aititonData.getDeadliness());
// Speed.setText(aititonData.getSpeed());
// }
}
private void jbInit () throws Exception {
Level.setBounds(new Rectangle(74, 25, 80, 22));
LevelLabel.setText("等级");
LevelLabel.setBounds(new Rectangle(16, 25, 50, 22));
LifeLabel.setText("生命");
LifeLabel.setBounds(new Rectangle(16, 49, 50, 22));
Deadliness.setBounds(new Rectangle(74, 194, 80, 22));
DeadlinessLabel.setText("致命一击");
DeadlinessLabel.setBounds(new Rectangle(16, 194, 50, 22));
PAttackMin.setBounds(new Rectangle(74, 97, 28, 22));
PAttackLabel.setText("物理攻击");
PAttackLabel.setBounds(new Rectangle(16, 97, 50, 22));
PRecoveryLabel.setText("物理防御");
PRecoveryLabel.setBounds(new Rectangle(16, 121, 50, 22));
MAttackLabel.setText("魔法攻击");
MAttackLabel.setBounds(new Rectangle(16, 145, 50, 22));
TitleLabel.setForeground(Color.red);
TitleLabel.setBounds(new Rectangle(5, 5, 130, 16));
this.setSize(new Dimension(170, 250));
this.setLayout(null);
this.setBorder(BorderFactory.createEtchedBorder());
PAttackF.setHorizontalAlignment(SwingConstants.CENTER);
PAttackF.setText("~");
PAttackF.setBounds(new Rectangle(105, 100, 18, 17));
PAttackMax.setBounds(new Rectangle(126, 97, 28, 22));
Life.setBounds(new Rectangle(74, 49, 80, 22));
PRecoveryMin.setBounds(new Rectangle(74, 121, 28, 22));
PRecoveryF.setHorizontalAlignment(SwingConstants.CENTER);
PRecoveryF.setText("~");
PRecoveryF.setBounds(new Rectangle(105, 124, 18, 17));
PRecoveryMax.setBounds(new Rectangle(126, 121, 28, 22));
MRecoveryF.setText("~");
MRecoveryF.setBounds(new Rectangle(105, 172, 18, 17));
MRecoveryF.setHorizontalAlignment(SwingConstants.CENTER);
MAttackMin.setBounds(new Rectangle(74, 145, 28, 22));
MAttackMax.setBounds(new Rectangle(126, 145, 28, 22));
MRecoveryLabel.setText("魔法防御");
MRecoveryLabel.setBounds(new Rectangle(16, 169, 50, 22));
MRecoveryMin.setBounds(new Rectangle(74, 169, 28, 22));
MAttackF.setHorizontalAlignment(SwingConstants.CENTER);
MAttackF.setText("~");
MAttackF.setBounds(new Rectangle(105, 148, 18, 17));
MRecoveryMax.setBounds(new Rectangle(126, 169, 28, 22));
ExperienceLabel.setText("经验");
ExperienceLabel.setBounds(new Rectangle(16, 73, 50, 22));
Experience.setBounds(new Rectangle(74, 73, 80, 22));
SpeedLabel.setText("攻击速度");
SpeedLabel.setBounds(new Rectangle(16, 219, 50, 22));
Speed.setBounds(new Rectangle(74, 219, 80, 22));
this.add(TitleLabel);
this.add(PAttackLabel);
this.add(PAttackF);
this.add(Life);
this.add(PAttackMin);
this.add(PAttackMax);
this.add(MAttackMin);
this.add(PRecoveryLabel);
this.add(PRecoveryMax);
this.add(MAttackMax);
this.add(MAttackLabel);
this.add(MAttackF);
this.add(Level);
this.add(LevelLabel);
this.add(LifeLabel);
this.add(PRecoveryF);
this.add(PRecoveryMin);
this.add(ExperienceLabel);
this.add(Experience);
this.add(MRecoveryF);
this.add(MRecoveryMax);
this.add(DeadlinessLabel);
this.add(Deadliness);
this.add(MRecoveryLabel);
this.add(MRecoveryMin);
this.add(Speed);
this.add(SpeedLabel);
}
private BaseIDTextField Level = new BaseIDTextField();
private BaseIDTextField Life = new BaseIDTextField();
private BaseIDTextField Experience = new BaseIDTextField();
private BaseIDTextField PAttackMin = new BaseIDTextField();
private BaseIDTextField PAttackMax = new BaseIDTextField();
private BaseIDTextField PRecoveryMin = new BaseIDTextField();
private BaseIDTextField PRecoveryMax = new BaseIDTextField();
private BaseIDTextField MAttackMin = new BaseIDTextField();
private BaseIDTextField MAttackMax = new BaseIDTextField();
private BaseIDTextField MRecoveryMin = new BaseIDTextField();
private BaseIDTextField MRecoveryMax = new BaseIDTextField();
private BaseIDTextField Deadliness = new BaseIDTextField();
private BaseIDTextField Speed = new BaseIDTextField();
private BaseLabel MAttackLabel = new BaseLabel();
private BaseLabel LevelLabel = new BaseLabel();
private BaseLabel LifeLabel = new BaseLabel();
private BaseLabel DeadlinessLabel = new BaseLabel();
private BaseLabel PAttackLabel = new BaseLabel();
private BaseLabel PRecoveryLabel = new BaseLabel();
private BaseLabel TitleLabel = new BaseLabel();
private BaseLabel MRecoveryLabel = new BaseLabel();
private BaseLabel ExperienceLabel = new BaseLabel();
private BaseLabel SpeedLabel = new BaseLabel();
private JLabel PAttackF = new JLabel();
private JLabel PRecoveryF = new JLabel();
private JLabel MAttackF = new JLabel();
private JLabel MRecoveryF = new JLabel();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -