001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.uml.ui.swing.drawingarea;
043:
044: import org.netbeans.modules.uml.core.metamodel.core.foundation.IPresentationElement;
045: import org.netbeans.modules.uml.core.metamodel.diagrams.IDiagram;
046: import org.netbeans.modules.uml.core.metamodel.diagrams.IProxyDiagram;
047: import org.netbeans.modules.uml.core.support.umlsupport.IResultCell;
048: import org.netbeans.modules.uml.ui.support.viewfactorysupport.IToolTipData;
049:
050: public interface IDrawingAreaEventsSink {
051: /**
052: * Fired when a drawing area is created.
053: */
054: public void onDrawingAreaPreCreated(
055: IDrawingAreaControl pDiagramControl, IResultCell cell);
056:
057: /**
058: * Fired when a drawing area is created.
059: */
060: public void onDrawingAreaPostCreated(
061: IDrawingAreaControl pDiagramControl, IResultCell cell);
062:
063: /**
064: * Fired when a drawing area is opened.
065: */
066: public void onDrawingAreaOpened(IDiagram pParentDiagram,
067: IResultCell cell);
068:
069: /**
070: * Fired when a drawing area is closed.
071: */
072: public void onDrawingAreaClosed(IDiagram pParentDiagram,
073: boolean bDiagramIsDirty, IResultCell cell);
074:
075: /**
076: * Fired when a drawing area is saved.
077: */
078: public void onDrawingAreaPreSave(IProxyDiagram pParentDiagram,
079: IResultCell cell);
080:
081: /**
082: * Fired when a drawing area is saved.
083: */
084: public void onDrawingAreaPostSave(IProxyDiagram pParentDiagram,
085: IResultCell cell);
086:
087: /**
088: * A key has been pressed.
089: */
090: public void onDrawingAreaKeyDown(IDiagram pParentDiagram,
091: int nKeyCode, boolean bControlIsDown, boolean bShiftIsDown,
092: boolean bAltIsDown, IResultCell cell);
093:
094: /**
095: * Fired when a drawing area property has changed.
096: */
097: public void onDrawingAreaPrePropertyChange(
098: IProxyDiagram pProxyDiagram, /* DrawingAreaPropertyKind */
099: int nPropertyKindChanged, IResultCell cell);
100:
101: /**
102: * Fired when a drawing area property has changed.
103: */
104: public void onDrawingAreaPostPropertyChange(
105: IProxyDiagram pProxyDiagram, /* DrawingAreaPropertyKind */
106: int nPropertyKindChanged, IResultCell cell);
107:
108: /**
109: * The tooltip is about to be displayed.
110: */
111: public void onDrawingAreaTooltipPreDisplay(IDiagram pParentDiagram,
112: IPresentationElement pPE, IToolTipData pTooltip,
113: IResultCell cell);
114:
115: /**
116: * Fired when a drawing area has been activated.
117: */
118: public void onDrawingAreaActivated(IDiagram pParentDiagram,
119: IResultCell cell);
120:
121: /**
122: * Fired right before items are dropped onto the diagram.
123: */
124: public void onDrawingAreaPreDrop(IDiagram pParentDiagram,
125: IDrawingAreaDropContext pContext, IResultCell cell);
126:
127: /**
128: * Fired after items are dropped onto the diagram.
129: */
130: public void onDrawingAreaPostDrop(IDiagram pParentDiagram,
131: IDrawingAreaDropContext pContext, IResultCell cell);
132:
133: /**
134: * Fired right before a diagram file is removed from disk.
135: */
136: public void onDrawingAreaPreFileRemoved(String sFilename,
137: IResultCell cell);
138:
139: /**
140: * Fired after a diagram file is removed from disk.
141: */
142: public void onDrawingAreaFileRemoved(String sFilename,
143: IResultCell cell);
144:
145: }
|