actionlistsupport.java
字号:
package piy.support;
import piy.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
/**
* Simple class that delegates responsibility to the ActionListEditor.
* @author David Vivash
* @version 1.0, 03/05/01
*/
public class ActionListSupport extends ClassSupport implements ActionListener {
private JFrame editor = null;
public ActionListSupport(Property property) {
super(property);
setLayout(new BorderLayout());
JButton button = new JButton("Edit");
button.addActionListener(this);
add(button, BorderLayout.CENTER);
ActionList list = (ActionList)property.getValue();
if (list == null) list = new ActionList();
list = (ActionList)property.getValue();
editor = new ActionListEditor(PIY.getInstance().getActionDescriptors(), list);
}
public static Class getSupportedClass() { return ActionList.class; }
public void actionPerformed(ActionEvent e) {
editor.show();
}
public Dimension getMinimumSize() { return new Dimension(10, 20); }
public Dimension getPreferredSize() { return new Dimension(100, 20); }
public Dimension getMaximumSize() { return new Dimension(10000, 20); }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -