KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > gui > graph > model > Tools


1 /***
2  * FractalGUI: a graphical tool to edit Fractal component configurations.
3  * Copyright (C) 2003 France Telecom R&D
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: fractal@objectweb.org
20  *
21  * Authors: Eric Bruneton, Patrice Fauvel
22  */

23
24 package org.objectweb.fractal.gui.graph.model;
25
26 import org.objectweb.fractal.gui.model.Interface;
27
28 /**
29  * A model for graph editing tools.
30  */

31
32 public interface Tools {
33
34   /**
35    * The selection tool. This tool can be used to select, move and resize
36    * components.
37    */

38
39   int SELECT = 0;
40
41   /**
42    * The binding tool. This tool can be used to create and remove bindings
43    * between components.
44    */

45
46   int BIND = 1;
47
48   /**
49    * The move tool. This tool can be used to scroll the graph area shown by the
50    * display.
51    */

52
53   int MOVE = 2;
54
55   /**
56    * The zoom in tool. This tool can be used to reduce the graph area shown by
57    * the display, i.e. to zoom in.
58    */

59
60   int ZOOM_IN = 3;
61
62   /**
63    * The zoom out tool. This tool can be used to increase the graph area shown
64    * by the display, i.e. to zoom out.
65    */

66
67   int ZOOM_OUT = 4;
68
69   /**
70    * Returns the currently selected tool.
71    *
72    * @return the currently selected tool.
73    * @see #setTool
74    */

75
76   int getTool ();
77
78   /**
79    * Sets the currently selected tool.
80    *
81    * @param tool the new selected tool.
82    * @see #getTool
83    */

84
85   void setTool (int tool);
86
87   /**
88    * Returns the client interface that will be bound by the {@link #BIND} tool.
89    *
90    * @return the client interface that will be bound by the {@link #BIND} tool.
91    * @see #setBindInterface
92    */

93
94   Interface getBindInterface ();
95
96   /**
97    * Sets the client interface that will be bound by the {@link #BIND} tool.
98    *
99    * @param i the client interface that will be bound by the {@link #BIND} tool.
100    * @see #getBindInterface
101    */

102
103   void setBindInterface (Interface i);
104 }
105
Popular Tags