本文整理汇总了Java中ij.plugin.frame.Recorder.record方法的典型用法代码示例。如果您正苦于以下问题:Java Recorder.record方法的具体用法?Java Recorder.record怎么用?Java Recorder.record使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.plugin.frame.Recorder
的用法示例。
在下文中一共展示了Recorder.record方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mouseClicked
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public void mouseClicked(MouseEvent e)
{
if (e.getClickCount() > 1 && e.getSource() instanceof TextField) // Double-click
{
TextField tf = (TextField) e.getSource();
String path = tf.getText();
boolean recording = Recorder.record;
Recorder.record = false;
if (tf == textParamFile)
{
path = Utils.getFilename("Choose_a_parameter_file", path);
}
else
{
path = Utils.getDirectory("Choose_a_directory", path);
}
Recorder.record = recording;
if (path != null)
tf.setText(path);
}
}
示例2: run
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
@Override
public synchronized void run(final String arg) {
Utils.shiftClickWarning();
if (prompt != null && prompt.isVisible()) {
prompt.toFront();
return;
}
if (Recorder.record) {
Recorder.recordString("// Most features of " + CMD_LABEL
+ " are not recordable. Use the " + ((Recorder.scriptMode())
? "ij.gui.Plot API (http://javadoc.imagej.net)" : "IJ built-in macro functions")
+ " instead\n");
}
rt = Utils.getTable(null, false, rt == null, null);
if (rt != null)
showDialog();
}
示例3: actionPerformed
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
try {
if("OK".equals(e.getActionCommand())) {
params.readDialogOptions();
Thresholder.setActiveFilter(getActiveFilterUIIndex());
getActiveFilterUI().readParameters();
getActiveDetectorUI().readParameters();
getActiveEstimatorUI().readParameters();
getActiveDefocusFunction().readParameters();
params.savePrefs();
if(Recorder.record) {
getActiveFilterUI().recordOptions();
getActiveDetectorUI().recordOptions();
getActiveEstimatorUI().recordOptions();
getActiveDefocusFunction().recordOptions();
params.recordMacroOptions();
}
result = JOptionPane.OK_OPTION;
dispose();
} else if("Cancel".equals(e.getActionCommand())) {
dispose();
} else if("Defaults".equals(e.getActionCommand())) {
params.resetToDefaults(true);
AnalysisOptionsDialog.resetModuleUIs(filters, detectors, estimators);
}
} catch(Exception ex) {
IJ.handleException(ex);
}
}
示例4: recordMacro
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public void recordMacro() {
if(Recorder.record) {
String oldCommand = Recorder.getCommand();
Recorder.setCommand("Show results table");
Recorder.recordOption("action", getMacroName());
params.recordMacroOptions();
Recorder.saveCommand();
Recorder.setCommand(oldCommand);
}
}
示例5: DefaultOperation
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public DefaultOperation() {
this.name = getName();
//dummy record the param options
boolean oldRecording = Recorder.record;
Recorder.record = true;
params.recordMacroOptions();
options = Recorder.getCommandOptions();
if(!oldRecording) Recorder.saveCommand(); // remove from macro recorder if not recording!
Recorder.record = oldRecording;
}
示例6: recordReset
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordReset() {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, RESET);
Recorder.saveCommand();
}
}
示例7: recordUndoOrRedo
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordUndoOrRedo() {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, UNDO_REDO);
Recorder.saveCommand();
}
}
示例8: recordChangeColumnUnits
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordChangeColumnUnits(String column, MoleculeDescriptor.Units targetUnits) {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, CHANGE_COLUMN_UNITS);
Recorder.recordOption(COLUMN_KEY, column);
Recorder.recordOption(TARGET_UNITS_KEY, targetUnits.toString());
Recorder.saveCommand();
}
}
示例9: recordChangeAllUnits
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordChangeAllUnits(boolean analog) {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, CHANGE_ALL_UNITS);
Recorder.recordOption(TARGET_UNITS_KEY, analog ? ANALOG : DIGITAL);
Recorder.saveCommand();
}
}
示例10: dialogItemChanged
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
/** Disables dialog components that are irrelevant to GUI-based analysis. */
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e)
{
if ( this.imRef.getRoi() == null && null != gd
&& null != gd.getCheckboxes() )
{
Checkbox roiOption = (Checkbox)gd.getCheckboxes().elementAt(1);
roiOption.setEnabled(false);
if (Recorder.record) roiOption.setState(false);
}
return true;
}
示例11: record
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void record(String command, final String... args) {
command = "call(\"ij3d.ImageJ3DViewer." + command;
for (int i = 0; i < args.length; i++)
command += "\", \"" + args[i];
command += "\");\n";
if (Recorder.record) Recorder.recordString(command);
}
示例12: load
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
private void load(String path)
{
inputFilename = path;
// Record this as a single load of the results manager.
// This should support any dialogs that are presented in loadInputResults(...)
// to get the calibration.
if (Recorder.record)
{
Recorder.setCommand("Results Manager");
Recorder.recordOption("input", INPUT_FILE);
Recorder.recordOption("input_file", path);
Recorder.recordOption("image",
SettingsManager.getResultsImageTypeNames()[ResultsImageType.DRAW_NONE.getNumber()]);
Recorder.recordOption("results_file", "[]");
Recorder.recordOption("save_to_memory");
}
MemoryPeakResults results = loadInputResults(INPUT_FILE, true, null, null);
if (results == null || results.size() == 0)
{
IJ.error(TITLE, "No results could be loaded from " + path);
}
else
{
if (Recorder.record)
Recorder.saveCommand();
MemoryPeakResults.addResults(results);
}
}
示例13: collectOptions
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public boolean collectOptions(Boolean value)
{
// Collect the options for the events
OpticsEventSettings old = inputSettings.getOpticsEventSettings();
ExtendedGenericDialog egd = new ExtendedGenericDialog(TITLE + " Preview Settings");
boolean record = Recorder.record;
Recorder.record = false;
egd.addMessage("Configure the interactive preview");
egd.addCheckbox("Show_selected_clusters_table", old.getShowSelectionTable());
egd.addCheckbox("Table_create_selection", old.getTableCreateSelection());
egd.addCheckbox("Table_show_selection", old.getTableShowSelection());
egd.addCheckbox("Image_create_selection", old.getImageCreateSelection());
egd.addCheckbox("Image_show_selection", old.getImageShowSelection());
egd.addCheckbox("Plot_create_selection", old.getPlotCreateSelection());
egd.addCheckbox("Plot_show_selection", old.getPlotShowSelection());
egd.showDialog(false, gd);
if (egd.wasCanceled())
{
Recorder.record = record;
return false;
}
OpticsEventSettings.Builder b = inputSettings.getOpticsEventSettingsBuilder();
b.setShowSelectionTable(egd.getNextBoolean());
b.setTableCreateSelection(egd.getNextBoolean());
b.setTableShowSelection(egd.getNextBoolean());
b.setImageCreateSelection(egd.getNextBoolean());
b.setImageShowSelection(egd.getNextBoolean());
b.setPlotCreateSelection(egd.getNextBoolean());
b.setPlotShowSelection(egd.getNextBoolean());
Recorder.record = record;
return !old.equals(b.build());
}
示例14: record
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
/**
* Macro-record a specific command. The command names match the static
* methods that reproduce that part of the code.
*
* @param command name of the command including package info
* @param args set of arguments for the command
*/
public static void record(String command, String... args)
{
command = "call(\"inra.ijpb.plugins.MorphologicalSegmentation." + command;
for(int i = 0; i < args.length; i++)
command += "\", \"" + args[i];
command += "\");\n";
if(Recorder.record)
Recorder.recordString(command);
}
示例15: record
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
/**
* Macro-record a specific command. The command names match the static
* methods that reproduce that part of the code.
*
* @param command name of the command including package info
* @param args set of arguments for the command
*/
public static void record(String command, String... args)
{
command = "call(\"inra.ijpb.plugins.InteractiveMarkerControlledWatershed." + command;
for(int i = 0; i < args.length; i++)
command += "\", \"" + args[i];
command += "\");\n";
if(Recorder.record)
Recorder.recordString(command);
}