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.toolkit
Class EditPointMouseTransformFactory.SelectedPointsHandler

    java.lang.Object
      jpicedt.graphic.toolkit.EditPointMouseTransformFactory.SelectedPointsHandler

Enclosing class:
  EditPointMouseTransformFactory

protected class EditPointMouseTransformFactory.SelectedPointsHandler
extends Object

Helper class for SelectPointsInAreaTransform. This is a typesafe container for ONE Element and the indices of its selected-points

Indices are ALWAYS sorted in descending order : this helps e.g. RemovePointTransform removing curve's points starting from the end (this is made necessary so as to preserve the meaning of yet-to-be-removed points indices ; removing points starting from index "0" would surely lead to odd behaviour since ensuing indices would be shifted to the "left").

Constructor Summary
`EditPointMouseTransformFactory.SelectedPointsHandler()`

Method Summary
`void` | `clear()` clears the state of this handler by removing the reference to the current Element and its selected points
`Element` | `getElement()` returns the current target Element
`int` | `getSelectionSize()` return the number of selected points for the current element
`Iterator` | `indexIterator()` return an Iterator over the set of selected-points indices (wrapped in Integer's)
`boolean` | `isSelected(HitInfo.Point hip)` Return true if at least one point in the given HitInfo.Point is selected
`boolean` | `isSelected(int idx)` Returns true if the point with the given index is selected.
`void` | `selectPoint(int idx)` adds the given point index to the selection
`void` | `setElement(Element e)` sets the current Element and clears the list of selected-points
`String` | `toString()`
`void` | `unSelectPoint(int idx)` removes the given point index to the selection

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### EditPointMouseTransformFactory.SelectedPointsHandler

    public EditPointMouseTransformFactory.SelectedPointsHandler()

Method Detail

### clear

    public void clear()

  clears the state of this handler by removing the reference to the current Element and its selected points

### setElement

    public void setElement(Element e)

  sets the current Element and clears the list of selected-points

### getElement

    public Element getElement()

  returns the current target Element

### selectPoint

    public void selectPoint(int idx)

  adds the given point index to the selection

### unSelectPoint

    public void unSelectPoint(int idx)

  removes the given point index to the selection

### isSelected

    public boolean isSelected(int idx)

  Returns true if the point with the given index is selected.

### isSelected

    public boolean isSelected(HitInfo.Point hip)

  Return true if at least one point in the given HitInfo.Point is selected

### getSelectionSize

    public int getSelectionSize()

  return the number of selected points for the current element

### indexIterator

    public Iterator indexIterator()

  return an Iterator over the set of selected-points indices (wrapped in Integer's)

### toString

    public String toString()

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