# Class Draw

java.lang.Object
org.jmol.shape.Shape
org.jmol.shape.MeshCollection
org.jmol.shapespecial.Draw

public class Draw extends MeshCollection

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`Draw.EnumDrawType`

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`defaultFontId`
`int`
`defaultFontId0`

### Fields inherited from class MeshCollection

`bsDisplay, colix, color, connections, currentMesh, displayWithinDistance2, displayWithinPoints, explicitID, htObjects, isDisplayWithinNot, isFixed, jvxlData, linkedMesh, meshCount, meshes, modelIndex, nUnnamed, pickedMesh, pickedModel, pickedPt, pickedVertex, PREVIOUS_MESH_ID, previousMeshID, title`

### Fields inherited from class Shape

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

## Constructor Summary

Constructors
Constructor
Description
`Draw()`

## Method Summary

Modifier and Type
Method
Description
`void`
`allocMesh(String thisID, Mesh m)`
`Map<String,Object>`
`checkObjectClicked(int x, int y, int action, BS bsVisible, boolean drawPicking)`
`boolean`
`checkObjectDragged(int prevX, int prevY, int x, int y, int dragAction, BS bsVisible)`
`boolean`
`checkObjectHovered(int x, int y, BS bsVisible)`
`protected void`
`clean()`
`Object`
`getProperty(String property, int index)`
`boolean`
`getPropertyData(String property, Object[] data)`
`Object`
`getShapeDetail()`
`String`
`getShapeState()`
`void`
`initShape()`
`static boolean`
`is2DPoint(T3 pt)`
`static boolean`
`isPolygonDisplayable(Mesh mesh, int i)`
`static P3`
`randomPoint()`
`void`
`setModelVisibilityFlags(BS bsModels)`
`void`
`setProperty(String propertyName, Object value, BS bs)`
`protected String[]`
`setTitle(Object value)`

### Methods inherited from class MeshCollection

`checkExplicit, deleteMeshI, deleteMeshKey, getIndexFromName, getMesh, getMeshList, getPickedPoint, getPropDataMC, getPropMC, getValues, getVertices, merge, resetObjects, setMeshColor, setPropMC, setStatusPicked, setTokenProperty`

### Methods inherited from class Shape

`appendCmd, checkBoundsMinMax, coordinateInRange, encodeColor, findNearestAtomIndex, getColix, getColixA, getColixB, getColixI, getColorCommand, getColorCommandUnk, getFontCommand, getPropShape, getSize, getSizeG, getTranslucentLabel, initializeShape, initModelSet, replaceGroup, setAtomClickability, setModelSet, setProperties, setPropS, setShapeSizeRD, setSize, setSizeRD, wasClicked`

### Methods inherited from class Object

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

## Field Details

### defaultFontId0

public int defaultFontId0

### defaultFontId

public int defaultFontId

## Constructor Details

### Draw

public Draw()

## Method Details

### allocMesh

public void allocMesh(String thisID, Mesh m)

Overrides:
  `allocMesh` in class `MeshCollection`

### initShape

public void initShape()

Overrides:
  `initShape` in class `MeshCollection`

### setProperty

public void setProperty(String propertyName, Object value, BS bs)

Specified by:
  `setProperty` in class `Shape`

### setTitle

protected String[] setTitle(Object value)

Overrides:
  `setTitle` in class `MeshCollection`

### getPropertyData

public boolean getPropertyData(String property, Object[] data)

Overrides:
  `getPropertyData` in class `Shape`
Parameters:
  `property` -
  `data` -
Returns:
  true if serviced

### getProperty

public Object getProperty(String property, int index)

Overrides:
  `getProperty` in class `Shape`
Parameters:
  `property` -
  `index` -
Returns:
  true if serviced

### clean

protected void clean()

Overrides:
  `clean` in class `MeshCollection`

### setModelVisibilityFlags

public void setModelVisibilityFlags(BS bsModels)

Overrides:
  `setModelVisibilityFlags` in class `MeshCollection`
Parameters:
  `bsModels` -

### checkObjectClicked

public Map<String,Object> checkObjectClicked(int x, int y, int action, BS bsVisible, boolean drawPicking)

Overrides:
  `checkObjectClicked` in class `Shape`
Parameters:
  `x` -
  `y` -
  `action` -
  `bsVisible` -
  `drawPicking` - TODO
Returns:
  Hashtable containing information about pt clicked

### checkObjectHovered

public boolean checkObjectHovered(int x, int y, BS bsVisible)

Overrides:
  `checkObjectHovered` in class `Shape`
Parameters:
  `x` -
  `y` -
  `bsVisible` -
Returns:
  T/F

### checkObjectDragged

public boolean checkObjectDragged(int prevX, int prevY, int x, int y, int dragAction, BS bsVisible)

Overrides:
  `checkObjectDragged` in class `Shape`
Parameters:
  `prevX` -
  `prevY` -
  `x` -
  `y` -
  `dragAction` -
  `bsVisible` -
Returns:
  T/F

### isPolygonDisplayable

public static boolean isPolygonDisplayable(Mesh mesh, int i)

### is2DPoint

public static boolean is2DPoint(T3 pt)

### getShapeDetail

public Object getShapeDetail()

Overrides:
  `getShapeDetail` in class `Shape`

### getShapeState

public String getShapeState()

Specified by:
  `getShapeState` in class `Shape`

### randomPoint

public static P3 randomPoint()