KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > prefuse > visual > VisualItem


1 package prefuse.visual;
2
3 import java.awt.BasicStroke JavaDoc;
4 import java.awt.Font JavaDoc;
5 import java.awt.Graphics2D JavaDoc;
6 import java.awt.geom.Rectangle2D JavaDoc;
7
8 import prefuse.Visualization;
9 import prefuse.data.Schema;
10 import prefuse.data.Tuple;
11 import prefuse.data.tuple.TupleSet;
12 import prefuse.render.Renderer;
13 import prefuse.util.PrefuseLib;
14
15 /**
16  * <p>Base interface for representing a visual item, a data object with a
17  * visual interactive form. VisualItems are Tuple instances, and so
18  * can support any number of data fields in a backing data table. VisualItems
19  * also support data fields specific to visualization, such as a location,
20  * bounding box, colors, size, and font. The VisualItem interface provides
21  * convenience methods for accessing these common visual properties, but
22  * the underlying mechanism is the same as any Tuple -- data stored in
23  * a tabular format. Just as all Tuple instances are backed by a data Table,
24  * each VisualItem is backed by a VisualTable. Additionally, each VisualItem
25  * is associated with one and only one {@link prefuse.Visualization}.</p>
26  *
27  * <p>VisualItems are only responsible for storing their visual data
28  * properties. The final visual appearance of an item is determined by
29  * a {@link prefuse.render.Renderer}, which contains instructions for drawing
30  * the item. The Renderer to use for a given item is decided by the
31  * {@link prefuse.render.RendererFactory} associated with the item's
32  * backing Visualization.</p>
33  *
34  * <p>Finally, actually setting the visual properties of VisualItems is
35  * commonly done by the many {@link prefuse.action.Action} modules available
36  * for processing visual data. This includes spatial layout as well as
37  * color, size, and font assignment.</p>
38  *
39  * @author <a HREF="http://jheer.org">jeffrey heer</a>
40  */

