Source Code Cross Referenced for VisualItem.java in  » Database-Client » prefuse » prefuse » visual » 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 » Database Client » prefuse » prefuse.visual 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package prefuse.visual;
002:
003:        import java.awt.BasicStroke;
004:        import java.awt.Font;
005:        import java.awt.Graphics2D;
006:        import java.awt.geom.Rectangle2D;
007:
008:        import prefuse.Visualization;
009:        import prefuse.data.Schema;
010:        import prefuse.data.Tuple;
011:        import prefuse.data.tuple.TupleSet;
012:        import prefuse.render.Renderer;
013:        import prefuse.util.PrefuseLib;
014:
015:        /**
016:         * <p>Base interface for representing a visual item, a data object with a
017:         * visual interactive form. VisualItems are Tuple instances, and so
018:         * can support any number of data fields in a backing data table. VisualItems
019:         * also support data fields specific to visualization, such as a location,
020:         * bounding box, colors, size, and font. The VisualItem interface provides
021:         * convenience methods for accessing these common visual properties, but
022:         * the underlying mechanism is the same as any Tuple -- data stored in
023:         * a tabular format. Just as all Tuple instances are backed by a data Table,
024:         * each VisualItem is backed by a VisualTable. Additionally, each VisualItem
025:         * is associated with one and only one {@link prefuse.Visualization}.</p>
026:         * 
027:         * <p>VisualItems are only responsible for storing their visual data
028:         * properties. The final visual appearance of an item is determined by
029:         * a {@link prefuse.render.Renderer}, which contains instructions for drawing
030:         * the item. The Renderer to use for a given item is decided by the
031:         * {@link prefuse.render.RendererFactory} associated with the item's
032:         * backing Visualization.</p>
033:         * 
034:         * <p>Finally, actually setting the visual properties of VisualItems is
035:         * commonly done by the many {@link prefuse.action.Action} modules available
036:         * for processing visual data. This includes spatial layout as well as
037:         * color, size, and font assignment.</p> 
038:         * 
039:         * @author <a href="http://jheer.org">jeffrey heer</a>
040:         */
041:        public interface VisualItem extends Tuple {
042:
043:            /**
044:             * Get the backing Visualization of which this VisualItem is a part.
045:             * @return the backing Visualization
046:             */
047:            public Visualization getVisualization();
048:
049:            /**
050:             * Get the primary data group of which this VisualItem is a member.
051:             * Returns the name of the group of this item's backing VisualTable.
052:             * @return the item's primary group
053:             */
054:            public String getGroup();
055:
056:            /**
057:             * Indicates if this item is a member of a given group. This includes both
058:             * the item's primary group (that of it's backing VisualTable) and any
059:             * number of additional focus groups associated with the Visualization.
060:             * @param group the group to check for membership.
061:             * @return true if this item is in the group, false otherwise.
062:             */
063:            public boolean isInGroup(String group);
064:
065:            /**
066:             * Returns the original backing data set from which this VisualItem is
067:             * derived. This could be a Table, Graph, or Tree instance. This method
068:             * returns null if this VisualItem is not derived from backing data.
069:             * @return the backing data set from which this VisualItem is derived,
070:             * or null if none.
071:             */
072:            public TupleSet getSourceData();
073:
074:            /**
075:             * Returns the original backing data tuple from which this VisualItem is
076:             * derived. This could be a Tuple, Node, or Edge instance. This method
077:             * returns null if this VisualItem is not derived from backing data.
078:             * @return the backing data tuple from which this VisualItem is derived,
079:             * or null if none.
080:             */
081:            public Tuple getSourceTuple();
082:
083:            // ------------------------------------------------------------------------
084:            // VisualItem Methods
085:
086:            /**
087:             * Render this item to the given graphics context. This is typically done
088:             * by requesting the appropriate Renderer from the backing Visualization's
089:             * RendererFactory, and then using the Renderer to draw this item.
090:             * @param g the graphics context to render into.
091:             */
092:            public void render(Graphics2D g);
093:
094:            /**
095:             * Get the Renderer instance for drawing this VisualItem. The Renderer is
096:             * retrieved by requesting it from the backing Visualization's
097:             * RendererFactory.
098:             * @return the Renderer for this VisualItem
099:             */
100:            public Renderer getRenderer();
101:
102:            /**
103:             * Validate the bounds of this VisualItem. When a data value for a
104:             * VisualItem is updated, it's bounds are invalidated, as the data change
105:             * may have changed to appearance of the item. Revalidating the bounds
106:             * causes the bounds of the item to be recomputed and made current.
107:             * @return the validated boundig box of this item
108:             */
109:            public Rectangle2D validateBounds();
110:
111:            // -- Boolean Flags -------------------------------------------------------
112:
113:            /**
114:             * Indicates if this VisualItem is currently validated. If not,
115:             * validateBounds() must be run to update the bounds to a current value.
116:             * @return true if validated, false otherwise
117:             * @see #VALIDATED
118:             */
119:            public boolean isValidated();
120:
121:            /**
122:             * Set this item's validated flag. This is for internal use by prefuse and,
123:             * in general, should not be called by application code.
124:             * @param value the value of the validated flag to set.
125:             * @see #VALIDATED
126:             */
127:            public void setValidated(boolean value);
128:
129:            /**
130:             * Indicates if this VisualItem is currently set to be visible. Items with
131:             * the visible flag set false will not be drawn by a display. Invisible
132:             * items are also by necessity not interactive, regardless of the value of
133:             * the interactive flag.
134:             * @return true if visible, false if invisible
135:             * @see #VISIBLE
136:             */
137:            public boolean isVisible();
138:
139:            /**
140:             * Set this item's visibility.
141:             * @param value true to make the item visible, false otherwise.
142:             * @see #VISIBLE
143:             */
144:            public void setVisible(boolean value);
145:
146:            /**
147:             * Indicates if the start visible flag is set to true. This is the
148:             * visibility value consulted for the staring value of the visibility
149:             * field at the beginning of an animated transition.
150:             * @return true if this item starts out visible, false otherwise.
151:             * @see #STARTVISIBLE
152:             */
153:            public boolean isStartVisible();
154:
155:            /**
156:             * Set the start visible flag.
157:             * @param value true to set the start visible flag, false otherwise
158:             * @see #STARTVISIBLE
159:             */
160:            public void setStartVisible(boolean value);
161:
162:            /**
163:             * Indictes if the end visible flag is set to true. This is the
164:             * visibility value consulted for the ending value of the visibility
165:             * field at the end of an animated transition.
166:             * @return true if this items ends visible, false otherwise.
167:             * @see #ENDVISIBLE
168:             */
169:            public boolean isEndVisible();
170:
171:            /**
172:             * Set the end visible flag.
173:             * @param value true to set the end visible flag, false otherwise
174:             * @see #ENDVISIBLE
175:             */
176:            public void setEndVisible(boolean value);
177:
178:            /**
179:             * Indicates if this item is interactive, meaning it can potentially
180:             * respond to mouse and keyboard input events.
181:             * @return true if the item is interactive, false otherwise
182:             * @see #INTERACTIVE
183:             */
184:            public boolean isInteractive();
185:
186:            /**
187:             * Set the interactive status of this VisualItem.
188:             * @param value true for interactive, false for non-interactive
189:             * @see #INTERACTIVE
190:             */
191:            public void setInteractive(boolean value);
192:
193:            /**
194:             * Indicates this item is expanded. Only used for items that are
195:             * part of a graph structure. 
196:             * @return true if expanded, false otherwise
197:             * @see #EXPANDED
198:             */
199:            public boolean isExpanded();
200:
201:            /**
202:             * Set the expanded flag.
203:             * @param value true to set as expanded, false as collapsed.
204:             * @see #EXPANDED
205:             */
206:            public void setExpanded(boolean value);
207:
208:            /**
209:             * Indicates if the item is fixed, and so will not have its position
210:             * changed by any layout or distortion actions.
211:             * @return true if the item has a fixed position, false otherwise
212:             * @see #FIXED
213:             */
214:            public boolean isFixed();
215:
216:            /**
217:             * Sets if the item is fixed in its position.
218:             * @param value true to fix the item, false otherwise
219:             * @see #FIXED
220:             */
221:            public void setFixed(boolean value);
222:
223:            /**
224:             * Indicates if the item is highlighted.
225:             * @return true for highlighted, false for not highlighted
226:             * @see #HIGHLIGHT
227:             */
228:            public boolean isHighlighted();
229:
230:            /**
231:             * Set the highlighted status of this item. How higlighting values are
232:             * interpreted by the system depends on the various processing actions
233:             * set up for an application (e.g., how a
234:             * {@link prefuse.action.assignment.ColorAction} might assign colors
235:             * based on the flag).
236:             * @param value true to highlight the item, false for no highlighting.
237:             * @see #HIGHLIGHT
238:             */
239:            public void setHighlighted(boolean value);
240:
241:            /**
242:             * Indicates if the item currently has the mouse pointer over it.
243:             * @return true if the mouse pointer is over this item, false otherwise
244:             * @see #HOVER
245:             */
246:            public boolean isHover();
247:
248:            /**
249:             * Set the hover flag. This is set automatically by the prefuse framework,
250:             * so should not need to be set explicitly by application code.
251:             * @param value true to set the hover flag, false otherwise
252:             * @see #HOVER
253:             */
254:            public void setHover(boolean value);
255:
256:            // ------------------------------------------------------------------------
257:
258:            /**
259:             * Get the current x-coordinate of this item.
260:             * @return the current x-coordinate
261:             * @see #X
262:             */
263:            public double getX();
264:
265:            /**
266:             * Set the current x-coordinate of this item.
267:             * @param x the new current x-coordinate
268:             * @see #X
269:             */
270:            public void setX(double x);
271:
272:            /**
273:             * Get the current y-coordinate of this item.
274:             * @return the current y-coordinate
275:             * @see #Y
276:             */
277:            public double getY();
278:
279:            /**
280:             * Set the current y-coordinate of this item.
281:             * @param y the new current y-coordinate
282:             * @see #Y
283:             */
284:            public void setY(double y);
285:
286:            /**
287:             * Get the starting x-coordinate of this item.
288:             * @return the starting x-coordinate
289:             * @see #STARTX
290:             */
291:            public double getStartX();
292:
293:            /**
294:             * Set the starting x-coordinate of this item.
295:             * @param x the new starting x-coordinate
296:             * @see #STARTX
297:             */
298:            public void setStartX(double x);
299:
300:            /**
301:             * Get the starting y-coordinate of this item.
302:             * @return the starting y-coordinate
303:             * @see #STARTY
304:             */
305:            public double getStartY();
306:
307:            /**
308:             * Set the starting y-coordinate of this item.
309:             * @param y the new starting y-coordinate
310:             * @see #STARTY
311:             */
312:            public void setStartY(double y);
313:
314:            /**
315:             * Get the ending x-coordinate of this item.
316:             * @return the ending x-coordinate
317:             * @see #ENDX
318:             */
319:            public double getEndX();
320:
321:            /**
322:             * Set the ending x-coordinate of this item.
323:             * @param x the new ending x-coordinate
324:             * @see #ENDX
325:             */
326:            public void setEndX(double x);
327:
328:            /**
329:             * Get the ending y-coordinate of this item.
330:             * @return the ending y-coordinate
331:             * @see #ENDY
332:             */
333:            public double getEndY();
334:
335:            /**
336:             * Set the ending y-coordinate of this item.
337:             * @param y the new ending y-coordinate
338:             * @see #ENDY
339:             */
340:            public void setEndY(double y);
341:
342:            /**
343:             * Get the bounding box for this VisualItem. If necessary, the bounds
344:             * will be validated before returning the bounding box.
345:             * @return the item's bounding box
346:             * @see #BOUNDS
347:             */
348:            public Rectangle2D getBounds();
349:
350:            /**
351:             * Set the bounding box for this item. This method is used by Renderer
352:             * modules when the bounds are validated, or set by processing Actions
353:             * used in conjunction with Renderers that do not perform bounds
354:             * management.
355:             * @param x the minimum x-coordinate
356:             * @param y the minimum y-coorindate
357:             * @param w the width of this item
358:             * @param h the height of this item
359:             * @see #BOUNDS
360:             */
361:            public void setBounds(double x, double y, double w, double h);
362:
363:            // ------------------------------------------------------------------------
364:
365:            /**
366:             * Get the current stroke color of this item. The stroke color is used to
367:             * draw lines and the outlines of shapes. Color values as represented as an
368:             * integer containing the red, green, blue, and alpha (transparency)
369:             * color channels. A color with a zero alpha component is fully
370:             * transparent and will not be drawn.
371:             * @return the current stroke color, represented as an integer
372:             * @see prefuse.util.ColorLib
373:             * @see #STROKECOLOR
374:             */
375:            public int getStrokeColor();
376:
377:            /**
378:             * Set the current stroke color of this item. The stroke color is used to
379:             * draw lines and the outlines of shapes. Color values as represented as an
380:             * integer containing the red, green, blue, and alpha (transparency)
381:             * color channels. A color with a zero alpha component is fully
382:             * transparent and will not be drawn.
383:             * @param color the current stroke color, represented as an integer
384:             * @see prefuse.util.ColorLib
385:             * @see #STROKECOLOR
386:             */
387:            public void setStrokeColor(int color);
388:
389:            /**
390:             * Get the starting stroke color of this item. The stroke color is used to
391:             * draw lines and the outlines of shapes. Color values as represented as an
392:             * integer containing the red, green, blue, and alpha (transparency)
393:             * color channels. A color with a zero alpha component is fully
394:             * transparent and will not be drawn.
395:             * @return the starting stroke color, represented as an integer
396:             * @see prefuse.util.ColorLib
397:             * @see #STARTSTROKECOLOR
398:             */
399:            public int getStartStrokeColor();
400:
401:            /**
402:             * Set the starting stroke color of this item. The stroke color is used to
403:             * draw lines and the outlines of shapes. Color values as represented as an
404:             * integer containing the red, green, blue, and alpha (transparency)
405:             * color channels. A color with a zero alpha component is fully
406:             * transparent and will not be drawn.
407:             * @param color the starting stroke color, represented as an integer
408:             * @see prefuse.util.ColorLib
409:             * @see #STARTSTROKECOLOR
410:             */
411:            public void setStartStrokeColor(int color);
412:
413:            /**
414:             * Get the ending stroke color of this item. The stroke color is used to
415:             * draw lines and the outlines of shapes. Color values as represented as an
416:             * integer containing the red, green, blue, and alpha (transparency)
417:             * color channels. A color with a zero alpha component is fully
418:             * transparent and will not be drawn.
419:             * @return the ending stroke color, represented as an integer
420:             * @see prefuse.util.ColorLib
421:             * @see #ENDSTROKECOLOR
422:             */
423:            public int getEndStrokeColor();
424:
425:            /**
426:             * Set the ending stroke color of this item. The stroke color is used to
427:             * draw lines and the outlines of shapes. Color values as represented as an
428:             * integer containing the red, green, blue, and alpha (transparency)
429:             * color channels. A color with a zero alpha component is fully
430:             * transparent and will not be drawn.
431:             * @param color the ending stroke color, represented as an integer
432:             * @see prefuse.util.ColorLib
433:             * @see #ENDSTROKECOLOR
434:             */
435:            public void setEndStrokeColor(int color);
436:
437:            /**
438:             * Get the current fill color of this item. The fill color is used to
439:             * fill the interior of shapes. Color values as represented as an
440:             * integer containing the red, green, blue, and alpha (transparency)
441:             * color channels. A color with a zero alpha component is fully
442:             * transparent and will not be drawn.
443:             * @return the current fill color, represented as an integer
444:             * @see prefuse.util.ColorLib
445:             * @see #FILLCOLOR
446:             */
447:            public int getFillColor();
448:
449:            /**
450:             * Set the current fill color of this item. The fill color is used to
451:             * fill the interior of shapes. Color values as represented as an
452:             * integer containing the red, green, blue, and alpha (transparency)
453:             * color channels. A color with a zero alpha component is fully
454:             * transparent and will not be drawn.
455:             * @param color the current fill color, represented as an integer
456:             * @see prefuse.util.ColorLib
457:             * @see #FILLCOLOR
458:             */
459:            public void setFillColor(int color);
460:
461:            /**
462:             * Get the starting fill color of this item. The fill color is used to
463:             * fill the interior of shapes. Color values as represented as an
464:             * integer containing the red, green, blue, and alpha (transparency)
465:             * color channels. A color with zero alpha component is fully
466:             * transparent and will not be drawn.
467:             * @return the starting fill color, represented as an integer
468:             * @see prefuse.util.ColorLib
469:             * @see #STARTFILLCOLOR
470:             */
471:            public int getStartFillColor();
472:
473:            /**
474:             * Set the starting fill color of this item. The fill color is used to
475:             * fill the interior of shapes. Color values as represented as an
476:             * integer containing the red, green, blue, and alpha (transparency)
477:             * color channels. A color with a zero alpha component is fully
478:             * transparent and will not be drawn.
479:             * @param color the starting fill color, represented as an integer
480:             * @see prefuse.util.ColorLib
481:             * @see #STARTFILLCOLOR
482:             */
483:            public void setStartFillColor(int color);
484:
485:            /**
486:             * Get the ending fill color of this item. The fill color is used to
487:             * fill the interior of shapes. Color values as represented as an
488:             * integer containing the red, green, blue, and alpha (transparency)
489:             * color channels. A color with zero alpha component is fully
490:             * transparent and will not be drawn.
491:             * @return the ending fill color, represented as an integer
492:             * @see prefuse.util.ColorLib
493:             * @see #ENDFILLCOLOR
494:             */
495:            public int getEndFillColor();
496:
497:            /**
498:             * Set the ending fill color of this item. The fill color is used to
499:             * fill the interior of shapes. Color values as represented as an
500:             * integer containing the red, green, blue, and alpha (transparency)
501:             * color channels. A color with a zero alpha component is fully
502:             * transparent and will not be drawn.
503:             * @param color the ending fill color, represented as an integer
504:             * @see prefuse.util.ColorLib
505:             * @see #ENDFILLCOLOR
506:             */
507:            public void setEndFillColor(int color);
508:
509:            /**
510:             * Get the current text color of this item. The text color is used to
511:             * draw text strings for the item. Color values as represented as an
512:             * integer containing the red, green, blue, and alpha (transparency)
513:             * color channels. A color with zero alpha component is fully
514:             * transparent and will not be drawn.
515:             * @return the current text color, represented as an integer
516:             * @see prefuse.util.ColorLib
517:             * @see #TEXTCOLOR
518:             */
519:            public int getTextColor();
520:
521:            /**
522:             * Set the current text color of this item. The text color is used to
523:             * draw text strings for the item. Color values as represented as an
524:             * integer containing the red, green, blue, and alpha (transparency)
525:             * color channels. A color with a zero alpha component is fully
526:             * transparent and will not be drawn.
527:             * @param color the current text color, represented as an integer
528:             * @see prefuse.util.ColorLib
529:             * @see #TEXTCOLOR
530:             */
531:            public void setTextColor(int color);
532:
533:            /**
534:             * Get the starting text color of this item. The text color is used to
535:             * draw text strings for the item. Color values as represented as an
536:             * integer containing the red, green, blue, and alpha (transparency)
537:             * color channels. A color with zero alpha component is fully
538:             * transparent and will not be drawn.
539:             * @return the starting text color, represented as an integer
540:             * @see prefuse.util.ColorLib
541:             * @see #STARTTEXTCOLOR
542:             */
543:            public int getStartTextColor();
544:
545:            /**
546:             * Set the starting text color of this item. The text color is used to
547:             * draw text strings for the item. Color values as represented as an
548:             * integer containing the red, green, blue, and alpha (transparency)
549:             * color channels. A color with a zero alpha component is fully
550:             * transparent and will not be drawn.
551:             * @param color the starting text color, represented as an integer
552:             * @see prefuse.util.ColorLib
553:             * @see #STARTTEXTCOLOR
554:             */
555:            public void setStartTextColor(int color);
556:
557:            /**
558:             * Get the ending text color of this item. The text color is used to
559:             * draw text strings for the item. Color values as represented as an
560:             * integer containing the red, green, blue, and alpha (transparency)
561:             * color channels. A color with zero alpha component is fully
562:             * transparent and will not be drawn.
563:             * @return the ending text color, represented as an integer
564:             * @see prefuse.util.ColorLib
565:             * @see #ENDTEXTCOLOR
566:             */
567:            public int getEndTextColor();
568:
569:            /**
570:             * Set the ending text color of this item. The text color is used to
571:             * draw text strings for the item. Color values as represented as an
572:             * integer containing the red, green, blue, and alpha (transparency)
573:             * color channels. A color with a zero alpha component is fully
574:             * transparent and will not be drawn.
575:             * @param color the ending text color, represented as an integer
576:             * @see prefuse.util.ColorLib
577:             * @see #ENDTEXTCOLOR
578:             */
579:            public void setEndTextColor(int color);
580:
581:            // ------------------------------------------------------------------------
582:
583:            /**
584:             * Get the current size value of the item. Size values are typically used
585:             * to scale an item, either in one-dimension (e.g., a bar chart length) or
586:             * two-dimensions (e.g., using pixel area to encode a quantitative value).
587:             * @return the current size value
588:             * @see #SIZE
589:             */
590:            public double getSize();
591:
592:            /**
593:             * Set the current size value of the item. Size values are typically used
594:             * to scale an item, either in one-dimension (e.g., a bar chart length) or
595:             * two-dimensions (e.g., using pixel area to encode a quantitative value).
596:             * @param size the current size value
597:             * @see #SIZE
598:             */
599:            public void setSize(double size);
600:
601:            /**
602:             * Get the starting size value of the item. Size values are typically used
603:             * to scale an item, either in one-dimension (e.g., a bar chart length) or
604:             * two-dimensions (e.g., using pixel area to encode a quantitative value).
605:             * @return the starting size value
606:             * @see #STARTSIZE
607:             */
608:            public double getStartSize();
609:
610:            /**
611:             * Set the starting size value of the item. Size values are typically used
612:             * to scale an item, either in one-dimension (e.g., a bar chart length) or
613:             * two-dimensions (e.g., using pixel area to encode a quantitative value).
614:             * @param size the starting size value
615:             * @see #STARTSIZE
616:             */
617:            public void setStartSize(double size);
618:
619:            /**
620:             * Get the ending size value of the item. Size values are typically used
621:             * to scale an item, either in one-dimension (e.g., a bar chart length) or
622:             * two-dimensions (e.g., using pixel area to encode a quantitative value).
623:             * @return the ending size value
624:             * @see #ENDSIZE
625:             */
626:            public double getEndSize();
627:
628:            /**
629:             * Set the ending size value of the item. Size values are typically used
630:             * to scale an item, either in one-dimension (e.g., a bar chart length) or
631:             * two-dimensions (e.g., using pixel area to encode a quantitative value).
632:             * @param size the ending size value
633:             * @see #ENDSIZE
634:             */
635:            public void setEndSize(double size);
636:
637:            // ------------------------------------------------------------------------
638:
639:            /**
640:             * Get the current shape value of the item. One of the SHAPE constants
641:             * included in the {@link prefuse.Constants} class. This value only has an
642:             * effect if a Renderer that supports different shapes is used
643:             * (e.g., {@link prefuse.render.ShapeRenderer}.
644:             * @return the current shape value
645:             * @see #SHAPE
646:             */
647:            public int getShape();
648:
649:            /**
650:             * Set the current shape value of the item. One of the SHAPE constants
651:             * included in the {@link prefuse.Constants} class. This value only has an
652:             * effect if a Renderer that supports different shapes is used
653:             * (e.g., {@link prefuse.render.ShapeRenderer}.
654:             * @param shape the shape value to use
655:             * @see #SHAPE
656:             */
657:            public void setShape(int shape);
658:
659:            // ------------------------------------------------------------------------
660:
661:            /**
662:             * Get the current stroke used to draw lines and shape outlines.
663:             * @return the stroke used to draw lines and shape outlines
664:             */
665:            public BasicStroke getStroke();
666:
667:            /**
668:             * Set the current stroke used to draw lines and shape outlines.
669:             * @param stroke the stroke to use to draw lines and shape outlines
670:             */
671:            public void setStroke(BasicStroke stroke);
672:
673:            // ------------------------------------------------------------------------
674:
675:            /**
676:             * Get the current font for the item. The font is used as the default
677:             * typeface for drawing text for this item.
678:             * @return the current font value
679:             * @see #FONT
680:             */
681:            public Font getFont();
682:
683:            /**
684:             * Set the current font for the item. The font is used as the default
685:             * typeface for drawing text for this item.
686:             * @param font the current font value
687:             * @see #FONT
688:             */
689:            public void setFont(Font font);
690:
691:            /**
692:             * Get the starting font for the item. The font is used as the default
693:             * typeface for drawing text for this item.
694:             * @return the starting font value
695:             * @see #STARTFONT
696:             */
697:            public Font getStartFont();
698:
699:            /**
700:             * Set the starting font for the item. The font is used as the default
701:             * typeface for drawing text for this item.
702:             * @param font the starting font value
703:             * @see #STARTFONT
704:             */
705:            public void setStartFont(Font font);
706:
707:            /**
708:             * Get the ending font for the item. The font is used as the default
709:             * typeface for drawing text for this item.
710:             * @return the ending font value
711:             * @see #ENDFONT
712:             */
713:            public Font getEndFont();
714:
715:            /**
716:             * Set the ending font for the item. The font is used as the default
717:             * typeface for drawing text for this item.
718:             * @param font the ending font value
719:             * @see #ENDFONT
720:             */
721:            public void setEndFont(Font font);
722:
723:            // ------------------------------------------------------------------------
724:
725:            /**
726:             * Get the degree-of-interest (DOI) value. The degree-of-interet is an
727:             * optional value that can be used to sort items by importance, control
728:             * item visibility, or influence particular visual encodings. A common
729:             * example is to use the DOI to store the graph distance of a node from
730:             * the nearest selected focus node.
731:             * @return the DOI value of this item
732:             * @see #DOI
733:             */
734:            public double getDOI();
735:
736:            /**
737:             * Set the degree-of-interest (DOI) value. The degree-of-interet is an
738:             * optional value that can be used to sort items by importance, control
739:             * item visibility, or influence particular visual encodings. A common
740:             * example is to use the DOI to store the graph distance of a node from
741:             * the nearest selected focus node.
742:             * @param doi the DOI value of this item
743:             * @see #DOI
744:             */
745:            public void setDOI(double doi);
746:
747:            // ------------------------------------------------------------------------
748:            // VisualItem Base Schema
749:
750:            /** The validated data field */
751:            public static final String VALIDATED = PrefuseLib.FIELD_PREFIX
752:                    + "validated";
753:            /** The visible data field */
754:            public static final String VISIBLE = PrefuseLib.FIELD_PREFIX
755:                    + "visible";
756:            /** The start visible data field */
757:            public static final String STARTVISIBLE = PrefuseLib
758:                    .getStartField(VISIBLE);
759:            /** The end visible data field */
760:            public static final String ENDVISIBLE = PrefuseLib
761:                    .getEndField(VISIBLE);
762:            /** The interactive data field */
763:            public static final String INTERACTIVE = PrefuseLib.FIELD_PREFIX
764:                    + "interactive";
765:            /** The expanded data field */
766:            public static final String EXPANDED = PrefuseLib.FIELD_PREFIX
767:                    + "expanded";
768:            /** The fixed data field */
769:            public static final String FIXED = PrefuseLib.FIELD_PREFIX
770:                    + "fixed";
771:            /** The highlight data field */
772:            public static final String HIGHLIGHT = PrefuseLib.FIELD_PREFIX
773:                    + "highlight";
774:            /** The hover data field */
775:            public static final String HOVER = PrefuseLib.FIELD_PREFIX
776:                    + "hover";
777:            /** The x data field */
778:            public static final String X = PrefuseLib.FIELD_PREFIX + "x";
779:            /** The y data field */
780:            public static final String Y = PrefuseLib.FIELD_PREFIX + "y";
781:            /** The start x data field */
782:            public static final String STARTX = PrefuseLib.getStartField(X);
783:            /** The start y data field */
784:            public static final String STARTY = PrefuseLib.getStartField(Y);
785:            /** The end x data field */
786:            public static final String ENDX = PrefuseLib.getEndField(X);
787:            /** The end y data field */
788:            public static final String ENDY = PrefuseLib.getEndField(Y);
789:            /** The bounds data field */
790:            public static final String BOUNDS = PrefuseLib.FIELD_PREFIX
791:                    + "bounds";
792:            /** The stroke color data field */
793:            public static final String STROKECOLOR = PrefuseLib.FIELD_PREFIX
794:                    + "strokeColor";
795:            /** The start stroke color data field */
796:            public static final String STARTSTROKECOLOR = PrefuseLib
797:                    .getStartField(STROKECOLOR);
798:            /** The end stroke color data field */
799:            public static final String ENDSTROKECOLOR = PrefuseLib
800:                    .getEndField(STROKECOLOR);
801:            /** The fill color data field */
802:            public static final String FILLCOLOR = PrefuseLib.FIELD_PREFIX
803:                    + "fillColor";
804:            /** The start fill color data field */
805:            public static final String STARTFILLCOLOR = PrefuseLib
806:                    .getStartField(FILLCOLOR);
807:            /** The end fill color data field */
808:            public static final String ENDFILLCOLOR = PrefuseLib
809:                    .getEndField(FILLCOLOR);
810:            /** The text color data field */
811:            public static final String TEXTCOLOR = PrefuseLib.FIELD_PREFIX
812:                    + "textColor";
813:            /** The start text color data field */
814:            public static final String STARTTEXTCOLOR = PrefuseLib
815:                    .getStartField(TEXTCOLOR);
816:            /** The end text color data field */
817:            public static final String ENDTEXTCOLOR = PrefuseLib
818:                    .getEndField(TEXTCOLOR);
819:            /** The size data field */
820:            public static final String SIZE = PrefuseLib.FIELD_PREFIX + "size";
821:            /** The start size data field */
822:            public static final String STARTSIZE = PrefuseLib
823:                    .getStartField(SIZE);
824:            /** The end size data field */
825:            public static final String ENDSIZE = PrefuseLib.getEndField(SIZE);
826:            /** The shape data field */
827:            public static final String SHAPE = PrefuseLib.FIELD_PREFIX
828:                    + "shape";
829:            /** The stroke data field */
830:            public static final String STROKE = PrefuseLib.FIELD_PREFIX
831:                    + "stroke";
832:            /** The font data field */
833:            public static final String FONT = PrefuseLib.FIELD_PREFIX + "font";
834:            /** The start font data field */
835:            public static final String STARTFONT = PrefuseLib
836:                    .getStartField(FONT);
837:            /** The end font data field */
838:            public static final String ENDFONT = PrefuseLib.getEndField(FONT);
839:            /** The doi data field */
840:            public static final String DOI = PrefuseLib.FIELD_PREFIX + "doi";
841:
842:            /** A permanent, locked copy of the base VisualItem schema */
843:            public static final Schema SCHEMA = PrefuseLib
844:                    .getVisualItemSchema().lockSchema();
845:
846:            /** 
847:             *  The column index of the validated data field. This should be safe to do
848:             *  because a unique (non-inherited) validated field is required of all
849:             *  VisualItems, and should always be the first field included.
850:             */
851:            public static final int IDX_VALIDATED = SCHEMA
852:                    .getColumnIndex(VALIDATED);
853:
854:            // ------------------------------------------------------------------------
855:            // VisualItem Extended Schema
856:
857:            /** The label data field.
858:             * Not included in the VisualItem schema by default */
859:            public static final String LABEL = PrefuseLib.FIELD_PREFIX
860:                    + "label";
861:            /** The value data field.
862:             * Not included in the VisualItem schema by default */
863:            public static final String VALUE = PrefuseLib.FIELD_PREFIX
864:                    + "value";
865:
866:            /** The polygon data field.
867:             * Not included in the VisualItem schema by default */
868:            public static final String POLYGON = PrefuseLib.FIELD_PREFIX
869:                    + "polygon";
870:            /** The start polygon data field.
871:             * Not included in the VisualItem schema by default */
872:            public static final String STARTPOLYGON = PrefuseLib
873:                    .getStartField(POLYGON);
874:            /** The end polygon data field.
875:             * Not included in the VisualItem schema by default */
876:            public static final String ENDPOLYGON = PrefuseLib
877:                    .getEndField(POLYGON);
878:
879:            /** The x2 data field.
880:             * Not included in the VisualItem schema by default */
881:            public static final String X2 = PrefuseLib.FIELD_PREFIX + "x2";
882:            /** The y2 data field.
883:             * Not included in the VisualItem schema by default */
884:            public static final String Y2 = PrefuseLib.FIELD_PREFIX + "y2";
885:            /** The start x2 data field.
886:             * Not included in the VisualItem schema by default */
887:            public static final String STARTX2 = PrefuseLib.getStartField(X2);
888:            /** The start y2 data field.
889:             * Not included in the VisualItem schema by default */
890:            public static final String STARTY2 = PrefuseLib.getStartField(Y2);
891:            /** The end x2 data field.
892:             * Not included in the VisualItem schema by default */
893:            public static final String ENDX2 = PrefuseLib.getEndField(X2);
894:            /** The end y2 data field.
895:             * Not included in the VisualItem schema by default */
896:            public static final String ENDY2 = PrefuseLib.getEndField(Y2);
897:
898:        } // end of interface VisualItem
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.