# Class Labels

java.lang.Object
org.jmol.shape.Shape
org.jmol.shape.AtomShape
org.jmol.shape.Labels

public class Labels extends AtomShape

## Field Summary

Fields
Modifier and Type
Field
Description
`short[]`
`bgcolixes`
`BS`
`bsBgColixSet`
`BS`
`bsFontSet`
`int`
`defaultAlignment`
`short`
`defaultBgcolix`
`short`
`defaultColix`
`int`
`defaultFontId`
`int`
`defaultOffset`
`byte`
`defaultPaletteID`
`int`
`defaultPointer`
`int`
`defaultZPos`
`int[]`
`fids`
`String[]`
`formats`
`int[]`
`offsets`
`String[]`
`strings`
`int`
`zeroFontId`

### Fields inherited from class AtomShape

`bsSizeDefault, colixes, isActive, isSet, mad, mads, monomerCount, paletteIDs`

### Fields inherited from class Shape

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

## Constructor Summary

Constructors
Constructor
Description
`Labels()`

## Method Summary

Modifier and Type
Method
Description
`Map<String,Object>`
`checkObjectClicked(int x, int y, int modifiers, BS bsVisible, boolean drawPicking)`
`boolean`
`checkObjectDragged(int prevX, int prevY, int x, int y, int dragAction, BS bsVisible)`
`float[]`
`getBox(int i)`
`short`
`getColix2(int i, Atom atom, boolean isBg)`
`Text`
`getLabel(int i)`
`Object`
`getProperty(String property, int index)`
`void`
`initShape()`
`void`
`putBox(int i, float[] boxXY)`
`void`
`putLabel(int i, Text text)`
`void`
`setAtomClickability()`
`void`
`setProperty(String propertyName, Object value, BS bs)`

### Methods inherited from class AtomShape

`checkColixLength, getShapeState, getSize, initModelSet, setColixAndPalette, setPropAS, setSize, setSize2, setSizeRD, setSizeRD2`

### Methods inherited from class Shape

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

### Methods inherited from class Object

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

## Field Details

### strings

public String[] strings

### formats

public String[] formats

### bgcolixes

public short[] bgcolixes

### fids

public int[] fids

### offsets

public int[] offsets

### bsFontSet

public BS bsFontSet

### bsBgColixSet

public BS bsBgColixSet

### defaultOffset

public int defaultOffset

### defaultAlignment

public int defaultAlignment

### defaultZPos

public int defaultZPos

### defaultFontId

public int defaultFontId

### defaultColix

public short defaultColix

### defaultBgcolix

public short defaultBgcolix

### defaultPaletteID

public byte defaultPaletteID

### defaultPointer

public int defaultPointer

### zeroFontId

public int zeroFontId

## Constructor Details

### Labels

public Labels()

## Method Details

### initShape

public void initShape()

Overrides:
  `initShape` in class `AtomShape`

### setProperty

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

Specified by:
  `setProperty` in class `Shape`

### getProperty

public Object getProperty(String property, int index)

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

### putLabel

public void putLabel(int i, Text text)

### getLabel

public Text getLabel(int i)

### putBox

public void putBox(int i, float[] boxXY)

### getBox

public float[] getBox(int i)

### setAtomClickability

public void setAtomClickability()

Overrides:
  `setAtomClickability` in class `AtomShape`

### checkObjectClicked

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

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

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

### getColix2

public short getColix2(int i, Atom atom, boolean isBg)