41 public interface VisualItem extends Tuple {
42
43     /**
44      * Get the backing Visualization of which this VisualItem is a part.
45      * @return the backing Visualization
46      */

47     public Visualization getVisualization();
48     
49     /**
50      * Get the primary data group of which this VisualItem is a member.
51      * Returns the name of the group of this item's backing VisualTable.
52      * @return the item's primary group
53      */

54     public String JavaDoc getGroup();
55     
56     /**
57      * Indicates if this item is a member of a given group. This includes both
58      * the item's primary group (that of it's backing VisualTable) and any
59      * number of additional focus groups associated with the Visualization.
60      * @param group the group to check for membership.
61      * @return true if this item is in the group, false otherwise.
62      */

63     public boolean isInGroup(String JavaDoc group);
64     
65     /**
66      * Returns the original backing data set from which this VisualItem is
67      * derived. This could be a Table, Graph, or Tree instance. This method
68      * returns null if this VisualItem is not derived from backing data.
69      * @return the backing data set from which this VisualItem is derived,
70      * or null if none.
71      */

72     public TupleSet getSourceData();
73
74     /**
75      * Returns the original backing data tuple from which this VisualItem is
76      * derived. This could be a Tuple, Node, or Edge instance. This method
77      * returns null if this VisualItem is not derived from backing data.
78      * @return the backing data tuple from which this VisualItem is derived,
79      * or null if none.
80      */

81     public Tuple getSourceTuple();
82     
83     
84     // ------------------------------------------------------------------------
85
// VisualItem Methods
86

87     /**
88      * Render this item to the given graphics context. This is typically done
89      * by requesting the appropriate Renderer from the backing Visualization's
90      * RendererFactory, and then using the Renderer to draw this item.
91      * @param g the graphics context to render into.
92      */

93     public void render(Graphics2D JavaDoc g);
94     
95     /**
96      * Get the Renderer instance for drawing this VisualItem. The Renderer is
97      * retrieved by requesting it from the backing Visualization's
98      * RendererFactory.
99      * @return the Renderer for this VisualItem
100      */

101     public Renderer getRenderer();
102     
103     /**
104      * Validate the bounds of this VisualItem. When a data value for a
105      * VisualItem is updated, it's bounds are invalidated, as the data change
106      * may have changed to appearance of the item. Revalidating the bounds
107      * causes the bounds of the item to be recomputed and made current.
108      * @return the validated boundig box of this item
109      */

110     public Rectangle2D JavaDoc validateBounds();
111     
112     // -- Boolean Flags -------------------------------------------------------
113

114     /**
115      * Indicates if this VisualItem is currently validated. If not,
116      * validateBounds() must be run to update the bounds to a current value.
117      * @return true if validated, false otherwise
118      * @see #VALIDATED
119      */

120     public boolean isValidated();
121     
122     /**
123      * Set this item's validated flag. This is for internal use by prefuse and,
124      * in general, should not be called by application code.
125      * @param value the value of the validated flag to set.
126      * @see #VALIDATED
127      */

128     public void setValidated(boolean value);
129     
130     /**
131      * Indicates if this VisualItem is currently set to be visible. Items with
132      * the visible flag set false will not be drawn by a display. Invisible
133      * items are also by necessity not interactive, regardless of the value of
134      * the interactive flag.
135      * @return true if visible, false if invisible
136      * @see #VISIBLE
137      */

138     public boolean isVisible();
139     
140     /**
141      * Set this item's visibility.
142      * @param value true to make the item visible, false otherwise.
143      * @see #VISIBLE
144      */

145     public void setVisible(boolean value);
146     
147     /**
148      * Indicates if the start visible flag is set to true. This is the
149      * visibility value consulted for the staring value of the visibility
150      * field at the beginning of an animated transition.
151      * @return true if this item starts out visible, false otherwise.
152      * @see #STARTVISIBLE
153      */

154     public boolean isStartVisible();
155     
156     /**
157      * Set the start visible flag.
158      * @param value true to set the start visible flag, false otherwise
159      * @see #STARTVISIBLE
160      */

161     public void setStartVisible(boolean value);
162
163     /**
164      * Indictes if the end visible flag is set to true. This is the
165      * visibility value consulted for the ending value of the visibility
166      * field at the end of an animated transition.
167      * @return true if this items ends visible, false otherwise.
168      * @see #ENDVISIBLE
169      */

170     public boolean isEndVisible();
171     
172     /**
173      * Set the end visible flag.
174      * @param value true to set the end visible flag, false otherwise
175      * @see #ENDVISIBLE
176      */

177     public void setEndVisible(boolean value);
178     
179     /**
180      * Indicates if this item is interactive, meaning it can potentially
181      * respond to mouse and keyboard input events.
182      * @return true if the item is interactive, false otherwise
183      * @see #INTERACTIVE
184      */

185     public boolean isInteractive();
186
187     /**
188      * Set the interactive status of this VisualItem.
189      * @param value true for interactive, false for non-interactive
190      * @see #INTERACTIVE
191      */

192     public void setInteractive(boolean value);
193     
194     /**
195      * Indicates this item is expanded. Only used for items that are
196      * part of a graph structure.
197      * @return true if expanded, false otherwise
198      * @see #EXPANDED
199      */

200     public boolean isExpanded();
201
202     /**
203      * Set the expanded flag.
204      * @param value true to set as expanded, false as collapsed.
205      * @see #EXPANDED
206      */

207     public void setExpanded(boolean value);
208     
209     /**
210      * Indicates if the item is fixed, and so will not have its position
211      * changed by any layout or distortion actions.
212      * @return true if the item has a fixed position, false otherwise
213      * @see #FIXED
214      */

215     public boolean isFixed();
216
217     /**
218      * Sets if the item is fixed in its position.
219      * @param value true to fix the item, false otherwise
220      * @see #FIXED
221      */

222     public void setFixed(boolean value);
223     
224     /**
225      * Indicates if the item is highlighted.
226      * @return true for highlighted, false for not highlighted
227      * @see #HIGHLIGHT
228      */

229     public boolean isHighlighted();
230     
231     /**
232      * Set the highlighted status of this item. How higlighting values are
233      * interpreted by the system depends on the various processing actions
234      * set up for an application (e.g., how a
235      * {@link prefuse.action.assignment.ColorAction} might assign colors
236      * based on the flag).
237      * @param value true to highlight the item, false for no highlighting.
238      * @see #HIGHLIGHT
239      */

240     public void setHighlighted(boolean value);
241
242     /**
243      * Indicates if the item currently has the mouse pointer over it.
244      * @return true if the mouse pointer is over this item, false otherwise
245      * @see #HOVER
246      */

247     public boolean isHover();
248     
249     /**
250      * Set the hover flag. This is set automatically by the prefuse framework,
251      * so should not need to be set explicitly by application code.
252      * @param value true to set the hover flag, false otherwise
253      * @see #HOVER
254      */

255     public void setHover(boolean value);
256     
257     // ------------------------------------------------------------------------
258

259     /**
260      * Get the current x-coordinate of this item.
261      * @return the current x-coordinate
262      * @see #X
263      */

264     public double getX();
265
266     /**
267      * Set the current x-coordinate of this item.
268      * @param x the new current x-coordinate
269      * @see #X
270      */

271     public void setX(double x);
272     
273     /**
274      * Get the current y-coordinate of this item.
275      * @return the current y-coordinate
276      * @see #Y
277      */

278     public double getY();
279     
280     /**
281      * Set the current y-coordinate of this item.
282      * @param y the new current y-coordinate
283      * @see #Y
284      */

285     public void setY(double y);
286     
287     /**
288      * Get the starting x-coordinate of this item.
289      * @return the starting x-coordinate
290      * @see #STARTX
291      */

292     public double getStartX();
293     
294     /**
295      * Set the starting x-coordinate of this item.
296      * @param x the new starting x-coordinate
297      * @see #STARTX
298      */

299     public void setStartX(double x);
300     
301     /**
302      * Get the starting y-coordinate of this item.
303      * @return the starting y-coordinate
304      * @see #STARTY
305      */

306     public double getStartY();
307     
308     /**
309      * Set the starting y-coordinate of this item.
310      * @param y the new starting y-coordinate
311      * @see #STARTY
312      */

313     public void setStartY(double y);
314     
315     /**
316      * Get the ending x-coordinate of this item.
317      * @return the ending x-coordinate
318      * @see #ENDX
319      */

320     public double getEndX();
321     
322     /**
323      * Set the ending x-coordinate of this item.
324      * @param x the new ending x-coordinate
325      * @see #ENDX
326      */

327     public void setEndX(double x);
328     
329     /**
330      * Get the ending y-coordinate of this item.
331      * @return the ending y-coordinate
332      * @see #ENDY
333      */

334     public double getEndY();
335     
336     /**
337      * Set the ending y-coordinate of this item.
338      * @param y the new ending y-coordinate
339      * @see #ENDY
340      */

341     public void setEndY(double y);
342
343     /**
344      * Get the bounding box for this VisualItem. If necessary, the bounds
345      * will be validated before returning the bounding box.
346      * @return the item's bounding box
347      * @see #BOUNDS
348      */

349     public Rectangle2D JavaDoc getBounds();
350     
351     /**
352      * Set the bounding box for this item. This method is used by Renderer
353      * modules when the bounds are validated, or set by processing Actions
354      * used in conjunction with Renderers that do not perform bounds
355      * management.
356      * @param x the minimum x-coordinate
357      * @param y the minimum y-coorindate
358      * @param w the width of this item
359      * @param h the height of this item
360      * @see #BOUNDS
361      */

362     public void setBounds(double x, double y, double w, double h);
363     
364     // ------------------------------------------------------------------------
365

366     /**
367      * Get the current stroke color of this item. The stroke color is used to
368      * draw lines and the outlines of shapes. Color values as represented as an
369      * integer containing the red, green, blue, and alpha (transparency)
370      * color channels. A color with a zero alpha component is fully
371      * transparent and will not be drawn.
372      * @return the current stroke color, represented as an integer
373      * @see prefuse.util.ColorLib
374      * @see #STROKECOLOR
375      */

376     public int getStrokeColor();
377     
378     /**
379      * Set the current stroke color of this item. The stroke color is used to
380      * draw lines and the outlines of shapes. Color values as represented as an
381      * integer containing the red, green, blue, and alpha (transparency)
382      * color channels. A color with a zero alpha component is fully
383      * transparent and will not be drawn.
384      * @param color the current stroke color, represented as an integer
385      * @see prefuse.util.ColorLib
386      * @see #STROKECOLOR
387      */

388     public void setStrokeColor(int color);
389     
390     /**
391      * Get the starting stroke color of this item. The stroke color is used to
392      * draw lines and the outlines of shapes. Color values as represented as an
393      * integer containing the red, green, blue, and alpha (transparency)
394      * color channels. A color with a zero alpha component is fully
395      * transparent and will not be drawn.
396      * @return the starting stroke color, represented as an integer
397      * @see prefuse.util.ColorLib
398      * @see #STARTSTROKECOLOR
399      */

400     public int getStartStrokeColor();
401     
402     /**
403      * Set the starting stroke color of this item. The stroke color is used to
404      * draw lines and the outlines of shapes. Color values as represented as an
405      * integer containing the red, green, blue, and alpha (transparency)
406      * color channels. A color with a zero alpha component is fully
407      * transparent and will not be drawn.
408      * @param color the starting stroke color, represented as an integer
409      * @see prefuse.util.ColorLib
410      * @see #STARTSTROKECOLOR
411      */

412     public void setStartStrokeColor(int color);
413     
414     /**
415      * Get the ending stroke color of this item. The stroke color is used to
416      * draw lines and the outlines of shapes. Color values as represented as an
417      * integer containing the red, green, blue, and alpha (transparency)
418      * color channels. A color with a zero alpha component is fully
419      * transparent and will not be drawn.
420      * @return the ending stroke color, represented as an integer
421      * @see prefuse.util.ColorLib
422      * @see #ENDSTROKECOLOR
423      */

424     public int getEndStrokeColor();
425     
426     /**
427      * Set the ending stroke color of this item. The stroke color is used to
428      * draw lines and the outlines of shapes. Color values as represented as an
429      * integer containing the red, green, blue, and alpha (transparency)
430      * color channels. A color with a zero alpha component is fully
431      * transparent and will not be drawn.
432      * @param color the ending stroke color, represented as an integer
433      * @see prefuse.util.ColorLib
434      * @see #ENDSTROKECOLOR
435      */

436     public void setEndStrokeColor(int color);
437     
438     /**
439      * Get the current fill color of this item. The fill color is used to
440      * fill the interior of shapes. Color values as represented as an
441      * integer containing the red, green, blue, and alpha (transparency)
442      * color channels. A color with a zero alpha component is fully
443      * transparent and will not be drawn.
444      * @return the current fill color, represented as an integer
445      * @see prefuse.util.ColorLib
446      * @see #FILLCOLOR
447      */

448     public int getFillColor();
449     
450     /**
451      * Set the current fill color of this item. The fill color is used to
452      * fill the interior of shapes. Color values as represented as an
453      * integer containing the red, green, blue, and alpha (transparency)
454      * color channels. A color with a zero alpha component is fully
455      * transparent and will not be drawn.
456      * @param color the current fill color, represented as an integer
457      * @see prefuse.util.ColorLib
458      * @see #FILLCOLOR
459      */

460     public void setFillColor(int color);
461     
462     /**
463      * Get the starting fill color of this item. The fill color is used to
464      * fill the interior of shapes. Color values as represented as an
465      * integer containing the red, green, blue, and alpha (transparency)
466      * color channels. A color with zero alpha component is fully
467      * transparent and will not be drawn.
468      * @return the starting fill color, represented as an integer
469      * @see prefuse.util.ColorLib
470      * @see #STARTFILLCOLOR
471      */

472     public int getStartFillColor();
473
474     /**
475      * Set the starting fill color of this item. The fill color is used to
476      * fill the interior of shapes. Color values as represented as an
477      * integer containing the red, green, blue, and alpha (transparency)
478      * color channels. A color with a zero alpha component is fully
479      * transparent and will not be drawn.
480      * @param color the starting fill color, represented as an integer
481      * @see prefuse.util.ColorLib
482      * @see #STARTFILLCOLOR
483      */

484     public void setStartFillColor(int color);
485     
486     /**
487      * Get the ending fill color of this item. The fill color is used to
488      * fill the interior of shapes. Color values as represented as an
489      * integer containing the red, green, blue, and alpha (transparency)
490      * color channels. A color with zero alpha component is fully
491      * transparent and will not be drawn.
492      * @return the ending fill color, represented as an integer
493      * @see prefuse.util.ColorLib
494      * @see #ENDFILLCOLOR
495      */

496     public int getEndFillColor();
497     
498     /**
499      * Set the ending fill color of this item. The fill color is used to
500      * fill the interior of shapes. Color values as represented as an
501      * integer containing the red, green, blue, and alpha (transparency)
502      * color channels. A color with a zero alpha component is fully
503      * transparent and will not be drawn.
504      * @param color the ending fill color, represented as an integer
505      * @see prefuse.util.ColorLib
506      * @see #ENDFILLCOLOR
507      */

508     public void setEndFillColor(int color);
509     
510     /**
511      * Get the current text color of this item. The text color is used to
512      * draw text strings for the item. Color values as represented as an
513      * integer containing the red, green, blue, and alpha (transparency)
514      * color channels. A color with zero alpha component is fully
515      * transparent and will not be drawn.
516      * @return the current text color, represented as an integer
517      * @see prefuse.util.ColorLib
518      * @see #TEXTCOLOR
519      */

520     public int getTextColor();
521     
522     /**
523      * Set the current text color of this item. The text color is used to
524      * draw text strings for the item. Color values as represented as an
525      * integer containing the red, green, blue, and alpha (transparency)
526      * color channels. A color with a zero alpha component is fully
527      * transparent and will not be drawn.
528      * @param color the current text color, represented as an integer
529      * @see prefuse.util.ColorLib
530      * @see #TEXTCOLOR
531      */

532     public void setTextColor(int color);
533     
534     /**
535      * Get the starting text color of this item. The text color is used to
536      * draw text strings for the item. Color values as represented as an
537      * integer containing the red, green, blue, and alpha (transparency)
538      * color channels. A color with zero alpha component is fully
539      * transparent and will not be drawn.
540      * @return the starting text color, represented as an integer
541      * @see prefuse.util.ColorLib
542      * @see #STARTTEXTCOLOR
543      */

544     public int getStartTextColor();
545     
546     /**
547      * Set the starting text color of this item. The text color is used to
548      * draw text strings for the item. Color values as represented as an
549      * integer containing the red, green, blue, and alpha (transparency)
550      * color channels. A color with a zero alpha component is fully
551      * transparent and will not be drawn.
552      * @param color the starting text color, represented as an integer
553      * @see prefuse.util.ColorLib
554      * @see #STARTTEXTCOLOR
555      */

556     public void setStartTextColor(int color);
557     
558     /**
559      * Get the ending text color of this item. The text color is used to
560      * draw text strings for the item. Color values as represented as an
561      * integer containing the red, green, blue, and alpha (transparency)
562      * color channels. A color with zero alpha component is fully
563      * transparent and will not be drawn.
564      * @return the ending text color, represented as an integer
565      * @see prefuse.util.ColorLib
566      * @see #ENDTEXTCOLOR
567      */

568     public int getEndTextColor();
569     
570     /**
571      * Set the ending text color of this item. The text color is used to
572      * draw text strings for the item. Color values as represented as an
573      * integer containing the red, green, blue, and alpha (transparency)
574      * color channels. A color with a zero alpha component is fully
575      * transparent and will not be drawn.
576      * @param color the ending text color, represented as an integer
577      * @see prefuse.util.ColorLib
578      * @see #ENDTEXTCOLOR
579      */

580     public void setEndTextColor(int color);
581     
582     // ------------------------------------------------------------------------
583

584     /**
585      * Get the current size value of the item. Size values are typically used
586      * to scale an item, either in one-dimension (e.g., a bar chart length) or
587      * two-dimensions (e.g., using pixel area to encode a quantitative value).
588      * @return the current size value
589      * @see #SIZE
590      */

591     public double getSize();
592     
593     /**
594      * Set the current size value of the item. Size values are typically used
595      * to scale an item, either in one-dimension (e.g., a bar chart length) or
596      * two-dimensions (e.g., using pixel area to encode a quantitative value).
597      * @param size the current size value
598      * @see #SIZE
599      */

600     public void setSize(double size);
601     
602     /**
603      * Get the starting size value of the item. Size values are typically used
604      * to scale an item, either in one-dimension (e.g., a bar chart length) or
605      * two-dimensions (e.g., using pixel area to encode a quantitative value).
606      * @return the starting size value
607      * @see #STARTSIZE
608      */

609     public double getStartSize();
610     
611     /**
612      * Set the starting size value of the item. Size values are typically used
613      * to scale an item, either in one-dimension (e.g., a bar chart length) or
614      * two-dimensions (e.g., using pixel area to encode a quantitative value).
615      * @param size the starting size value
616      * @see #STARTSIZE
617      */

618     public void setStartSize(double size);
619     
620     /**
621      * Get the ending size value of the item. Size values are typically used
622      * to scale an item, either in one-dimension (e.g., a bar chart length) or
623      * two-dimensions (e.g., using pixel area to encode a quantitative value).
624      * @return the ending size value
625      * @see #ENDSIZE
626      */

627     public double getEndSize();
628     
629     /**
630      * Set the ending size value of the item. Size values are typically used
631      * to scale an item, either in one-dimension (e.g., a bar chart length) or
632      * two-dimensions (e.g., using pixel area to encode a quantitative value).
633      * @param size the ending size value
634      * @see #ENDSIZE
635      */

636     public void setEndSize(double size);
637     
638     // ------------------------------------------------------------------------
639

640     /**
641      * Get the current shape value of the item. One of the SHAPE constants
642      * included in the {@link prefuse.Constants} class. This value only has an
643      * effect if a Renderer that supports different shapes is used
644      * (e.g., {@link prefuse.render.ShapeRenderer}.
645      * @return the current shape value
646      * @see #SHAPE
647      */

648     public int getShape();
649     
650     /**
651      * Set the current shape value of the item. One of the SHAPE constants
652      * included in the {@link prefuse.Constants} class. This value only has an
653      * effect if a Renderer that supports different shapes is used
654      * (e.g., {@link prefuse.render.ShapeRenderer}.
655      * @param shape the shape value to use
656      * @see #SHAPE
657      */

658     public void setShape(int shape);
659     
660     // ------------------------------------------------------------------------
661

662     /**
663      * Get the current stroke used to draw lines and shape outlines.
664      * @return the stroke used to draw lines and shape outlines
665      */

666     public BasicStroke JavaDoc getStroke();
667     
668     /**
669      * Set the current stroke used to draw lines and shape outlines.
670      * @param stroke the stroke to use to draw lines and shape outlines
671      */

672     public void setStroke(BasicStroke JavaDoc stroke);
673     
674     // ------------------------------------------------------------------------
675

676     /**
677      * Get the current font for the item. The font is used as the default
678      * typeface for drawing text for this item.
679      * @return the current font value
680      * @see #FONT
681      */

682     public Font JavaDoc getFont();
683
684     /**
685      * Set the current font for the item. The font is used as the default
686      * typeface for drawing text for this item.
687      * @param font the current font value
688      * @see #FONT
689      */

690     public void setFont(Font JavaDoc font);
691     
692     /**
693      * Get the starting font for the item. The font is used as the default
694      * typeface for drawing text for this item.
695      * @return the starting font value
696      * @see #STARTFONT
697      */

698     public Font JavaDoc getStartFont();
699
700     /**
701      * Set the starting font for the item. The font is used as the default
702      * typeface for drawing text for this item.
703      * @param font the starting font value
704      * @see #STARTFONT
705      */

706     public void setStartFont(Font JavaDoc font);
707     
708     /**
709      * Get the ending font for the item. The font is used as the default
710      * typeface for drawing text for this item.
711      * @return the ending font value
712      * @see #ENDFONT
713      */

714     public Font JavaDoc getEndFont();
715     
716     /**
717      * Set the ending font for the item. The font is used as the default
718      * typeface for drawing text for this item.
719      * @param font the ending font value
720      * @see #ENDFONT
721      */

722     public void setEndFont(Font JavaDoc font);
723     
724     // ------------------------------------------------------------------------
725

726     /**
727      * Get the degree-of-interest (DOI) value. The degree-of-interet is an
728      * optional value that can be used to sort items by importance, control
729      * item visibility, or influence particular visual encodings. A common
730      * example is to use the DOI to store the graph distance of a node from
731      * the nearest selected focus node.
732      * @return the DOI value of this item
733      * @see #DOI
734      */

735     public double getDOI();
736     
737     /**
738      * Set the degree-of-interest (DOI) value. The degree-of-interet is an
739      * optional value that can be used to sort items by importance, control
740      * item visibility, or influence particular visual encodings. A common
741      * example is to use the DOI to store the graph distance of a node from
742      * the nearest selected focus node.
743      * @param doi the DOI value of this item
744      * @see #DOI
745      */

746     public void setDOI(double doi);
747     
748     // ------------------------------------------------------------------------
749
// VisualItem Base Schema
750

751     /** The validated data field */
752     public static final String JavaDoc VALIDATED
753         = PrefuseLib.FIELD_PREFIX+"validated";
754     /** The visible data field */
755     public static final String JavaDoc VISIBLE
756         = PrefuseLib.FIELD_PREFIX+"visible";
757     /** The start visible data field */
758     public static final String JavaDoc STARTVISIBLE
759         = PrefuseLib.getStartField(VISIBLE);
760     /** The end visible data field */
761     public static final String JavaDoc ENDVISIBLE
762         = PrefuseLib.getEndField(VISIBLE);
763     /** The interactive data field */
764     public static final String JavaDoc INTERACTIVE
765         = PrefuseLib.FIELD_PREFIX+"interactive";
766     /** The expanded data field */
767     public static final String JavaDoc EXPANDED
768         = PrefuseLib.FIELD_PREFIX+"expanded";
769     /** The fixed data field */
770     public static final String JavaDoc FIXED
771         = PrefuseLib.FIELD_PREFIX+"fixed";
772     /** The highlight data field */
773     public static final String JavaDoc HIGHLIGHT
774         = PrefuseLib.FIELD_PREFIX+"highlight";
775     /** The hover data field */
776     public static final String JavaDoc HOVER
777         = PrefuseLib.FIELD_PREFIX+"hover";
778     /** The x data field */
779     public static final String JavaDoc X
780         = PrefuseLib.FIELD_PREFIX+"x";
781     /** The y data field */
782     public static final String JavaDoc Y
783         = PrefuseLib.FIELD_PREFIX+"y";
784     /** The start x data field */
785     public static final String JavaDoc STARTX
786         = PrefuseLib.getStartField(X);
787     /** The start y data field */
788     public static final String JavaDoc STARTY
789         = PrefuseLib.getStartField(Y);
790     /** The end x data field */
791     public static final String JavaDoc ENDX
792         = PrefuseLib.getEndField(X);
793     /** The end y data field */
794     public static final String JavaDoc ENDY
795         = PrefuseLib.getEndField(Y);
796     /** The bounds data field */
797     public static final String JavaDoc BOUNDS
798         = PrefuseLib.FIELD_PREFIX+"bounds";
799     /** The stroke color data field */
800     public static final String JavaDoc STROKECOLOR
801         = PrefuseLib.FIELD_PREFIX+"strokeColor";
802     /** The start stroke color data field */
803     public static final String JavaDoc STARTSTROKECOLOR
804         = PrefuseLib.getStartField(STROKECOLOR);
805     /** The end stroke color data field */
806     public static final String JavaDoc ENDSTROKECOLOR
807         = PrefuseLib.getEndField(STROKECOLOR);
808     /** The fill color data field */
809     public static final String JavaDoc FILLCOLOR
810         = PrefuseLib.FIELD_PREFIX+"fillColor";
811     /** The start fill color data field */
812     public static final String JavaDoc STARTFILLCOLOR
813         = PrefuseLib.getStartField(FILLCOLOR);
814     /** The end fill color data field */
815     public static final String JavaDoc ENDFILLCOLOR
816         = PrefuseLib.getEndField(FILLCOLOR);
817     /** The text color data field */
818     public static final String JavaDoc TEXTCOLOR
819         = PrefuseLib.FIELD_PREFIX+"textColor";
820     /** The start text color data field */
821     public static final String JavaDoc STARTTEXTCOLOR
822         = PrefuseLib.getStartField(TEXTCOLOR);
823     /** The end text color data field */
824     public static final String JavaDoc ENDTEXTCOLOR
825         = PrefuseLib.getEndField(TEXTCOLOR);
826     /** The size data field */
827     public static final String JavaDoc SIZE
828         = PrefuseLib.FIELD_PREFIX+"size";
829     /** The start size data field */
830     public static final String JavaDoc STARTSIZE
831         = PrefuseLib.getStartField(SIZE);
832     /** The end size data field */
833     public static final String JavaDoc ENDSIZE
834         = PrefuseLib.getEndField(SIZE);
835     /** The shape data field */
836     public static final String JavaDoc SHAPE
837         = PrefuseLib.FIELD_PREFIX+"shape";
838     /** The stroke data field */
839     public static final String JavaDoc STROKE
840         = PrefuseLib.FIELD_PREFIX+"stroke";
841     /** The font data field */
842     public static final String JavaDoc FONT
843         = PrefuseLib.FIELD_PREFIX+"font";
844     /** The start font data field */
845     public static final String JavaDoc STARTFONT
846         = PrefuseLib.getStartField(FONT);
847     /** The end font data field */
848     public static final String JavaDoc ENDFONT
849         = PrefuseLib.getEndField(FONT);
850     /** The doi data field */
851     public static final String JavaDoc DOI
852         = PrefuseLib.FIELD_PREFIX+"doi";
853     
854     /** A permanent, locked copy of the base VisualItem schema */
855     public static final Schema SCHEMA
856         = PrefuseLib.getVisualItemSchema().lockSchema();
857     
858     /**
859      * The column index of the validated data field. This should be safe to do
860      * because a unique (non-inherited) validated field is required of all
861      * VisualItems, and should always be the first field included.
862      */

863     public static final int IDX_VALIDATED
864         = SCHEMA.getColumnIndex(VALIDATED);
865     
866     // ------------------------------------------------------------------------
867
// VisualItem Extended Schema
868

869     /** The label data field.
870      * Not included in the VisualItem schema by default */

871     public static final String JavaDoc LABEL
872         = PrefuseLib.FIELD_PREFIX+"label";
873     /** The value data field.
874      * Not included in the VisualItem schema by default */

875     public static final String JavaDoc VALUE
876         = PrefuseLib.FIELD_PREFIX+"value";
877     
878     /** The polygon data field.
879      * Not included in the VisualItem schema by default */

880     public static final String JavaDoc POLYGON
881         = PrefuseLib.FIELD_PREFIX+"polygon";
882     /** The start polygon data field.
883      * Not included in the VisualItem schema by default */

884     public static final String JavaDoc STARTPOLYGON
885         = PrefuseLib.getStartField(POLYGON);
886     /** The end polygon data field.
887      * Not included in the VisualItem schema by default */

888     public static final String JavaDoc ENDPOLYGON
889         = PrefuseLib.getStartField(POLYGON);
890     
891     /** The x2 data field.
892      * Not included in the VisualItem schema by default */

893     public static final String JavaDoc X2
894         = PrefuseLib.FIELD_PREFIX+"x2";
895     /** The y2 data field.
896      * Not included in the VisualItem schema by default */

897     public static final String JavaDoc Y2
898         = PrefuseLib.FIELD_PREFIX+"y2";
899     /** The start x2 data field.
900      * Not included in the VisualItem schema by default */

901     public static final String JavaDoc STARTX2
902         = PrefuseLib.getStartField(X2);
903     /** The start y2 data field.
904      * Not included in the VisualItem schema by default */

905     public static final String JavaDoc STARTY2
906         = PrefuseLib.getStartField(Y2);
907     /** The end x2 data field.
908      * Not included in the VisualItem schema by default */

909     public static final String JavaDoc ENDX2
910         = PrefuseLib.getEndField(X2);
911     /** The end y2 data field.
912      * Not included in the VisualItem schema by default */

913     public static final String JavaDoc ENDY2
914         = PrefuseLib.getEndField(Y2);
915     
916 } // end of interface VisualItem
917
Popular Tags