ur_rna.StructureEditor.services

## Class RnaDrawController

- java.lang.Object
- - ur_rna.StructureEditor.services.RnaDrawController

- All Implemented Interfaces:
    SceneController, SceneRenderer

      public class RnaDrawController
      extends java.lang.Object
      implements SceneRenderer, SceneController

  The controller that interprets input from the screens, modifies the RNAscene, keeps a history of changes, and reports updates to subscribed listeners.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RnaDrawController.BehaviorMode` BehaviorMode defines two separate "behavior modes" that combine selection behavior along with draw-handle and dragging behaviors.
    `static class` | `RnaDrawController.Colors`
    `private class` | `RnaDrawController.MouseHandler`
    `private static class` | `RnaDrawController.NucGroup`
    `private static class` | `RnaDrawController.ScreenNuc`
    `static class` | `RnaDrawController.SelectionType`

    - ### Nested classes/interfaces inherited from interface ur_rna.StructureEditor.services.SceneController

      `SceneController.DragOpts`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Vec2D` | `_backboneDir`
    `private Vec2D` | `_backboneEnd`
    `(package private) java.awt.geom.Line2D.Float` | `_backboneLine`
    `private Vec2D` | `_backboneStart`
    `(package private) Graphics2DRecorder` | `_dummyGraphics`
    `private int` | `_suspendRedraw`
    `private int` | `_suspendUpdatesCounter`
    `private java.awt.geom.Point2D` | `_tmpPt`
    `private java.awt.geom.AffineTransform` | `_tmpTr`
    `private RnaDrawController.BehaviorMode` | `behaviorMode`
    `private ICanvas` | `canvas`
    `private java.awt.Component` | `canvasComponent`
    `private float[]` | `coords`
    `private static int` | `DESELECT_ONLY`
    `static int` | `DRAG_EXPANDED_MOTIF_MASK`
    `static int` | `DRAG_SPECIAL_MASK`
    `private DrawHandle[]` | `drawHandles`
    `private java.util.Collection<DrawHint>` | `drawHints`
    `static int` | `EDIT_CLICK_MASK`
    `private java.awt.geom.Line2D.Float` | `editBond`
    `private int[]` | `EMPTY_SELECTION`
    `private Nuc` | `focused`
    `private DrawHandle` | `handleBranchSlide`
    `private DrawHandle` | `handleLoopResize`
    `private DrawHandle` | `handleRotate`
    `EventSource.OneArg<HistoryUpdateEvent>` | `historyEvent`
    `private static double` | `minBiasRange`
    `private RnaDrawController.MouseHandler` | `mouseHandler`
    `private RnaDrawController.ScreenNuc[]` | `nucScreenShapes`
    `private java.awt.Shape[]` | `nucShapes`
    `private boolean` | `prevBias`
    `private java.awt.geom.Point2D` | `prevStart`
    `(package private) double` | `prevTheta`
    `private RnaScene` | `scene`
    `EventSource.OneArg<SceneUpdateEvent>` | `sceneUpdated`
    `private java.util.List<IScreenObject>` | `screenObjects`
    `private static int` | `SELECT_ONLY`
    `private java.util.Set<Nuc>` | `selection`
    `static int` | `SELECTION_ADD_MASK`
    `private java.awt.Rectangle` | `selectionBand`
    `private RnaDrawController.SelectionType` | `selType`
    `private DrawSettings` | `settings`
    `private static double[]` | `stickyRotationAngles`
    `private static double` | `stickyRotationEpsilon`
    `(package private) java.awt.geom.Ellipse2D.Float` | `tmpNucShape`
    `private boolean` | `useRecorder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RnaDrawController()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addBond(Nuc n1, Nuc n2)`
    `DrawHint` | `addHint(java.awt.Shape shape)`
    `DrawHint` | `addHint(java.lang.String text, double centerX, double centerY)`
    `boolean` | `addHistoryListener(java.util.function.Consumer<HistoryUpdateEvent> listener)`
    `boolean` | `addSceneUpdateListener(java.util.function.Consumer<SceneUpdateEvent> listener)`
    `void` | `addUndo(SceneUpdateInfo type)`
    `private boolean` | `allNucsFitCircle(Nuc start, Nuc end, Ellipses.Circle c)`
    `private void` | `applyHistoryState(HistoryState state)`
    `void` | `breakSelectedBonds()`
    `java.awt.Rectangle` | `calcBounds(java.awt.Graphics2D graphics, View2D view, boolean includeInteractive)`
    `Vec2D` | `calcNormalToNuc(Nuc cur)`
    `private java.awt.geom.Point2D.Float` | `calcNucGroupCenter(java.util.Collection<Nuc> list)`
    `boolean` | `canRedo()`
    `boolean` | `canUndo()`
    `private void` | `clearSelection()`
    `void` | `clearUndo()`
    `void` | `colorize(SceneColorizer sc, boolean allNucs)`
    `void` | `controlsUpdated()`
    `private RnaScene` | `createDefaultScene()`
    `void` | `deleteSelectedBases()`
    `private void` | `dragNucs(Nuc dragNuc, java.awt.Point startPos, java.awt.Point prevPos, java.awt.Point curPos, SceneController.DragOpts options)`
    `java.util.List<IScreenObject>` | `draw(java.awt.Graphics2D g, View2D view, DrawSettings settings, boolean interactive)`
    `private void` | `drawBonds(java.awt.Graphics2D g, View2D view, java.util.List<IScreenObject> objects)`
    `private void` | `drawCurvedBackbones(java.awt.Graphics2D g, boolean[] done, float minDist)`
    `private IScreenObject` | `drawNucNumber(java.awt.Graphics2D g, View2D view, Nuc cur, int number)`
    `private void` | `drawNucOutline(java.awt.Graphics2D g, Nuc n, java.awt.Color c)`
    `private void` | `drawSimpleBackbones(java.awt.Graphics2D g, boolean[] done, float minDist)`
    `void` | `expandSelection()` If a nucleotide is selected, this expands to the helix or loop.
    `Motif.Helix` | `findBaseHelix(java.util.Collection<Nuc> list)`
    `void` | `flip(boolean vertical, boolean selectionOnly)`
    `RnaDrawController.BehaviorMode` | `getBehaviorMode()`
    `private java.awt.Color` | `getBondColor(Bond b)`
    `ICanvas` | `getCanvas()`
    `Nuc` | `getFocused()`
    `private INucGroup` | `getMotif(Nuc nuc, RnaDrawController.SelectionType selectionType, boolean allowNull)`
    `private java.awt.Shape` | `getNucShape(Nuc n)`
    `RnaScene` | `getScene()`
    `private IScreenObject` | `getScreenObject(Nuc n, View2D view, int zorder)`
    `Nuc[]` | `getSelected()`
    `private int[]` | `getSelectionState()`
    `DrawSettings` | `getSettings()`
    `private void` | `handleSelectionChange()`
    `void` | `historyUpdated()`
    `private IScreenObject` | `hitTest(java.lang.Iterable<IScreenObject> list, java.awt.geom.Point2D pt, boolean nucsOnly)`
    `private java.util.List<IScreenObject>` | `hitTest(java.lang.Iterable<IScreenObject> list, java.awt.Rectangle rc, boolean nucsOnly)`
    `void` | `insertBases(java.lang.String sequence, Nuc ref, boolean insertAfter)` Insert new bases before or after the specified nucleotide.
    `private boolean` | `isFullMotifSelected()`
    `boolean` | `isUserActionInProgress()`
    `void` | `joinSelectionStrands()`
    `void` | `layoutUpdated(SceneUpdateInfo details)`
    `void` | `layoutUpdated(SceneUpdateInfo details, boolean addHistoryEntry)`
    `void` | `notifyUpdate(SceneUpdateInfo details)`
    `void` | `notifyUpdate(SceneUpdateInfo update, boolean addHistoryEntry)`
    `private boolean` | `nucFitsCircle(int sceneIndex, Ellipses.Circle c)`
    `protected void` | `onSceneUpdate(SceneUpdateEvent eventInfo)`
    `void` | `programSettingsChanged(Settings settings)`
    `void` | `redo()`
    `private void` | `redraw()`
    `void` | `redrawSelection()`
    `void` | `removeColors(boolean allNucs)`
    `boolean` | `removeHistoryListener(java.util.function.Consumer<HistoryUpdateEvent> listener)`
    `boolean` | `removeSceneUpdateListener(java.util.function.Consumer<SceneUpdateEvent> listener)`
    `java.util.Collection<IScreenObject>` | `render(java.awt.Graphics2D graphics, View2D view, boolean includeInteractive)`
    `private void` | `resetRnaCoords()`
    `private void` | `resetStructure()`
    `void` | `resumeRedraw(boolean forceRedraw)`
    `void` | `resumeUpdates()`
    `void` | `rotateNucs(java.util.Collection<Nuc> list, java.awt.geom.Point2D modelCenter, double theta)`
    `void` | `rotateNucs(java.util.Collection<Nuc> list, java.awt.geom.Point2D modelCenter, java.awt.Point start, java.awt.Point end, SceneController.DragOpts options)`
    `void` | `rotateNucs(java.util.Collection<Nuc> list, java.awt.geom.Point2D modelCenter, java.awt.Point start, java.awt.Point end, SceneController.DragOpts options, Motif.Helix baseHelix, boolean showArc)`
    `void` | `selectAll()`
    `void` | `selectionUpdated()`
    `private void` | `selectMotif(Nuc nuc, boolean sel, RnaDrawController.SelectionType selectionType)`
    `private void` | `selectNucs(java.lang.Iterable<Nuc> nucs, boolean sel)`
    `void` | `selectSpecial(RnaDrawController.SelectionType type)`
    `void` | `setBehaviorMode(RnaDrawController.BehaviorMode behaviorMode)`
    `void` | `setCanvas(ICanvas newCanvas)`
    `private void` | `setCanvasComponent(java.awt.Component canvasComponent)`
    `void` | `setScene(RnaScene scene)`
    `void` | `setSelectedBondType(BondType selectedBondType)`
    `private void` | `setSelectionState(int[] sel)`
    `void` | `setSelType(RnaDrawController.SelectionType sel)`
    `void` | `setSettings(DrawSettings settings)`
    `void` | `splitStrandsAtSelection()`
    `private void` | `storeRnaCoords()`
    `void` | `structureUpdated(SceneUpdateInfo details)`
    `void` | `styleUpdated(SceneUpdateInfo details)`
    `void` | `suspendRedraw()`
    `void` | `suspendUpdates()`
    `protected void` | `transformNucs(java.util.Collection<Nuc> list, java.awt.geom.AffineTransform tr)`
    `void` | `translateScreenNucs(java.util.Collection<Nuc> list, java.awt.geom.Point2D screenDelta)` Translates all selected nucleotides by the x and y coordinates of the delta point, which is assumed to be in screen coordinates.
    `void` | `translateScreenNucs(java.util.Collection<Nuc> list, java.awt.Point start, java.awt.Point end)` Translates all selected nucleotides by the x and y coordinates of the delta point, which is assumed to be in screen coordinates.
    `void` | `undo()`
    `private Nuc` | `updateSelection(boolean append, Nuc nuc, int allowMode)` Updates the set of selected Nucs based on the current selection and the user's intention.
    `private void` | `updateSelection(boolean append, java.awt.Rectangle selRect)`
    `void` | `viewUpdated()`

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

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

    - ### Methods inherited from interface ur_rna.StructureEditor.services.SceneController

      `programSettings`

