?? listunselectedstate.java
字號:
// **********************************************************************// // <copyright>// // BBN Technologies// 10 Moulton Street// Cambridge, MA 02138// (617) 873-8000// // Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source:// /cvs/distapps/openmap/src/openmap/com/bbn/openmap/omGraphics/editable/ListUnselectedState.java,v// $// $RCSfile: ListUnselectedState.java,v $// $Revision: 1.2.2.2 $// $Date: 2005/08/10 22:45:10 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.omGraphics.editable;import java.awt.event.MouseEvent;import com.bbn.openmap.omGraphics.EditableOMGraphic;import com.bbn.openmap.omGraphics.GrabPoint;import com.bbn.openmap.util.Debug;public class ListUnselectedState extends GraphicUnselectedState { public ListUnselectedState(EditableOMGraphic eomg) { super(eomg); } /** * In this state, we need to change states only if the graphic, or * it's grab points are clicked on. If a point is clicked on, then * it should become the moving point, and the graphic should be * changed to edit mode. */ public boolean mousePressed(MouseEvent e) { Debug.message("eomg", "ListStateMachine|unselected state|mousePressed"); GrabPoint mp = graphic.getMovingPoint(e); if (mp != null) { // Else, set the moving point, and go to edit mode. If // the mouse is released, we'll consider ourselves // unselected again. graphic.getStateMachine().setEdit(); graphic.fireEvent(EOMGCursors.EDIT, ""); graphic.redraw(e, true); } return getMapMouseListenerResponse(); } public boolean mouseReleased(MouseEvent e) { Debug.message("eomg", "ListStateMachine|unselected state|mouseReleased"); GrabPoint mp = graphic.getMovingPoint(e); if (mp != null) { graphic.getStateMachine().setSelected(); graphic.fireEvent(EOMGCursors.EDIT, ""); graphic.setMovingPoint(null); } return getMapMouseListenerResponse(); } public boolean mouseMoved(MouseEvent e) { Debug.message("eomgdetail", "ListStateMachine|unselected state|mouseMoved"); GrabPoint mp = graphic.getMovingPoint(e); if (mp != null) { graphic.fireEvent(EOMGCursors.EDIT, i18n.get(ListUnselectedState.class, "Click_to_select_the_graphic.", "Click to select the graphic.")); } else { graphic.fireEvent(EOMGCursors.DEFAULT, ""); } return false; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -