|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpicedt.graphic.view.DefaultHighlighterFactory.DefaultHighlighter
jpicedt.graphic.view.DefaultHighlighterFactory.CompositeHighlighter
public class DefaultHighlighterFactory.CompositeHighlighter
an Highlighter for a BranchElement
Field Summary | |
---|---|
static 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 String |
highlightingMode
highlight mode |
static String |
LOCAL_MODE
Highlighting mode corresponding to each Element belonging to the selection is highlighted |
Fields inherited from class jpicedt.graphic.view.DefaultHighlighterFactory.DefaultHighlighter |
---|
bounds, element, pointIndexIterator, ptBuffer, rectBuffer, shape |
Constructor Summary | |
---|---|
DefaultHighlighterFactory.CompositeHighlighter(BranchElement e)
construct a new Highlighter for the given PicGroup |
Method Summary | |
---|---|
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(Graphics2D g,
Rectangle2D allocation,
double scale)
Render the Highlighter to the given graphic context. |
void |
setHighlightingMode(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 |
Methods inherited from class jpicedt.graphic.view.DefaultHighlighterFactory.DefaultHighlighter |
---|
changedUpdate, getBounds, getControlPointsIterator, getElement, getHighlighterFactory, syncBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LOCAL_MODE
public static final String GLOBAL_MODE
protected String highlightingMode
Constructor Detail |
---|
public DefaultHighlighterFactory.CompositeHighlighter(BranchElement e)
Method Detail |
---|
public void setHighlightingMode(String mode)
mode
- or LOCAL_MODE or GLOBAL_MODEpublic 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(Graphics2D g, 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
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |