popupcontributor.java
来自「ErGo是一个很早的Java通用围棋服务器(IGS/NNGS)客户端程序。有全部」· Java 代码 · 共 42 行
JAVA
42 行
package ergo.ui;
// $Id: PopupContributor.java,v 1.4 1999/08/29 02:42:24 sigue Exp $
/*
* Copyright (C) 1999 Carl L. Gay and Antranig M. Basman.
* See the file copyright.txt, distributed with this software,
* for further information.
*/
import java.awt.Component;
import java.awt.PopupMenu;
import java.awt.event.MouseEvent;
/**
* Ergo components should implement this if they wish to add items
* to the popup menu before it is displayed. In general they may
* wish to use "if (p.countItems() > 0) p.addSeparator();"
*
* @see PopupController
*/
public interface PopupContributor {
/** Add items to the popup menu.
*
* @param origin The actual component on which the event was triggered.
* @param x The x coordinate of the event.
* @param y The y coordinate of the event.
*/
void populatePopupMenu (PopupMenu p, Component origin, int x, int y);
/**
* @param origin The actual component on which the event was triggered.
*
* @return true if the parent components of this PopupContributor
* should be allowed to add items to the popup menu. Sometimes you
* want to keep the menu short and sweet, so return false. Origin
* is the actual component on which the event was triggered.
*/
boolean allowMoreItems (Component origin);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?