public class HeadlessGenericDialog extends Object
GenericDialog
in headless mode. This class is inserted as the
superclass to GenericDialog
, cutting off its AWT inheritance.
Then the methods of this class are given precedence, effectively
reverse-overriding its subclass.
The guidelines for whether or not an GenericDialog
method
should be overridden by this class or not are:
LegacyHeadless
, it does
not need to be overridden.All other public methods should be overridden.
Modifier and Type | Field and Description |
---|---|
protected List<Boolean> |
checkboxes |
protected int |
checkboxIndex |
protected int |
choiceIndex |
protected List<Integer> |
choiceIndices |
protected List<String> |
choices |
protected List<File> |
directories |
protected String |
errorMessage |
protected List<File> |
files |
protected boolean |
invalidNumber |
protected DialogListener |
listener |
protected int |
numberfieldIndex |
protected List<Double> |
numbers |
protected int |
radioButtonIndex |
protected List<String> |
radioButtons |
protected int |
stringfieldIndex |
protected List<String> |
strings |
protected String |
textArea1 |
protected String |
textArea2 |
protected int |
textAreaIndex |
Constructor and Description |
---|
HeadlessGenericDialog() |
Modifier and Type | Method and Description |
---|---|
void |
accessTextFields() |
void |
addCheckbox(String label,
boolean defaultValue) |
void |
addCheckboxGroup(int rows,
int columns,
String[] labels,
boolean[] defaultValues) |
void |
addCheckboxGroup(int rows,
int columns,
String[] labels,
boolean[] defaultValues,
String[] headings) |
void |
addChoice(String label,
String[] items,
String defaultItem) |
void |
addDialogListener(DialogListener dl) |
void |
addDirectoryField(String label,
String defaultPath) |
void |
addDirectoryField(String label,
String defaultPath,
int columns) |
void |
addFileField(String label,
String defaultPath) |
void |
addFileField(String label,
String defaultPath,
int columns) |
void |
addHelp(String url) |
void |
addImage(ij.ImagePlus image) |
void |
addImageChoice(String label,
String defaultImage) |
void |
addMessage(String text) |
void |
addMessage(String text,
Font font) |
void |
addMessage(String text,
Font font,
Color color) |
void |
addNumericField(String label,
double defaultValue) |
void |
addNumericField(String label,
double defaultValue,
int digits) |
void |
addNumericField(String label,
double defaultValue,
int digits,
int columns,
String units) |
void |
addPanel(Panel panel) |
void |
addPanel(Panel panel,
int contraints,
Insets insets) |
void |
addPreviewCheckbox(ij.plugin.filter.PlugInFilterRunner pfr) |
void |
addPreviewCheckbox(ij.plugin.filter.PlugInFilterRunner pfr,
String label) |
void |
addRadioButtonGroup(String label,
String[] items,
int rows,
int columns,
String defaultItem)
Adds a radio button group.
|
void |
addSlider(String label,
double minValue,
double maxValue,
double defaultValue) |
void |
addSlider(String label,
double minValue,
double maxValue,
double defaultValue,
double stepSize) |
void |
addStringField(String label,
String defaultText) |
void |
addStringField(String label,
String defaultText,
int columns) |
void |
addTextAreas(String text1,
String text2,
int rows,
int columns) |
void |
centerDialog(boolean b) |
void |
dispose() |
void |
enableYesNoCancel() |
void |
enableYesNoCancel(String yesLabel,
String noLabel) |
void |
finalizeRecording() |
void |
focusGained(FocusEvent e) |
void |
focusLost(FocusEvent e) |
Button[] |
getButtons() |
Vector<?> |
getCheckboxes() |
Vector<?> |
getChoices() |
String |
getErrorMessage() |
Insets |
getInsets() |
Component |
getMessage() |
boolean |
getNextBoolean() |
String |
getNextChoice() |
int |
getNextChoiceIndex() |
ij.ImagePlus |
getNextImage() |
double |
getNextNumber() |
String |
getNextRadioButton()
Returns the selected item in the next radio button group.
|
String |
getNextString()
Returns the contents of the next text field.
|
String |
getNextText() |
Vector<?> |
getNumericFields() |
Checkbox |
getPreviewCheckbox() |
Vector<String> |
getRadioButtonGroups() |
Vector<?> |
getSliders() |
Vector<?> |
getStringFields() |
TextArea |
getTextArea1() |
TextArea |
getTextArea2() |
void |
hideCancelButton() |
boolean |
invalidNumber() |
boolean |
isPreviewActive() |
void |
previewRunning(boolean isRunning) |
void |
setDefaultString(int index,
String str) |
void |
setEchoChar(char echoChar) |
void |
setHelpLabel(String label) |
void |
setInsets(int top,
int left,
int bottom) |
void |
setLocation(int x,
int y) |
void |
setOKLabel(String label) |
void |
setSmartRecording(boolean smartRecording) |
protected void |
setup() |
void |
show() |
void |
showDialog() |
void |
showHelp() |
boolean |
wasCanceled() |
boolean |
wasOKed() |
protected String textArea1
protected String textArea2
protected int numberfieldIndex
protected int stringfieldIndex
protected int checkboxIndex
protected int choiceIndex
protected int textAreaIndex
protected int radioButtonIndex
protected boolean invalidNumber
protected String errorMessage
protected DialogListener listener
public void addCheckbox(String label, boolean defaultValue)
public void addCheckboxGroup(int rows, int columns, String[] labels, boolean[] defaultValues)
public void addCheckboxGroup(int rows, int columns, String[] labels, boolean[] defaultValues, String[] headings)
public void addNumericField(String label, double defaultValue)
public void addNumericField(String label, double defaultValue, int digits)
public void addNumericField(String label, double defaultValue, int digits, int columns, String units)
public void addSlider(String label, double minValue, double maxValue, double defaultValue)
public void addSlider(String label, double minValue, double maxValue, double defaultValue, double stepSize)
public boolean getNextBoolean()
public String getNextChoice()
public int getNextChoiceIndex()
public double getNextNumber()
public String getNextString()
public String getNextText()
public void addRadioButtonGroup(String label, String[] items, int rows, int columns, String defaultItem)
public String getNextRadioButton()
public boolean invalidNumber()
public void showDialog()
public boolean wasCanceled()
public boolean wasOKed()
public void dispose()
public void addDialogListener(DialogListener dl)
public void addHelp(String url)
public void addImage(ij.ImagePlus image)
public void addMessage(String text)
public void addPanel(Panel panel)
public void addPreviewCheckbox(ij.plugin.filter.PlugInFilterRunner pfr)
public void addPreviewCheckbox(ij.plugin.filter.PlugInFilterRunner pfr, String label)
public void centerDialog(boolean b)
public void setSmartRecording(boolean smartRecording)
public void enableYesNoCancel()
public void finalizeRecording()
public void focusGained(FocusEvent e)
public void focusLost(FocusEvent e)
public ij.ImagePlus getNextImage()
public Button[] getButtons()
public Vector<?> getCheckboxes()
public Vector<?> getChoices()
public String getErrorMessage()
public Insets getInsets()
public Component getMessage()
public Vector<?> getNumericFields()
public Checkbox getPreviewCheckbox()
public Vector<?> getSliders()
public Vector<?> getStringFields()
public TextArea getTextArea1()
public TextArea getTextArea2()
public void hideCancelButton()
public void previewRunning(boolean isRunning)
public void setEchoChar(char echoChar)
public void setHelpLabel(String label)
public void setInsets(int top, int left, int bottom)
public void setOKLabel(String label)
protected void setup()
public void accessTextFields()
public void show()
public void showHelp()
public void setLocation(int x, int y)
public void setDefaultString(int index, String str)
public boolean isPreviewActive()
Copyright © 2014–2022 ImageJ. All rights reserved.