# Class JSVDialog

java.lang.Object
jspecview.common.Coordinate
jspecview.common.Annotation
jspecview.dialog.JSVDialog

All Implemented Interfaces:
  `AnnotationData`

Direct Known Subclasses:
  `IntegrationDialog, MeasurementsDialog, OverlayLegendDialog, PeakListDialog, ViewsDialog`

public abstract class JSVDialog extends Annotation implements AnnotationData

## Nested Class Summary

### Nested classes/interfaces inherited from class Annotation

`Annotation.AType`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`addApplyBtn`
`protected Object`
`combo1`
`protected PlatformDialog`
`dialog`
`protected int`
`iRowColSelected`
/////////// protected methods
`protected int`
`iSelected`
`protected JSVPanel`
`jsvp`
`protected DialogManager`
`manager`
`protected Parameters`
`myParams`
`String`
`optionKey`
`Map<String,Object>`
`options`
`protected int`
`precision`
`protected Spectrum`
`spec`
`protected String`
`title`
`protected Object`
`txt1`
`protected Object`
`txt2`
`protected Object`
`txt3`
`protected Annotation.AType`
`type`
`protected JSViewer`
`vwr`
`protected MeasurementData`
`xyData`

### Fields inherited from class Annotation

`isPixels, text`

## Constructor Summary

Constructors
Constructor
Description
`JSVDialog()`

## Method Summary

Modifier and Type
Method
Description
`protected abstract void`
`addUniqueControls()`
`protected void`
`addUniqueControls(DialogManager dialogHelper)`
`protected void`
`apply(Object[] objects)`
`void`
`applyFromFields()`
`abstract boolean`
`callback(String id, String msg)`
`protected boolean`
`callbackAD(String id, String msg)`
`void`
`checkEnables()`
`void`
`dispose()`
`protected void`
`done()`
`protected void`
`eventApply()`
`protected void`
`eventFocus()`
`Annotation.AType`
`getAType()`
`MeasurementData`
`getData()`
`String`
`getGraphSetKey()`
`Parameters`
`getParameters()`
`abstract int[]`
`getPosXY()`
`Spectrum`
`getSpectrum()`
`boolean`
`getState()`
`boolean`
`isDialog()`
`boolean`
`isVisible()`
`protected void`
`layoutDialog()`
`protected void`
`loadData()`
`JSVDialog`
`reEnable()`
`void`
`repaint()`
`void`
`selectTableRow(int i)`
`void`
`setData(AnnotationData data)`
`void`
`setFields()`
`void`
`setFocus(boolean tf)`
`void`
`setGraphSetKey(String key)`
`JSVDialog`
`setParams(String title, JSViewer viewer, Spectrum spec)`
required initializer; from JSViewer
`void`
`setSpecShift(double dx)`
`void`
`setState(boolean b)`
`protected void`
`setThreshold(double y)`
`void`
`setVisible(boolean visible)`
`protected void`
`showMessage(String msg, String title, int msgType)`
`void`
`update(Coordinate clicked, double xRange, int yOffset)`

### Methods inherited from class Annotation

`getColoredAnnotation, setA, toString`

### Methods inherited from class Coordinate

`applyScale, copy, deltaX, equals, findXForPeakNearest, getMaxX, getMaxX, getMaxY, getMaxYUser, getMinX, getMinX, getMinY, getMinYUser, getNearestIndexForX, getNearestXWithYAbove, getXVal, getYVal, getYValueAt, isYInRange, normalise, parabolicInterpolation, parseDSV, removeScale, reverse, set, setXVal, setYVal, shiftX`

### Methods inherited from class Object

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

## Field Details

### optionKey

public String optionKey

### options

public Map<String,Object> options

### type

protected Annotation.AType type

### title

protected String title

### vwr

protected JSViewer vwr

### spec

protected Spectrum spec

### manager

protected DialogManager manager

### dialog

protected PlatformDialog dialog

### jsvp

protected JSVPanel jsvp

### txt1

protected Object txt1

### txt2

protected Object txt2

### txt3

protected Object txt3

### combo1

protected Object combo1

### xyData

protected MeasurementData xyData

### myParams

protected Parameters myParams

### precision

protected int precision

### addApplyBtn

protected boolean addApplyBtn

### iRowColSelected

protected int iRowColSelected
/////////// protected methods

### iSelected

protected int iSelected

## Constructor Details

### JSVDialog

public JSVDialog()

## Method Details

### getPosXY

public abstract int[] getPosXY()

### isDialog

public boolean isDialog()

Specified by:
  `isDialog` in interface `AnnotationData`

### addUniqueControls

protected abstract void addUniqueControls()

### callback

public abstract boolean callback(String id, String msg)

### setParams

public JSVDialog setParams(String title, JSViewer viewer, Spectrum spec)
required initializer; from JSViewer

Parameters:
  `title` -
  `viewer` -
  `spec` -
Returns:
  this

### layoutDialog

protected void layoutDialog()

### callbackAD

protected boolean callbackAD(String id, String msg)

Parameters:
  `id` -
  `msg` -
Returns:
  true if consumed

### addUniqueControls

protected void addUniqueControls(DialogManager dialogHelper)

Parameters:
  `dialogHelper` -

### getAType

public Annotation.AType getAType()

Specified by:
  `getAType` in interface `AnnotationData`

### getGraphSetKey

public String getGraphSetKey()

Specified by:
  `getGraphSetKey` in interface `AnnotationData`

### setGraphSetKey

public void setGraphSetKey(String key)

Specified by:
  `setGraphSetKey` in interface `AnnotationData`

### getSpectrum

public Spectrum getSpectrum()

Specified by:
  `getSpectrum` in interface `AnnotationData`

### getState

public boolean getState()

Specified by:
  `getState` in interface `AnnotationData`

### setState

public void setState(boolean b)

Specified by:
  `setState` in interface `AnnotationData`

### checkEnables

public void checkEnables()

### getParameters

public Parameters getParameters()

Specified by:
  `getParameters` in interface `AnnotationData`

### showMessage

protected void showMessage(String msg, String title, int msgType)

### setThreshold

protected void setThreshold(double y)

### applyFromFields

public void applyFromFields()

### reEnable

public JSVDialog reEnable()

### dispose

public void dispose()

### setVisible

public void setVisible(boolean visible)

### isVisible

public boolean isVisible()

Specified by:
  `isVisible` in interface `AnnotationData`

### selectTableRow

public void selectTableRow(int i)

### repaint

public void repaint()

### setFields

public void setFields()

### setFocus

public void setFocus(boolean tf)

### update

public void update(Coordinate clicked, double xRange, int yOffset)

### getData

public MeasurementData getData()

Specified by:
  `getData` in interface `AnnotationData`

### setData

public void setData(AnnotationData data)

### setSpecShift

public void setSpecShift(double dx)

Specified by:
  `setSpecShift` in interface `AnnotationData`

### apply

protected void apply(Object[] objects)

### done

protected void done()

### eventFocus

protected void eventFocus()

### eventApply

protected void eventApply()

### loadData

protected void loadData()