|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Highlighter
a view dedicated to painting an Element's highlighter, e.g. when the Element
is selected. This is a delegate for a hosting View, and is created by a dedicated
HighlighterFactory.
This highlighter should provide the following capabilities :
Method Summary | |
---|---|
void |
changedUpdate(DrawingEvent.EventType eventType,
double scale)
Give notification from the model that a change occured for an element's highlighting this highlighter is responsible for rendering. |
Rectangle2D |
getBounds()
Returns the bounds of this Highlighter This will determine the clipping rectangle passed as a parameter to repaint in the hosting view |
Element |
getElement()
returns the higlighted Element |
HighlighterFactory |
getHighlighterFactory()
Fetches the HighlighterFactory implementation that is feeding the view hierarchy. |
HitInfo |
hitTest(PEMouseEvent e)
Returns a HitInfo corresponding to the given mouse-event on this Highlighter. |
boolean |
intersect(Rectangle2D r,
ArrayList<Element> list)
If this highligher intersects the given rectangle, add the associated Element (or a child Element if it's more appropriate, for instance for composite views) to the given list (if non-null), and returns true. |
void |
paint(Graphics2D g,
Rectangle2D allocation,
double scale)
Render the Highlighter to the given graphic context. |
Method Detail |
---|
HighlighterFactory getHighlighterFactory()
Element getElement()
void changedUpdate(DrawingEvent.EventType eventType, double scale)
void paint(Graphics2D g, Rectangle2D allocation, double scale)
allocation
- current clippingscale
- The current scale factor from model to screen for the Graphics2D context ;
this may be used to scale down line thickess, etc... so that lines/rectangle/... appear with the
same lenght on the screen whatever the scale factor that's set to the graphic context.Rectangle2D getBounds()
HitInfo hitTest(PEMouseEvent e)
boolean intersect(Rectangle2D r, ArrayList<Element> list)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |