|
|
|||||||||
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 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 |
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 | |
---|---|
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 |
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 java.lang.String LOCAL_MODE
public static final java.lang.String GLOBAL_MODE
protected java.lang.String highlightingMode
Constructor Detail |
---|
public DefaultHighlighterFactory.CompositeHighlighter(BranchElement e)
Method Detail |
---|
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
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |