44 |
import javax.swing.event.TreeModelEvent; |
import javax.swing.event.TreeModelEvent; |
45 |
|
|
46 |
/** |
/** |
47 |
* AbstractLayoutCache |
* class AbstractLayoutCache |
48 |
|
* |
49 |
* @author Andrew Selkirk |
* @author Andrew Selkirk |
50 |
*/ |
*/ |
51 |
public abstract class AbstractLayoutCache implements RowMapper |
public abstract class AbstractLayoutCache implements RowMapper |
52 |
{ |
{ |
|
|
|
|
//------------------------------------------------------------- |
|
|
// Classes ---------------------------------------------------- |
|
|
//------------------------------------------------------------- |
|
|
|
|
53 |
/** |
/** |
54 |
* NodeDimensions |
* class NodeDimensions |
55 |
*/ |
*/ |
56 |
public abstract static class NodeDimensions { |
public abstract static class NodeDimensions |
57 |
|
{ |
|
//------------------------------------------------------------- |
|
|
// Initialization --------------------------------------------- |
|
|
//------------------------------------------------------------- |
|
|
|
|
58 |
/** |
/** |
59 |
* Constructor NodeDimensions |
* Creates <code>NodeDimensions</code> object. |
60 |
*/ |
*/ |
61 |
public NodeDimensions() { |
public NodeDimensions() |
62 |
// TODO |
{ |
63 |
} // NodeDimensions() |
// Do nothing here. |
64 |
|
} |
|
|
|
|
//------------------------------------------------------------- |
|
|
// Methods ---------------------------------------------------- |
|
|
//------------------------------------------------------------- |
|
65 |
|
|
66 |
/** |
/** |
67 |
* getNodeDimensions |
* getNodeDimensions |
68 |
|
* |
69 |
* @param value0 TODO |
* @param value0 TODO |
70 |
* @param value1 TODO |
* @param value1 TODO |
71 |
* @param value2 TODO |
* @param value2 TODO |
72 |
* @param value3 TODO |
* @param value3 TODO |
73 |
* @param value4 TODO |
* @param value4 TODO |
74 |
* @returns Rectangle |
* @return Rectangle |
75 |
*/ |
*/ |
76 |
public abstract Rectangle getNodeDimensions(Object value0, int value1, int value2, boolean value3, Rectangle value4); |
public abstract Rectangle getNodeDimensions(Object value0, int value1, |
77 |
|
int value2, boolean value3, |
78 |
|
Rectangle value4); |
79 |
} // NodeDimensions |
} |
|
|
|
|
|
|
|
//------------------------------------------------------------- |
|
|
// Variables -------------------------------------------------- |
|
|
//------------------------------------------------------------- |
|
80 |
|
|
81 |
/** |
/** |
82 |
* nodeDimensions |
* nodeDimensions |
103 |
*/ |
*/ |
104 |
protected int rowHeight; |
protected int rowHeight; |
105 |
|
|
|
|
|
|
//------------------------------------------------------------- |
|
|
// Initialization --------------------------------------------- |
|
|
//------------------------------------------------------------- |
|
|
|
|
106 |
/** |
/** |
107 |
* Constructor AbstractLayoutCache |
* Constructor AbstractLayoutCache |
108 |
*/ |
*/ |
109 |
public AbstractLayoutCache() { |
public AbstractLayoutCache() |
110 |
// TODO |
{ |
111 |
} // AbstractLayoutCache() |
// Do nothing here. |
112 |
|
} |
|
|
|
|
//------------------------------------------------------------- |
|
|
// Methods ---------------------------------------------------- |
|
|
//------------------------------------------------------------- |
|
113 |
|
|
114 |
/** |
/** |
115 |
* setNodeDimensions |
* setNodeDimensions |
116 |
* @param value0 TODO |
* |
117 |
|
* @param dimensions TODO |
118 |
*/ |
*/ |
119 |
public void setNodeDimensions(NodeDimensions value0) { |
public void setNodeDimensions(NodeDimensions dimensions) |
120 |
// TODO |
{ |
121 |
} // setNodeDimensions() |
nodeDimensions = dimensions; |
122 |
|
} |
123 |
|
|
124 |
/** |
/** |
125 |
* getNodeDimensions |
* getNodeDimensions |
126 |
* @returns NodeDimensions |
* |
127 |
|
* @return NodeDimensions |
128 |
*/ |
*/ |
129 |
public NodeDimensions getNodeDimensions() { |
public NodeDimensions getNodeDimensions() |
130 |
return null; // TODO |
{ |
131 |
} // getNodeDimensions() |
return nodeDimensions; |
132 |
|
} |
133 |
|
|
134 |
/** |
/** |
135 |
* getNodeDimensions |
* getNodeDimensions |
136 |
|
* |
137 |
* @param value0 TODO |
* @param value0 TODO |
138 |
* @param value1 TODO |
* @param value1 TODO |
139 |
* @param value2 TODO |
* @param value2 TODO |
140 |
* @param value3 TODO |
* @param value3 TODO |
141 |
* @param value4 TODO |
* @param value4 TODO |
142 |
* @returns Rectangle |
* |
143 |
|
* @return Rectangle |
144 |
*/ |
*/ |
145 |
protected Rectangle getNodeDimensions(Object value0, int value1, int value2, boolean value3, Rectangle value4) { |
protected Rectangle getNodeDimensions(Object value0, int value1, int value2, boolean value3, Rectangle value4) |
146 |
|
{ |
147 |
return null; // TODO |
return null; // TODO |
148 |
} // getNodeDimensions() |
} |
149 |
|
|
150 |
/** |
/** |
151 |
* setModel |
* Sets the model that provides the tree data. |
152 |
* @param value0 TODO |
* |
153 |
|
* @param the model |
154 |
*/ |
*/ |
155 |
public void setModel(TreeModel value0) { |
public void setModel(TreeModel model) |
156 |
// TODO |
{ |
157 |
} // setModel() |
treeModel = model; |
158 |
|
} |
159 |
|
|
160 |
/** |
/** |
161 |
* getModel |
* Returns the model that provides the tree data. |
162 |
* @returns TreeModel |
* |
163 |
|
* @return the model |
164 |
*/ |
*/ |
165 |
public TreeModel getModel() { |
public TreeModel getModel() |
166 |
return null; // TODO |
{ |
167 |
} // getModel() |
return treeModel; |
168 |
|
} |
169 |
|
|
170 |
/** |
/** |
171 |
* setRootVisible |
* setRootVisible |
172 |
* @param value0 TODO |
* |
173 |
*/ |
* @param visible <code>true</code> if root should be visible, |
174 |
public void setRootVisible(boolean value0) { |
* <code>false</code> otherwise |
175 |
// TODO |
*/ |
176 |
} // setRootVisible() |
public void setRootVisible(boolean visible) |
177 |
|
{ |
178 |
|
rootVisible = visible; |
179 |
|
} |
180 |
|
|
181 |
/** |
/** |
182 |
* isRootVisible |
* isRootVisible |
183 |
* @returns boolean |
* |
184 |
*/ |
* @return <code>true</code> if root is visible, |
185 |
public boolean isRootVisible() { |
* <code>false</code> otherwise |
186 |
return false; // TODO |
*/ |
187 |
} // isRootVisible() |
public boolean isRootVisible() |
188 |
|
{ |
189 |
|
return rootVisible; |
190 |
|
} |
191 |
|
|
192 |
/** |
/** |
193 |
* setRowHeight |
* setRowHeight |
194 |
* @param value0 TODO |
* |
195 |
|
* @param height the row height |
196 |
*/ |
*/ |
197 |
public void setRowHeight(int value0) { |
public void setRowHeight(int height) |
198 |
// TODO |
{ |
199 |
} // setRowHeight() |
rowHeight = height; |
200 |
|
} |
201 |
|
|
202 |
/** |
/** |
203 |
* getRowHeight |
* getRowHeight |
204 |
* @returns int |
* |
205 |
|
* @return the row height |
206 |
*/ |
*/ |
207 |
public int getRowHeight() { |
public int getRowHeight() |
208 |
return 0; // TODO |
{ |
209 |
} // getRowHeight() |
return rowHeight; |
210 |
|
} |
211 |
|
|
212 |
/** |
/** |
213 |
* setSelectionModel |
* setSelectionModel |
214 |
* @param value0 TODO |
* |
215 |
|
* @param model the model |
216 |
*/ |
*/ |
217 |
public void setSelectionModel(TreeSelectionModel value0) { |
public void setSelectionModel(TreeSelectionModel model) |
218 |
// TODO |
{ |
219 |
} // setSelectionModel() |
treeSelectionModel = model; |
220 |
|
} |
221 |
|
|
222 |
/** |
/** |
223 |
* getSelectionModel |
* getSelectionModel |
224 |
* @returns TreeSelectionModel |
* |
225 |
|
* @return the model |
226 |
*/ |
*/ |
227 |
public TreeSelectionModel getSelectionModel() { |
public TreeSelectionModel getSelectionModel() |
228 |
return null; // TODO |
{ |
229 |
} // getSelectionModel() |
return treeSelectionModel; |
230 |
|
} |
231 |
|
|
232 |
/** |
/** |
233 |
* getPreferredHeight |
* getPreferredHeight |
234 |
* @returns int |
* |
235 |
|
* @return int |
236 |
*/ |
*/ |
237 |
public int getPreferredHeight() { |
public int getPreferredHeight() |
238 |
|
{ |
239 |
return 0; // TODO |
return 0; // TODO |
240 |
} // getPreferredHeight() |
} |
241 |
|
|
242 |
/** |
/** |
243 |
* getPreferredWidth |
* getPreferredWidth |
244 |
|
* |
245 |
* @param value0 TODO |
* @param value0 TODO |
246 |
* @returns int |
* |
247 |
|
* @return int |
248 |
*/ |
*/ |
249 |
public int getPreferredWidth(Rectangle value0) { |
public int getPreferredWidth(Rectangle value0) |
250 |
|
{ |
251 |
return 0; // TODO |
return 0; // TODO |
252 |
} // getPreferredWidth() |
} |
253 |
|
|
254 |
/** |
/** |
255 |
* isExpanded |
* isExpanded |
256 |
|
* |
257 |
* @param value0 TODO |
* @param value0 TODO |
258 |
* @returns boolean |
* |
259 |
|
* @return boolean |
260 |
*/ |
*/ |
261 |
public abstract boolean isExpanded(TreePath value0); |
public abstract boolean isExpanded(TreePath value0); |
262 |
|
|
263 |
/** |
/** |
264 |
* getBounds |
* getBounds |
265 |
|
* |
266 |
* @param value0 TODO |
* @param value0 TODO |
267 |
* @param value1 TODO |
* @param value1 TODO |
268 |
* @returns Rectangle |
* |
269 |
|
* @return Rectangle |
270 |
*/ |
*/ |
271 |
public abstract Rectangle getBounds(TreePath value0, Rectangle value1); |
public abstract Rectangle getBounds(TreePath value0, Rectangle value1); |
272 |
|
|
273 |
/** |
/** |
274 |
* getPathForRow |
* getPathForRow |
275 |
* @param value0 TODO |
* |
276 |
* @returns TreePath |
* @param row the row |
277 |
|
* |
278 |
|
* @return the tree path |
279 |
*/ |
*/ |
280 |
public abstract TreePath getPathForRow(int value0); |
public abstract TreePath getPathForRow(int row); |
281 |
|
|
282 |
/** |
/** |
283 |
* getRowForPath |
* getRowForPath |
284 |
* @param value0 TODO |
* |
285 |
* @returns int |
* @param path the tree path |
286 |
|
* |
287 |
|
* @return the row |
288 |
*/ |
*/ |
289 |
public abstract int getRowForPath(TreePath value0); |
public abstract int getRowForPath(TreePath path); |
290 |
|
|
291 |
/** |
/** |
292 |
* getPathClosestTo |
* getPathClosestTo |
293 |
|
* |
294 |
* @param value0 TODO |
* @param value0 TODO |
295 |
* @param value1 TODO |
* @param value1 TODO |
296 |
* @returns TreePath |
* |
297 |
|
* @return the tree path |
298 |
*/ |
*/ |
299 |
public abstract TreePath getPathClosestTo(int value0, int value1); |
public abstract TreePath getPathClosestTo(int value0, int value1); |
300 |
|
|
301 |
/** |
/** |
302 |
* getVisiblePathsFrom |
* getVisiblePathsFrom |
303 |
* @param value0 TODO |
* |
304 |
* @returns Enumeration |
* @param path the tree path |
305 |
|
* |
306 |
|
* @return Enumeration |
307 |
*/ |
*/ |
308 |
public abstract Enumeration getVisiblePathsFrom(TreePath value0); |
public abstract Enumeration getVisiblePathsFrom(TreePath path); |
309 |
|
|
310 |
/** |
/** |
311 |
* getVisibleChildCount |
* getVisibleChildCount |
312 |
* @param value0 TODO |
* |
313 |
* @returns int |
* @param path the tree path |
314 |
|
* |
315 |
|
* @return int |
316 |
*/ |
*/ |
317 |
public abstract int getVisibleChildCount(TreePath value0); |
public abstract int getVisibleChildCount(TreePath value0); |
318 |
|
|
319 |
/** |
/** |
320 |
* setExpandedState |
* setExpandedState |
321 |
|
* |
322 |
* @param value0 TODO |
* @param value0 TODO |
323 |
|
* |
324 |
* @param value1 TODO |
* @param value1 TODO |
325 |
*/ |
*/ |
326 |
public abstract void setExpandedState(TreePath value0, boolean value1); |
public abstract void setExpandedState(TreePath value0, boolean value1); |
327 |
|
|
328 |
/** |
/** |
329 |
* getExpandedState |
* getExpandedState |
330 |
* @param value0 TODO |
* |
331 |
* @returns boolean |
* @param path the tree path |
332 |
|
* |
333 |
|
* @return boolean |
334 |
*/ |
*/ |
335 |
public abstract boolean getExpandedState(TreePath value0); |
public abstract boolean getExpandedState(TreePath path); |
336 |
|
|
337 |
/** |
/** |
338 |
* getRowCount |
* getRowCount |
339 |
* @returns int |
* |
340 |
|
* @return the number of rows |
341 |
*/ |
*/ |
342 |
public abstract int getRowCount(); |
public abstract int getRowCount(); |
343 |
|
|
348 |
|
|
349 |
/** |
/** |
350 |
* invalidatePathBounds |
* invalidatePathBounds |
351 |
* @param value0 TODO |
* |
352 |
|
* @param path the tree path |
353 |
*/ |
*/ |
354 |
public abstract void invalidatePathBounds(TreePath value0); |
public abstract void invalidatePathBounds(TreePath path); |
355 |
|
|
356 |
/** |
/** |
357 |
* treeNodesChanged |
* treeNodesChanged |
358 |
* @param value0 TODO |
* |
359 |
|
* @param event the event to send |
360 |
*/ |
*/ |
361 |
public abstract void treeNodesChanged(TreeModelEvent value0); |
public abstract void treeNodesChanged(TreeModelEvent event); |
362 |
|
|
363 |
/** |
/** |
364 |
* treeNodesInserted |
* treeNodesInserted |
365 |
* @param value0 TODO |
* |
366 |
|
* @param event the event to send |
367 |
*/ |
*/ |
368 |
public abstract void treeNodesInserted(TreeModelEvent value0); |
public abstract void treeNodesInserted(TreeModelEvent event); |
369 |
|
|
370 |
/** |
/** |
371 |
* treeNodesRemoved |
* treeNodesRemoved |
372 |
* @param value0 TODO |
* |
373 |
|
* @param event the event to send |
374 |
*/ |
*/ |
375 |
public abstract void treeNodesRemoved(TreeModelEvent value0); |
public abstract void treeNodesRemoved(TreeModelEvent event); |
376 |
|
|
377 |
/** |
/** |
378 |
* treeStructureChanged |
* treeStructureChanged |
379 |
* @param value0 TODO |
* |
380 |
|
* @param event the event to send |
381 |
*/ |
*/ |
382 |
public abstract void treeStructureChanged(TreeModelEvent value0); |
public abstract void treeStructureChanged(TreeModelEvent event); |
383 |
|
|
384 |
/** |
/** |
385 |
* getRowsForPaths |
* getRowsForPaths |
386 |
* @param value0 TODO |
* |
387 |
* @returns int[] |
* @param paths the tree paths |
388 |
|
* |
389 |
|
* @return an array of rows |
390 |
*/ |
*/ |
391 |
public int[] getRowsForPaths(TreePath[] value0) { |
public int[] getRowsForPaths(TreePath[] paths) |
392 |
|
{ |
393 |
return null; // TODO |
return null; // TODO |
394 |
} // getRowsForPaths() |
} |
395 |
|
|
396 |
/** |
/** |
397 |
* isFixedRowHeight |
* isFixedRowHeight |
398 |
* @returns boolean |
* |
399 |
|
* @return boolean |
400 |
*/ |
*/ |
401 |
protected boolean isFixedRowHeight() { |
protected boolean isFixedRowHeight() |
402 |
|
{ |
403 |
return false; // TODO |
return false; // TODO |
404 |
} // isFixedRowHeight() |
} |
405 |
|
} |
|
|
|
|
} // AbstractLayoutCache |
|