Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jpicedt.graphic.view
Class DefaultHighlighterFactory.CompositeHighlighter

    java.lang.Object
      jpicedt.graphic.view.DefaultHighlighterFactory.DefaultHighlighter
          jpicedt.graphic.view.DefaultHighlighterFactory.CompositeHighlighter

All Implemented Interfaces:
  Highlighter

Enclosing class:
  DefaultHighlighterFactory

public class DefaultHighlighterFactory.CompositeHighlighter
extends DefaultHighlighterFactory.DefaultHighlighter

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

### LOCAL_MODE

    public static final String LOCAL_MODE

  Highlighting mode corresponding to each Element belonging to the selection is highlighted

  See Also:
    Constant Field Values

### GLOBAL_MODE

    public static final 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

  See Also:
    Constant Field Values

### highlightingMode

    protected String highlightingMode

  highlight mode

Constructor Detail

### DefaultHighlighterFactory.CompositeHighlighter

    public DefaultHighlighterFactory.CompositeHighlighter(BranchElement e)

  construct a new Highlighter for the given PicGroup

Method Detail

### setHighlightingMode

    public void setHighlightingMode(String mode)

  set the current highlighting mode ; this influences the way the Highligther is painted, but also the result returned by HitTest.

  Parameters:
    `mode` - or LOCAL_MODE or GLOBAL_MODE

### getHighlightingMode

    public String getHighlightingMode()

  Return the current highlighting mode

### toggleHighlightingMode

    public void toggleHighlightingMode()

  Toggle the current highlighting mode

### syncShape

    protected void syncShape(double scale)

  Synchronize the array of "shapes" needed to paint this highlighter, with the model ;

  Overrides:
    `syncShape` in class `DefaultHighlighterFactory.DefaultHighlighter`
  Parameters:
    `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.

### paint

    public void paint(Graphics2D g,
                      Rectangle2D allocation,
                      double scale)

  Render the Highlighter to the given graphic context.

  Specified by:
    `paint` in interface `Highlighter`
  Overrides:
    `paint` in class `DefaultHighlighterFactory.DefaultHighlighter`
  Parameters:
    `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.

### hitTest

    public HitInfo hitTest(PEMouseEvent e)

  Description copied from class: `DefaultHighlighterFactory.DefaultHighlighter`
  Current implementation returns a HitInfo.Point if a click occured on one of the controlled-point indices returned by `getControlPointsIterator()` ; return null otherwise.

  Specified by:
    `hitTest` in interface `Highlighter`
  Overrides:
    `hitTest` in class `DefaultHighlighterFactory.DefaultHighlighter`
  Returns:
    a HitInfo corresponding to the given mouse-event

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug : syd@jpicedt.org