Source Code Cross Referenced for GraphSelectionModel.java in  » Graphic-Library » jgraph » org » jgraph » graph » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » jgraph » org.jgraph.graph 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)GraphSelectionModel.java	0.1 03-JUL-04
003:         * 
004:         * Copyright (c) 2001-2004 Gaudenz Alder
005:         *  
006:         */
007:        package org.jgraph.graph;
008:
009:        import java.beans.PropertyChangeListener;
010:
011:        import org.jgraph.event.GraphSelectionListener;
012:
013:        /**
014:         * This interface represents the current state of the selection for
015:         * the graph component.
016:         * <p>
017:         *
018:         * A GraphSelectionModel can be configured to allow only one
019:         * cell (<code>SINGLE_GRAPH_SELECTION</code>) or a number of
020:         * cells (<code>MULTIPLE_GRAPH_SELECTION</code>).
021:         *
022:         * @version 0.1 1/1/02
023:         * @author Gaudenz Alder
024:         */
025:
026:        public interface GraphSelectionModel {
027:
028:            /** Selection can only contain one cell at a time. */
029:            public static final int SINGLE_GRAPH_SELECTION = 1;
030:
031:            /** Selection can contain any number of items. */
032:            public static final int MULTIPLE_GRAPH_SELECTION = 4;
033:
034:            /**
035:             * Sets the selection model, which must be either
036:             * SINGLE_GRAPH_SELECTION or MULTIPLE_GRAPH_SELECTION.
037:             * <p>
038:             * This may change the selection if the current selection is not valid
039:             * for the new mode.
040:             */
041:            void setSelectionMode(int mode);
042:
043:            /**
044:             * Sets if the selection model allows the selection
045:             * of children.
046:             */
047:            void setChildrenSelectable(boolean flag);
048:
049:            /**
050:             * Returns true if the selection model allows the selection
051:             * of children.
052:             */
053:            boolean isChildrenSelectable();
054:
055:            /**
056:             * Returns the current selection mode, either
057:             * <code>SINGLE_GRAPH_SELECTION</code> or
058:             * <code>MULTIPLE_GRAPH_SELECTION</code>.
059:             */
060:            int getSelectionMode();
061:
062:            /**
063:             * Sets the selection to cell. If this represents a change, then
064:             * the GraphSelectionListeners are notified. If <code>cell</code> is
065:             * null, this has the same effect as invoking <code>clearSelection</code>.
066:             *
067:             * @param cell new cell to select
068:             */
069:            void setSelectionCell(Object cell);
070:
071:            /**
072:             * Sets the selection to cells. If this represents a change, then
073:             * the GraphSelectionListeners are notified. If <code>cells</code> is
074:             * null, this has the same effect as invoking <code>clearSelection</code>.
075:             *
076:             * @param cells new selection
077:             */
078:            void setSelectionCells(Object[] cells);
079:
080:            /**
081:             * Adds cell to the current selection. If cell is not currently
082:             * in the selection the GraphSelectionListeners are notified. This has
083:             * no effect if <code>cell</code> is null.
084:             *
085:             * @param cell the new cell to add to the current selection
086:             */
087:            void addSelectionCell(Object cell);
088:
089:            /**
090:             * Adds cells to the current selection.  If any of the cells are
091:             * not currently in the selection the GraphSelectionListeners
092:             * are notified. This has no effect if <code>cells</code> is null.
093:             *
094:             * @param cells the new cells to add to the current selection
095:             */
096:            void addSelectionCells(Object[] cells);
097:
098:            /**
099:             * Removes cell from the selection. If cell is in the selection
100:             * the GraphSelectionListeners are notified. This has no effect if
101:             * <code>cell</code> is null.
102:             *
103:             * @param cell the cell to remove from the selection
104:             */
105:            void removeSelectionCell(Object cell);
106:
107:            /**
108:             * Removes cells from the selection.  If any of the cells in
109:             * <code>cells</code> are in the selection, the
110:             * GraphSelectionListeners are notified. This method has no
111:             * effect if <code>cells</code> is null.
112:             *
113:             * @param cells the cells to remove from the selection
114:             */
115:            void removeSelectionCells(Object[] cells);
116:
117:            /**
118:             * Returns the cells that are currently selectable.
119:             */
120:            Object[] getSelectables();
121:
122:            /**
123:             * Returns the first cell in the selection. How first is defined is
124:             * up to implementors.
125:             */
126:            Object getSelectionCell();
127:
128:            /**
129:             * Returns the cells in the selection. This will return null (or an
130:             * empty array) if nothing is currently selected.
131:             */
132:            Object[] getSelectionCells();
133:
134:            /**
135:             * Returns the number of cells that are selected.
136:             */
137:            int getSelectionCount();
138:
139:            /**
140:             * Returns true if the cell, <code>cell</code>, is in the current
141:             * selection.
142:             */
143:            boolean isCellSelected(Object cell);
144:
145:            /**
146:             * Returns true if the cell, <code>cell</code>,
147:             * has selected children.
148:             */
149:            boolean isChildrenSelected(Object cell);
150:
151:            /**
152:             * Returns true if the selection is currently empty.
153:             */
154:            boolean isSelectionEmpty();
155:
156:            /**
157:             * Empties the current selection.  If this represents a change in the
158:             * current selection, the selection listeners are notified.
159:             */
160:            void clearSelection();
161:
162:            /**
163:             * Adds a PropertyChangeListener to the listener list.
164:             * The listener is registered for all properties.
165:             * <p>
166:             * A PropertyChangeEvent will get fired when the selection mode
167:             * changes.
168:             *
169:             * @param listener  the PropertyChangeListener to be added
170:             */
171:            void addPropertyChangeListener(PropertyChangeListener listener);
172:
173:            /**
174:             * Removes a PropertyChangeListener from the listener list.
175:             * This removes a PropertyChangeListener that was registered
176:             * for all properties.
177:             *
178:             * @param listener  the PropertyChangeListener to be removed
179:             */
180:            void removePropertyChangeListener(PropertyChangeListener listener);
181:
182:            /**
183:             * Adds x to the list of listeners that are notified each time the
184:             * set of selected Objects changes.
185:             *
186:             * @param x the new listener to be added
187:             */
188:            void addGraphSelectionListener(GraphSelectionListener x);
189:
190:            /**
191:             * Removes x from the list of listeners that are notified each time
192:             * the set of selected Objects changes.
193:             *
194:             * @param x the listener to remove
195:             */
196:            void removeGraphSelectionListener(GraphSelectionListener x);
197:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.