Sticks
Date: 2019-10-22

org.jmol.shape

## Class Sticks

- java.lang.Object
- - org.jmol.shape.Shape
  - - org.jmol.shape.Sticks

-     public class Sticks
      extends Shape

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `javajs.util.BS` | `bsOrderSet`
    `private int[]` | `closestAtom`
    `private static int` | `MAX_BOND_CLICK_DISTANCE_SQUARED`
    `private int` | `myMask`
    `private javajs.util.P3i` | `ptXY`
    `boolean` | `reportAll`
    `private javajs.util.BS` | `selectedBonds`
    `private static int` | `XY_THREASHOLD`

    - ### Fields inherited from class org.jmol.shape.Shape

      `bsColixSet, bsSizeSet, isBioShape, ms, myType, RADIUS_MAX, shapeID, translucentAllowed, translucentLevel, vf, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Sticks()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,java.lang.Object>` | `checkObjectClicked(int x, int y, int modifiers, javajs.util.BS bsVisible, boolean drawPicking)`
    `boolean` | `checkObjectHovered(int x, int y, javajs.util.BS bsVisible)`
    `private Bond` | `findPickedBond(int x, int y, javajs.util.BS bsVisible, javajs.util.P3 pt, int[] closestAtom)`
    `java.lang.Object` | `getProperty(java.lang.String property, int index)`
    `java.lang.String` | `getShapeState()`
    `void` | `initShape()`
    `void` | `setAtomClickability()`
    `void` | `setProperty(java.lang.String propertyName, java.lang.Object value, javajs.util.BS bs)`
    `protected void` | `setSize(int size, javajs.util.BS bsSelected)` sets the size of a bond, or sets the selectedBonds set

    - ### Methods inherited from class org.jmol.shape.Shape

      `appendCmd, checkBoundsMinMax, checkObjectDragged, coordinateInRange, encodeColor, findNearestAtomIndex, getColix, getColixA, getColixB, getColixI, getColorCommand, getColorCommandUnk, getFontCommand, getIndexFromName, getPropertyData, getPropShape, getShapeDetail, getSize, getSizeG, getTranslucentLabel, initializeShape, initModelSet, replaceGroup, setModelSet, setModelVisibilityFlags, setPropS, setShapeSizeRD, setSizeRD, wasClicked`

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

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

- - ### Field Detail

    - #### myMask

          private int myMask

    - #### reportAll

          public boolean reportAll

    - #### bsOrderSet

          public javajs.util.BS bsOrderSet

    - #### selectedBonds

          private javajs.util.BS selectedBonds

    - #### closestAtom

          private int[] closestAtom

    - #### MAX_BOND_CLICK_DISTANCE_SQUARED

          private static final int MAX_BOND_CLICK_DISTANCE_SQUARED

      See Also:
        Constant Field Values

    - #### ptXY

          private final javajs.util.P3i ptXY

    - #### XY_THREASHOLD

          private static final int XY_THREASHOLD

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Sticks

          public Sticks()

  - ### Method Detail

    - #### initShape

          public void initShape()

      Specified by:
        `initShape` in class `Shape`

    - #### setSize

          protected void setSize(int size,
                                 javajs.util.BS bsSelected)

      sets the size of a bond, or sets the selectedBonds set
      Overrides:
        `setSize` in class `Shape`
      Parameters:
        `size` -
        `bsSelected` -

    - #### setProperty

          public void setProperty(java.lang.String propertyName,
                                  java.lang.Object value,
                                  javajs.util.BS bs)

      Specified by:
        `setProperty` in class `Shape`

    - #### getProperty

          public java.lang.Object getProperty(java.lang.String property,
                                              int index)

      Overrides:
        `getProperty` in class `Shape`
      Returns:
        true if serviced

    - #### setAtomClickability

          public void setAtomClickability()

      Overrides:
        `setAtomClickability` in class `Shape`

    - #### getShapeState

          public java.lang.String getShapeState()

      Specified by:
        `getShapeState` in class `Shape`

    - #### checkObjectHovered

          public boolean checkObjectHovered(int x,
                                            int y,
                                            javajs.util.BS bsVisible)

      Overrides:
        `checkObjectHovered` in class `Shape`
      Returns:
        T/F

    - #### checkObjectClicked

          public java.util.Map<java.lang.String,java.lang.Object> checkObjectClicked(int x,
                                                                                     int y,
                                                                                     int modifiers,
                                                                                     javajs.util.BS bsVisible,
                                                                                     boolean drawPicking)

      Overrides:
        `checkObjectClicked` in class `Shape`
        `drawPicking` - TODO
      Returns:
        Hashtable containing information about pt clicked

    - #### findPickedBond

          private Bond findPickedBond(int x,
                                      int y,
                                      javajs.util.BS bsVisible,
                                      javajs.util.P3 pt,
                                      int[] closestAtom)

      Parameters:
        `x` -
        `y` -
        `bsVisible` - UNUSED?
        `pt` -
      Returns:
        picked bond or null