ur_rna.StructureEditor.services.drawing

## Class SelectionRotater

- java.lang.Object
- - ur_rna.StructureEditor.services.drawing.DrawHandle
  - - ur_rna.StructureEditor.services.drawing.SelectionRotater

-     public class SelectionRotater
      extends DrawHandle

  A Drawhandle that allows the user to rotate a group of selected Nucleotides.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SelectionRotater.CenterPoint`
    `static class` | `SelectionRotater.RotationCenter`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private SelectionRotater.CenterPoint` | `center`

    - ### Fields inherited from class ur_rna.StructureEditor.services.drawing.DrawHandle

      `_tmpPt, _tmpTr, allNucs, boxSize, cachedBounds, controller, customCursor, defaultBgColor, defaultLineColor, defaultOutline, icon, location, SNAP_DISTANCE, startLocation, targetNuc, view`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SelectionRotater(SceneController controller)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dragComplete(boolean success)` Called when the user has completed dragging (e.g.
    `SelectionRotater.CenterPoint` | `getCenterPoint()`
    `SceneUpdateInfo` | `getCompletionEvent()`
    `boolean` | `isValid()`
    `protected void` | `nucPositionsChanged()` Called when any nucleotides in the scene changed position, EXCEPT when THIS DrawHandle is in the middle of a performDrag operation (because any nucleotide changes then are likely due to its own drag operation).
    `protected void` | `performDrag(java.awt.Point start, java.awt.Point prev, java.awt.Point current, SceneController.DragOpts options)` Called when this handle has been dragged by the user.
    `protected void` | `prepareDraw(boolean isDragging)`
    `(package private) void` | `resetLocation()`
    `protected void` | `selectionChanged()`
    `void` | `setSelection(Nuc focus, java.util.Collection<Nuc> selection)`

    - ### Methods inherited from class ur_rna.StructureEditor.services.drawing.DrawHandle

      `calcBoxPos, drag, dragStarted, draw, drawBox, getBounds, getBoxSize, getModelSpaceDeltaTransform, isEnabled, isUpdating, layoutUpdated, moveLocation, setBoxSize, setEnabled, setIcon, settingsChanged`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### center

          private SelectionRotater.CenterPoint center

  - ### Constructor Detail

    - #### SelectionRotater

          public SelectionRotater(SceneController controller)

  - ### Method Detail

    - #### dragComplete

          public void dragComplete(boolean success)

      Description copied from class: `DrawHandle`
      Called when the user has completed dragging (e.g. on mouse-button-release.) It is appropriate to add an undo event.
      Overrides:
        `dragComplete` in class `DrawHandle`
      Parameters:
        `success` - Whether the action was successful (and therefore should be stored in the UNDO history).

    - #### getCenterPoint

          public SelectionRotater.CenterPoint getCenterPoint()

    - #### getCompletionEvent

          public SceneUpdateInfo getCompletionEvent()

      Specified by:
        `getCompletionEvent` in class `DrawHandle`

    - #### isValid

          public boolean isValid()

      Specified by:
        `isValid` in class `DrawHandle`

    - #### nucPositionsChanged

          protected void nucPositionsChanged()

      Description copied from class: `DrawHandle`
      Called when any nucleotides in the scene changed position, EXCEPT when THIS DrawHandle is in the middle of a performDrag operation (because any nucleotide changes then are likely due to its own drag operation).
      Specified by:
        `nucPositionsChanged` in class `DrawHandle`

    - #### performDrag

          protected void performDrag(java.awt.Point start,
                                     java.awt.Point prev,
                                     java.awt.Point current,
                                     SceneController.DragOpts options)

      Called when this handle has been dragged by the user.
      Specified by:
        `performDrag` in class `DrawHandle`

    - #### prepareDraw

          protected void prepareDraw(boolean isDragging)

      Specified by:
        `prepareDraw` in class `DrawHandle`

    - #### resetLocation

          void resetLocation()

    - #### selectionChanged

          protected void selectionChanged()

      Specified by:
        `selectionChanged` in class `DrawHandle`

    - #### setSelection

          public void setSelection(Nuc focus,
                                   java.util.Collection<Nuc> selection)

      Overrides:
        `setSelection` in class `DrawHandle`