public class DefaultHighlighterFactory.CompositeHighlighter extends DefaultHighlighterFactory.DefaultHighlighter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GLOBAL_MODE
Highlighting mode corresponding to
the selection-handler behaving as if it were a PicGroup,
hence its 8 control-points only are highlighted
|
protected java.lang.String |
highlightingMode
highlight mode
|
static java.lang.String |
LOCAL_MODE
Highlighting mode corresponding to each Element belonging to the selection is highlighted
|
bounds, element, pointIndexIterator, ptBuffer, rectBuffer, shape
Constructor and Description |
---|
DefaultHighlighterFactory.CompositeHighlighter(BranchElement e)
construct a new Highlighter for the given PicGroup
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHighlightingMode()
Return the current highlighting mode
|
HitInfo |
hitTest(PEMouseEvent e)
Current implementation returns a HitInfo.Point if a click
occured on one of the controlled-point indices returned by
getControlPointsIterator() ; return null otherwise. |
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D allocation,
double scale)
Render the Highlighter to the given graphic context.
|
void |
setHighlightingMode(java.lang.String mode)
set the current highlighting mode ;
this influences the way the Highligther is painted, but also the result returned by HitTest.
|
protected void |
syncShape(double scale)
Synchronize the array of "shapes" needed to paint this highlighter, with the model ;
|
void |
toggleHighlightingMode()
Toggle the current highlighting mode
|
changedUpdate, getBounds, getControlPointsIterator, getElement, getHighlighterFactory, syncBounds
public static final java.lang.String LOCAL_MODE
public static final java.lang.String GLOBAL_MODE
protected java.lang.String highlightingMode
public DefaultHighlighterFactory.CompositeHighlighter(BranchElement e)
public void setHighlightingMode(java.lang.String mode)
mode
- or LOCAL_MODE or GLOBAL_MODEpublic java.lang.String getHighlightingMode()
public void toggleHighlightingMode()
protected void syncShape(double scale)
syncShape
in class DefaultHighlighterFactory.DefaultHighlighter
scale
- The current scale factor from-model-to-screen for the Graphics2D context ;
this may be used to scale down line thickess, etc... so that e.g. barbells appear with the
same size on the screen whatever the scale factor being set to the graphic context.public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)
paint
in interface Highlighter
paint
in class DefaultHighlighterFactory.DefaultHighlighter
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 e.g. barbells appear with the
same size on the screen whatever the scale factor being set to the graphic context.public HitInfo hitTest(PEMouseEvent e)
DefaultHighlighterFactory.DefaultHighlighter
getControlPointsIterator()
; return null otherwise.hitTest
in interface Highlighter
hitTest
in class DefaultHighlighterFactory.DefaultHighlighter
Submit a bug : syd@jpicedt.org