private void recordCheckboxOption(Checkbox cb) { String label = (String) labels.get((Object) cb); if (label != null) { if (cb.getState()) // checked Recorder.recordOption(label); else if (Recorder.getCommandOptions() == null) Recorder.recordOption(" "); } }
/** Returns the state of the next checkbox. */ public boolean getNextBoolean() { if (checkbox == null) return false; Checkbox cb = (Checkbox) (checkbox.elementAt(cbIndex)); if (recorderOn) recordCheckboxOption(cb); boolean state = cb.getState(); if (macro) { String label = (String) labels.get((Object) cb); String key = Macro.trimKey(label); state = isMatch(macroOptions, key + " "); } cbIndex++; return state; }
/** Returns 'true' if this dialog has a "Preview" checkbox and it is enabled. */ public boolean isPreviewActive() { return previewCheckbox != null && previewCheckbox.getState(); }