⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dragdropobj.java

📁 sifi-0.1.6.tar.gz 出自http://www.ifi.unizh.ch/ikm/SINUS/firewall/ 一个linux的防火墙工具。
💻 JAVA
字号:
/* ----------------------------------------------------------------------   The SINUS Firewall -- a TCP/IP packet filter for Linux   Written within the SINUS project at the University of Zurich,   SWITCH, Telekurs Payserv AG, ETH Zurich.   originally based on the sf Firewall Software (C) 1996 by Robert   Muchsel and Roland Schmid.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   SINUS Firewall resources:   SINUS Homepage: http://www.ifi.unizh.ch/ikm/SINUS/   Firewall Homepage: http://www.ifi.unizh.ch/ikm/SINUS/firewall.html   Frequently asked questions: http://www.ifi.unizh.ch/ikm/SINUS/sf_faq.html   Mailing list for comments, questions, bug reports: firewall@ifi.unizh.ch   ----------------------------------------------------------------------  */package sfclasses;import java.awt.*;/** * Interface for drag-and-drop objects used by class DragDrop * @see DragDrop * @version 1.0 29 Nov 1996 * @author Roland E. Schmid */public interface DragDropObj {  /**   * Load image if not yet loaded<br>   * This function is called by DragDrop immediately after object creation.   * @param target component where image is to be drawn   * @param mt MediaTracker: DragDrop waits for all images in mt to be loaded   */  public void initImage(Component target, MediaTracker mt);  /**   * Determine if the mouse cursor is located above the object.   * @param x virtual x coordinate   * @param y virtual y coordinate   * @return true if the object covers (x,y)   */  public boolean hasFocus(int x, int y);  /**   * Set new virtual object coordinates.   * This should be called after erase() and before draw()   * @param x virtual x coordinate   * @param y virtual y coordinate   * @see #draw   * @see #erase   */  public void setCoordinates(int x, int y);  /**   * Get x coordinate.   * @return x coordinate   */  public int getX();  /**   * Get y coordinate.   * @return y coordinate   */  public int getY();  /**   * Get coordinates for connecting an edge towards destination.   * @param destination coordinates of destination vertex   * @return coordinates on the border of the object   */  public Point connectionCoord(Point destination);  /**   * Draw object at position set with setCoordinates().   * @param g Graphics object for drawing routines   * @param x_offset virtual x offset of canvas origin (due to scrolling)   * @param y_offset virtual y offset of canvas origin (due to scrolling)   * @see #setCoordinates   */  public void draw(Graphics g, int x_offset, int y_offset);  /**   * Erase object at position set with setCoordinates().   * @param g Graphics object for drawing routines   * @param x_offset virtual x offset of canvas origin (due to scrolling)   * @param y_offset virtual y offset of canvas origin (due to scrolling)   * @see #setCoordinates   */  public void erase(Graphics g, int x_offset, int y_offset);  /**   * Turn object highlight on or off.   * @param g Graphics object for drawing routines   * @param x_offset virtual x offset of canvas origin (due to scrolling)   * @param y_offset virtual y offset of canvas origin (due to scrolling)   * @param highlight true: turn highlight on, false: turn highlight off   */  public void highlight(Graphics g, int x_offset, int y_offset, boolean highlight);  /**   * Check if object is highlighted.   * @return true if object is highlighted, false otherwise   */  public boolean isHighlight();	/**	 * Check wether this object is allowed to connect to the given	 * object or not.	 * @param dd DragDrop object to check connection to.	 * @return true if connection allowed, false otherwise.	 */	public boolean canConnectTo(DragDropObj dd);	/**	 * Called if user tried to connect to object that are not	 * allowed to be connected.	 * @param parent Parent frame in case the object whishes to dispaly	 * an error dialog	 */	public void connectError(Frame parent);  /**   * Execute object specific routines, e.g. property setting dialog.    * execute() is called when the user double-clicks on the object and   * edit mode is enabled.   * @param parent Parent frame for execute() to be able to use dialog   * boxes or to create child frames.   */  public void execute(DragDrop dd);  /**   * Called before deleting an object.   * @return true if object deletion may proceed   */  public boolean confirmDelete();  /**   * Called when editing is disabled and user clicks on an object.   * @param g Graphics object for drawing routines   * @param x_offset virtual x offset of canvas origin (due to scrolling)   * @param y_offset virtual y offset of canvas origin (due to scrolling)   */  public void userAction(Frame parent, Graphics g, int x_offset, int y_offset);  /**   * Returns a String describing the object. This string is displayed in   * the status line when the object is selected.   * @return objectID string   */  public String getObjectID();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -