|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ViewAnnotation
A ViewAnnotation is a component which provides additional rendering for a View, e.g. a highlight or decal.
Implementations of this interface must provide a constructor with a single Object parameter,
which will be used to pass the extra data on the view annotation that is registered in CustomTagController.registerViewAnnotation(String, Class, Object).
A common pattern is to pass in a controller object that can be queried for relevant information.
| Method Summary | |
|---|---|
Cursor |
getCursorFor(MouseEvent event,
int pos,
Point point,
Rectangle allocation)
Allows the annotation to override the mouse cursor at certain points in the view. |
String |
getToolTipText(Point point,
Rectangle allocation)
Allows the annotation to display a tooltip. |
void |
paint(Graphics graphics,
Shape shape)
Allows additional rendering on top of the existing content a View renders. |
void |
setPropertiesFromAttributes(View view)
Called after the view's attributes have been updated in response to a document event. |
| Method Detail |
|---|
void paint(Graphics graphics,
Shape shape)
graphics - the rendering surface to useshape - allocation bounds of this viewvoid setPropertiesFromAttributes(View view)
view - the view associated with the ViewAnnotation
String getToolTipText(Point point,
Rectangle allocation)
point - location of the mouse on screen when the tooltip must be displayedallocation - allocation bounds of this view
Cursor getCursorFor(MouseEvent event,
int pos,
Point point,
Rectangle allocation)
event - mouse motion event that caused this request for a cursorpos - precalculated document position under the cursorpoint - mouse position on screenallocation - allocation bounds of this view
|
Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||