actiondescriptor.java
字号:
package piy;
import java.io.File;
import javax.swing.ImageIcon;
import java.awt.Image;
/**
* All implemented actions can have a related descriptor class (a subclass of this one).
* The class is responsible for giving PIY specific information, in the case of actions
* this information includes a toolbar icon (24x24), an actionlist viewer icon (40x40) and
* (optional) properties order information. <p>
* Since this class is used to describe PIYComparators as well now, it could do with refactoring -
* maybe call it ExtendedDescriptor or something.
* @author David Vivash
* @version 1.0.3, 28/04/01
*/
public abstract class ActionDescriptor extends Descriptor
{
/**
* Returns the (40x40) icon that should be displayed in the actionlist viewer window.
* @return the (large) image of the thing being described
*/
public ImageIcon getBigIcon() {
String sep = File.separator;
return new ImageIcon("piy" + sep + "images" + sep + "bigdefault.gif");
}
/**
* Get the (ordered) list of property names in the action being described. This list
* should include all properties, not just those supported. If this method is not
* overridden then piy will retrieve the property names itself, although the order cannot
* be gauranteed. (That said, the getMethods() method seems to collect the properties
* in alphabetical order. This could, perhaps, be relied upon). THIS IS NOT
* YET IMPLEMENTED.
* @return an array of Strings which tells piy which order the actions come in. <br>
* May return null.
*/
public String[] getPropertyOrder() {
return null;
}
/**
* Each action can have a category - it will appear under a tab with this name in the
* action list editor. For example, actions that deal with files might specify "File",
* actions that deal with text might be in the "Text" category.
* @return the category name of the action, set to "General" by default
*/
public String getCategory() { return "General"; }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -