ur_rna.StructureEditor.services.drawing

## Class BranchSlider

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

-     public class BranchSlider
      extends DrawHandle

  A DrawHandle that allows a user to "slide" an RNA branch (i.e. a helix and everything on one side of it.) along the smooth arc of the circular loop at the helix's base.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.awt.geom.Point2D.Float` | `_ptModel`
    `private Bond` | `b3`
    `private Bond` | `b5`
    `private Bond` | `base`
    `private java.util.Set<Nuc>` | `branchNucs`
    `private java.awt.Point` | `handleOffset`
    `private Motif.Helix` | `helix`
    `private Motif.Loop` | `l3`
    `private Motif.Loop` | `l5`
    `private static SceneUpdateInfo` | `SlideBranch`

    - ### 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
    `BranchSlider(SceneController controller)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `calcHandleOffset()`
    `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.
    `private void` | `positionLoopNucs(Motif.Segment segment, Ellipses.Circle circ, boolean flipped)`
    `private void` | `positionNucs(java.awt.geom.Point2D.Float newTargetLoc, SceneController.DragOpts options)`
    `private void` | `positionNucsRotate(java.awt.geom.Point2D.Float newTargetLoc, SceneController.DragOpts options)`
    `protected void` | `prepareDraw(boolean isDragging)`
    `protected void` | `selectionChanged()`
    `void` | `setSelection(Nuc focus, java.util.Collection<Nuc> selection)`

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

      `calcBoxPos, drag, dragComplete, 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

    - #### _ptModel

          private java.awt.geom.Point2D.Float _ptModel

    - #### b3

          private Bond b3

    - #### b5

          private Bond b5

    - #### base

          private Bond base

    - #### branchNucs

          private java.util.Set<Nuc> branchNucs

    - #### handleOffset

          private java.awt.Point handleOffset

    - #### helix

          private Motif.Helix helix

    - #### l3

          private Motif.Loop l3

    - #### l5

          private Motif.Loop l5

    - #### SlideBranch

          private static final SceneUpdateInfo SlideBranch

  - ### Constructor Detail

    - #### BranchSlider

          public BranchSlider(SceneController controller)

  - ### Method Detail

    - #### calcHandleOffset

          private void calcHandleOffset()

    - #### 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`

    - #### positionLoopNucs

          private void positionLoopNucs(Motif.Segment segment,
                                        Ellipses.Circle circ,
                                        boolean flipped)

    - #### positionNucs

          private void positionNucs(java.awt.geom.Point2D.Float newTargetLoc,
                                    SceneController.DragOpts options)

    - #### positionNucsRotate

          private void positionNucsRotate(java.awt.geom.Point2D.Float newTargetLoc,
                                          SceneController.DragOpts options)

    - #### prepareDraw

          protected void prepareDraw(boolean isDragging)

      Specified by:
        `prepareDraw` in class `DrawHandle`

    - #### 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`