List of usage examples for java.awt Choice setEnabled
public void setEnabled(boolean b)
From source file:ipnat.skel.Strahler.java
@Override public boolean dialogItemChanged(final GenericDialog gd, final java.awt.AWTEvent e) { protectRoot = gd.getNextBoolean();/*from w ww.ja v a 2s . c o m*/ erodeIsolatedPixels = gd.getNextBoolean(); pruneChoice = gd.getNextChoiceIndex(); grayscaleImpChoice = gd.getNextChoiceIndex(); outIS = gd.getNextBoolean(); verbose = gd.getNextBoolean(); tabular = gd.getNextBoolean(); // Enable/Disable key components of GenericDialog if (!IJ.macroRunning()) { final Choice cImgChoice = (Choice) gd.getChoices().elementAt(1); final Vector<?> checkboxes = gd.getCheckboxes(); final Checkbox roiOption = (Checkbox) checkboxes.elementAt(0); final Checkbox stackOption = (Checkbox) checkboxes.elementAt(2); cImgChoice.setEnabled(pruneChoice == AnalyzeSkeleton_.LOWEST_INTENSITY_VOXEL || pruneChoice == AnalyzeSkeleton_.LOWEST_INTENSITY_BRANCH); roiOption.setEnabled(validRootRoi); stackOption.setEnabled(!tabular); } return !gd.wasCanceled(); }