ui/src/main/java/ucar/nc2/ui/widget/BAMutil.java
public static void setActionPropertiesToggle( AbstractAction act, String icon_name, String action_name,
    boolean toggleValue, int mnemonic, int accel ) {
    setActionProperties( act, icon_name, action_name, true, mnemonic, accel);
    act.putValue( BAMutil.STATE, new Boolean(toggleValue));
  }
public static void setActionPropertiesToggle( AbstractAction act, String icon_name, String action_name,
    boolean toggleValue, int mnemonic, int accel ) {
    setActionProperties( act, icon_name, action_name, true, mnemonic, accel);
    act.putValue( BAMutil.STATE, new Boolean(toggleValue));
  }
Standard way to set Properties and state for "Toggle" Actions.  *
@param act  add properties to this action
@param icon_name  name of icon (or null).
@param action_name menu name / tooltip
@param toggleValue default value of toggle
@param mnemonic  menu item shortcut
@param accel menu item global keyboard accelerator