- - ### Field Detail

    - #### _backboneDir

          private Vec2D _backboneDir

    - #### _backboneEnd

          private Vec2D _backboneEnd

    - #### _backboneLine

          java.awt.geom.Line2D.Float _backboneLine

    - #### _backboneStart

          private Vec2D _backboneStart

    - #### _dummyGraphics

          Graphics2DRecorder _dummyGraphics

    - #### _suspendRedraw

          private int _suspendRedraw

    - #### _suspendUpdatesCounter

          private int _suspendUpdatesCounter

    - #### _tmpPt

          private final java.awt.geom.Point2D _tmpPt

    - #### _tmpTr

          private final java.awt.geom.AffineTransform _tmpTr

    - #### behaviorMode

          private RnaDrawController.BehaviorMode behaviorMode

    - #### canvas

          private ICanvas canvas

    - #### canvasComponent

          private java.awt.Component canvasComponent

    - #### coords

          private float[] coords

    - #### DESELECT_ONLY

          private static int DESELECT_ONLY

    - #### DRAG_EXPANDED_MOTIF_MASK

          public static int DRAG_EXPANDED_MOTIF_MASK

    - #### DRAG_SPECIAL_MASK

          public static int DRAG_SPECIAL_MASK

    - #### drawHandles

          private final DrawHandle[] drawHandles

    - #### drawHints

          private java.util.Collection<DrawHint> drawHints

    - #### EDIT_CLICK_MASK

          public static int EDIT_CLICK_MASK

    - #### editBond

          private final java.awt.geom.Line2D.Float editBond

    - #### EMPTY_SELECTION

          private int[] EMPTY_SELECTION

    - #### focused

          private Nuc focused

    - #### handleBranchSlide

          private final DrawHandle handleBranchSlide

    - #### handleLoopResize

          private final DrawHandle handleLoopResize

    - #### handleRotate

          private final DrawHandle handleRotate

    - #### historyEvent

          public EventSource.OneArg<HistoryUpdateEvent> historyEvent

    - #### minBiasRange

          private static final double minBiasRange

      See Also:
        Constant Field Values

    - #### mouseHandler

          private RnaDrawController.MouseHandler mouseHandler

    - #### nucScreenShapes

          private RnaDrawController.ScreenNuc[] nucScreenShapes

    - #### nucShapes

          private java.awt.Shape[] nucShapes

    - #### prevBias

          private boolean prevBias

    - #### prevStart

          private java.awt.geom.Point2D prevStart

    - #### prevTheta

          double prevTheta

    - #### scene

          private RnaScene scene

    - #### sceneUpdated

          public EventSource.OneArg<SceneUpdateEvent> sceneUpdated

    - #### screenObjects

          private java.util.List<IScreenObject> screenObjects

    - #### SELECT_ONLY

          private static int SELECT_ONLY

    - #### selection

          private java.util.Set<Nuc> selection

    - #### SELECTION_ADD_MASK

          public static int SELECTION_ADD_MASK

    - #### selectionBand

          private final java.awt.Rectangle selectionBand

    - #### selType

          private RnaDrawController.SelectionType selType

    - #### settings

          private DrawSettings settings

    - #### stickyRotationAngles

          private static final double[] stickyRotationAngles

    - #### stickyRotationEpsilon

          private static final double stickyRotationEpsilon

      See Also:
        Constant Field Values

    - #### tmpNucShape

          java.awt.geom.Ellipse2D.Float tmpNucShape

    - #### useRecorder

          private boolean useRecorder

  - ### Constructor Detail

    - #### RnaDrawController

          public RnaDrawController()

  - ### Method Detail

    - #### addBond

          private void addBond(Nuc n1,
                               Nuc n2)

    - #### addHint

          public DrawHint addHint(java.awt.Shape shape)

      Specified by:
        `addHint` in interface `SceneController`

    - #### addHint

          public DrawHint addHint(java.lang.String text,
                                  double centerX,
                                  double centerY)

      Specified by:
        `addHint` in interface `SceneController`

    - #### addHistoryListener

          public boolean addHistoryListener(java.util.function.Consumer<HistoryUpdateEvent> listener)

      Specified by:
        `addHistoryListener` in interface `SceneController`

    - #### addSceneUpdateListener

          public boolean addSceneUpdateListener(java.util.function.Consumer<SceneUpdateEvent> listener)

      Specified by:
        `addSceneUpdateListener` in interface `SceneController`

    - #### addUndo

          public void addUndo(SceneUpdateInfo type)

      Specified by:
        `addUndo` in interface `SceneController`

    - #### allNucsFitCircle

          private boolean allNucsFitCircle(Nuc start,
                                           Nuc end,
                                           Ellipses.Circle c)

    - #### applyHistoryState

          private void applyHistoryState(HistoryState state)

    - #### breakSelectedBonds

          public void breakSelectedBonds()

    - #### calcBounds

          public java.awt.Rectangle calcBounds(java.awt.Graphics2D graphics,
                                               View2D view,
                                               boolean includeInteractive)

      Specified by:
        `calcBounds` in interface `SceneRenderer`

    - #### calcNormalToNuc

          public Vec2D calcNormalToNuc(Nuc cur)

      Specified by:
        `calcNormalToNuc` in interface `SceneController`

    - #### calcNucGroupCenter

          private java.awt.geom.Point2D.Float calcNucGroupCenter(java.util.Collection<Nuc> list)

    - #### canRedo

          public boolean canRedo()

      Specified by:
        `canRedo` in interface `SceneController`

    - #### canUndo

          public boolean canUndo()

      Specified by:
        `canUndo` in interface `SceneController`

    - #### clearSelection

          private void clearSelection()

    - #### clearUndo

          public void clearUndo()

      Specified by:
        `clearUndo` in interface `SceneController`

    - #### colorize

          public void colorize(SceneColorizer sc,
                               boolean allNucs)

    - #### controlsUpdated

          public void controlsUpdated()

      Specified by:
        `controlsUpdated` in interface `SceneController`

    - #### createDefaultScene

          private RnaScene createDefaultScene()

    - #### deleteSelectedBases

          public void deleteSelectedBases()

    - #### dragNucs

          private void dragNucs(Nuc dragNuc,
                                java.awt.Point startPos,
                                java.awt.Point prevPos,
                                java.awt.Point curPos,
                                SceneController.DragOpts options)

    - #### draw

          public java.util.List<IScreenObject> draw(java.awt.Graphics2D g,
                                                    View2D view,
                                                    DrawSettings settings,
                                                    boolean interactive)

    - #### drawBonds

          private void drawBonds(java.awt.Graphics2D g,
                                 View2D view,
                                 java.util.List<IScreenObject> objects)

    - #### drawCurvedBackbones

          private void drawCurvedBackbones(java.awt.Graphics2D g,
                                           boolean[] done,
                                           float minDist)

    - #### drawNucNumber

          private IScreenObject drawNucNumber(java.awt.Graphics2D g,
                                              View2D view,
                                              Nuc cur,
                                              int number)

    - #### drawNucOutline

          private void drawNucOutline(java.awt.Graphics2D g,
                                      Nuc n,
                                      java.awt.Color c)

    - #### drawSimpleBackbones

          private void drawSimpleBackbones(java.awt.Graphics2D g,
                                           boolean[] done,
                                           float minDist)

    - #### expandSelection

          public void expandSelection()

      If a nucleotide is selected, this expands to the helix or loop. If a helix or loop is selected, this expands to the containing branch.

    - #### findBaseHelix

          public Motif.Helix findBaseHelix(java.util.Collection<Nuc> list)

      Specified by:
        `findBaseHelix` in interface `SceneController`

    - #### flip

          public void flip(boolean vertical,
                           boolean selectionOnly)

    - #### getBehaviorMode

          public RnaDrawController.BehaviorMode getBehaviorMode()

    - #### getBondColor

          private java.awt.Color getBondColor(Bond b)

    - #### getCanvas

          public ICanvas getCanvas()

      Specified by:
        `getCanvas` in interface `SceneController`

    - #### getFocused

          public Nuc getFocused()

    - #### getMotif

          private INucGroup getMotif(Nuc nuc,
                                     RnaDrawController.SelectionType selectionType,
                                     boolean allowNull)

    - #### getNucShape

          private java.awt.Shape getNucShape(Nuc n)

    - #### getScene

          public RnaScene getScene()

    - #### getScreenObject

          private IScreenObject getScreenObject(Nuc n,
                                                View2D view,
                                                int zorder)

    - #### getSelected

          public Nuc[] getSelected()

    - #### getSelectionState

          private int[] getSelectionState()

    - #### getSettings

          public DrawSettings getSettings()

      Specified by:
        `getSettings` in interface `SceneController`
      Specified by:
        `getSettings` in interface `SceneRenderer`

    - #### handleSelectionChange

          private void handleSelectionChange()

    - #### historyUpdated

          public void historyUpdated()

      Specified by:
        `historyUpdated` in interface `SceneController`

    - #### hitTest

          private IScreenObject hitTest(java.lang.Iterable<IScreenObject> list,
                                        java.awt.geom.Point2D pt,
                                        boolean nucsOnly)

    - #### hitTest

          private java.util.List<IScreenObject> hitTest(java.lang.Iterable<IScreenObject> list,
                                                        java.awt.Rectangle rc,
                                                        boolean nucsOnly)

    - #### insertBases

          public void insertBases(java.lang.String sequence,
                                  Nuc ref,
                                  boolean insertAfter)

      Insert new bases before or after the specified nucleotide. If insertAt is null, the focused nucleotide will be used.

    - #### isFullMotifSelected

          private boolean isFullMotifSelected()

    - #### isUserActionInProgress

          public boolean isUserActionInProgress()

    - #### joinSelectionStrands

          public void joinSelectionStrands()

    - #### layoutUpdated

          public void layoutUpdated(SceneUpdateInfo details)

      Specified by:
        `layoutUpdated` in interface `SceneController`

    - #### layoutUpdated

          public void layoutUpdated(SceneUpdateInfo details,
                                    boolean addHistoryEntry)

      Specified by:
        `layoutUpdated` in interface `SceneController`

    - #### notifyUpdate

          public void notifyUpdate(SceneUpdateInfo details)

      Specified by:
        `notifyUpdate` in interface `SceneController`

    - #### notifyUpdate

          public void notifyUpdate(SceneUpdateInfo update,
                                   boolean addHistoryEntry)

      Specified by:
        `notifyUpdate` in interface `SceneController`

    - #### nucFitsCircle

          private boolean nucFitsCircle(int sceneIndex,
                                        Ellipses.Circle c)

    - #### onSceneUpdate

          protected void onSceneUpdate(SceneUpdateEvent eventInfo)

    - #### programSettingsChanged

          public void programSettingsChanged(Settings settings)

    - #### redo

          public void redo()

      Specified by:
        `redo` in interface `SceneController`

    - #### redraw

          private void redraw()

    - #### redrawSelection

          public void redrawSelection()

    - #### removeColors

          public void removeColors(boolean allNucs)

    - #### removeHistoryListener

          public boolean removeHistoryListener(java.util.function.Consumer<HistoryUpdateEvent> listener)

      Specified by:
        `removeHistoryListener` in interface `SceneController`

    - #### removeSceneUpdateListener

          public boolean removeSceneUpdateListener(java.util.function.Consumer<SceneUpdateEvent> listener)

      Specified by:
        `removeSceneUpdateListener` in interface `SceneController`

    - #### render

          public java.util.Collection<IScreenObject> render(java.awt.Graphics2D graphics,
                                                            View2D view,
                                                            boolean includeInteractive)

      Specified by:
        `render` in interface `SceneRenderer`

    - #### resetRnaCoords

          private void resetRnaCoords()

    - #### resetStructure

          private void resetStructure()

    - #### resumeRedraw

          public void resumeRedraw(boolean forceRedraw)

    - #### resumeUpdates

          public void resumeUpdates()

    - #### rotateNucs

          public void rotateNucs(java.util.Collection<Nuc> list,
                                 java.awt.geom.Point2D modelCenter,
                                 double theta)

      Specified by:
        `rotateNucs` in interface `SceneController`

    - #### rotateNucs

          public void rotateNucs(java.util.Collection<Nuc> list,
                                 java.awt.geom.Point2D modelCenter,
                                 java.awt.Point start,
                                 java.awt.Point end,
                                 SceneController.DragOpts options)

      Specified by:
        `rotateNucs` in interface `SceneController`

    - #### rotateNucs

          public void rotateNucs(java.util.Collection<Nuc> list,
                                 java.awt.geom.Point2D modelCenter,
                                 java.awt.Point start,
                                 java.awt.Point end,
                                 SceneController.DragOpts options,
                                 Motif.Helix baseHelix,
                                 boolean showArc)

      Specified by:
        `rotateNucs` in interface `SceneController`

    - #### selectAll

          public void selectAll()

    - #### selectionUpdated

          public void selectionUpdated()

      Specified by:
        `selectionUpdated` in interface `SceneController`

    - #### selectMotif

          private void selectMotif(Nuc nuc,
                                   boolean sel,
                                   RnaDrawController.SelectionType selectionType)

    - #### selectNucs

          private void selectNucs(java.lang.Iterable<Nuc> nucs,
                                  boolean sel)

    - #### selectSpecial

          public void selectSpecial(RnaDrawController.SelectionType type)

    - #### setBehaviorMode

          public void setBehaviorMode(RnaDrawController.BehaviorMode behaviorMode)

    - #### setCanvas

          public void setCanvas(ICanvas newCanvas)

    - #### setCanvasComponent

          private void setCanvasComponent(java.awt.Component canvasComponent)

    - #### setScene

          public void setScene(RnaScene scene)

    - #### setSelectedBondType

          public void setSelectedBondType(BondType selectedBondType)

    - #### setSelectionState

          private void setSelectionState(int[] sel)

    - #### setSelType

          public void setSelType(RnaDrawController.SelectionType sel)

    - #### setSettings

          public void setSettings(DrawSettings settings)

    - #### splitStrandsAtSelection

          public void splitStrandsAtSelection()

    - #### storeRnaCoords

          private void storeRnaCoords()

    - #### structureUpdated

          public void structureUpdated(SceneUpdateInfo details)

      Specified by:
        `structureUpdated` in interface `SceneController`

    - #### styleUpdated

          public void styleUpdated(SceneUpdateInfo details)

      Specified by:
        `styleUpdated` in interface `SceneController`

    - #### suspendRedraw

          public void suspendRedraw()

    - #### suspendUpdates

          public void suspendUpdates()

    - #### transformNucs

          protected void transformNucs(java.util.Collection<Nuc> list,
                                       java.awt.geom.AffineTransform tr)

    - #### translateScreenNucs

          public void translateScreenNucs(java.util.Collection<Nuc> list,
                                          java.awt.geom.Point2D screenDelta)

      Translates all selected nucleotides by the x and y coordinates of the delta point, which is assumed to be in screen coordinates.

    - #### translateScreenNucs

          public void translateScreenNucs(java.util.Collection<Nuc> list,
                                          java.awt.Point start,
                                          java.awt.Point end)

      Translates all selected nucleotides by the x and y coordinates of the delta point, which is assumed to be in screen coordinates.

    - #### undo

          public void undo()

      Specified by:
        `undo` in interface `SceneController`

    - #### updateSelection

          private Nuc updateSelection(boolean append,
                                      @NotNull
                                      Nuc nuc,
                                      int allowMode)

      Updates the set of selected Nucs based on the current selection and the user's intention. If the user has indicated they want to modify (aka append) the existing selection, then the target nuc's selection status is flipped (i.e. if already selected, it should be deselected and vice-versa) Otherwise, the target Nuc should be selected. If the target Nuc is to be DE-selected, but the allowMode is set to SELECT_ONLY, then the target Nuc (which should be deselected at some point in the future, but not immediately) will be returned by the function.
      Parameters:
        `append` - Whether to modify the selection (true) or clear the existing selection (false).
        `nuc` - The target Nuc.
        `allowMode` - Whether we are in SELECT_ONLY mode or DESELECT_ONLY.
      Returns:
        The target Nuc if it is to be deselected, but we are in SELECT_ONLY mode. Otherwise Null.

    - #### updateSelection

          private void updateSelection(boolean append,
                                       java.awt.Rectangle selRect)

    - #### viewUpdated

          public void viewUpdated()

      Specified by:
        `viewUpdated` in interface `SceneController`