|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAnnotationCreator
An interface for creation of visible annotations.
This is a creational interface that allows implementors to return a
that will be used as "content area" of the
visible annotation.
JComponent
This factory is configured to every
instance by
calling
Chart2D
.
ChartPanel.setAnnotationCreator(IAnnotationCreator)
Method Summary | |
---|---|
javax.swing.JComponent |
createAnnotationView(ChartPanel chart,
ITracePoint2D point,
AAnnotationContentComponent annotationPainter,
boolean useDragListenerOnAnnotationContent,
boolean useTitleBar)
Factory method to create a JComponent that annotates the given
ITracePoint . |
Method Detail |
---|
javax.swing.JComponent createAnnotationView(ChartPanel chart, ITracePoint2D point, AAnnotationContentComponent annotationPainter, boolean useDragListenerOnAnnotationContent, boolean useTitleBar)
JComponent
that annotates the given
ITracePoint
.
The returned component will be the "content area" of the visible
annotation. It's method
will be used to
define the overall size of the visible annotation.
Component.getPreferredSize()
The returned component may have it's own mouse listeners because dragging
of the annotation will be supported by a separate title bar part. However
it may also use the given dragListener
via
and
Component.addMouseListener(java.awt.event.MouseListener)
if the "content area" of the visible annotation should only support
dragging the annotation and a right - click menu for basic operations.
Component.addMouseMotionListener(java.awt.event.MouseMotionListener)
The implementation should build a complete annotation view with all required event listeners that contains at least the annotation content component that given here.
chart
- the chart panel to add the annotation to, potentially needed for
the removal of the annotation view when it's optional title bar
close icon is pressed.point
- the point that is annotated.useDragListenerOnAnnotationContent
- if true the content area that contains the information of the
annotation will support drag and drop as well as a basic right
click popup menu.annotationPainter
- the content component of the annotation that will display the
information of the annotation.useTitleBar
- if true, a title bar with close button for the annotation will be
shown.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |