Class EnhancedGenericDialog

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
ij.gui.GenericDialog
fiji.util.gui.GenericDialogPlus
sc.fiji.snt.gui.EnhancedGenericDialog
All Implemented Interfaces:
ActionListener, AdjustmentListener, FocusListener, ItemListener, KeyListener, TextListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

@Deprecated public class EnhancedGenericDialog extends fiji.util.gui.GenericDialogPlus
Deprecated.
Enhances GenericDialog with a few additional features, including scrollbars as soon as the Dialog is too large to be displayed, ability to use the "help" button to display a drop-down menu, and labels featuring clickable hyperlinks. Customizations are ignored if running headless. This class is only used by IJ1 plugins and is thus deprecated.
See Also:
  • Constructor Details

    • EnhancedGenericDialog

      public EnhancedGenericDialog(String title)
      Deprecated.
      GenericDialog constructor
      Parameters:
      title - Dialog's title
    • EnhancedGenericDialog

      public EnhancedGenericDialog(String title, Frame parent)
      Deprecated.
      GenericDialog constructor
      Parameters:
      title - Dialog's title
      parent - Parent frame
  • Method Details

    • addHyperlinkMessage

      public void addHyperlinkMessage(String text, Font font, Color color, String url)
      Deprecated.
      Appends a message to the specified dialog consisting of one or more lines of text, and assigns a functional URL to it.
      Parameters:
      text - The contents of the clickable label
      font - the label font. If null, the GenericDialog's default font is used
      color - the label color. If null, the GenericDialog's default foreground color is used
      url - The URL to be opened by the default browser of the OS
    • addCitationMessage

      public void addCitationMessage()
      Deprecated.
      Allows users to visit the manuscript from a dialog prompt
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Deprecated.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class ij.gui.GenericDialog
    • assignListenerToHelpButton

      public void assignListenerToHelpButton(String buttonLabel, ActionListener listener)
      Deprecated.
      Adds a "Help" button and attaches the specified listener to it. In an IJ1 GenericDialog, event listeners triggered by the help button are only notified when the "Cancel" button is hidden. This method overcomes that limitation. NB: Actions triggered by menu items will not be macro recordable unless they trigger e.g., IJ.doCommand() calls
      Parameters:
      buttonLabel - the label of the customized "Help" button
      listener - the ActionListener monitoring action events
    • assignPopupToHelpButton

      public void assignPopupToHelpButton(JPopupMenu popupmenu)
      Deprecated.
      Attaches the specified JPopupMenu to the GenericDialog "Help" button renamed "More »". NB: Actions triggered by menu items will not be macro recordable unless they trigger e.g., IJ.doCommand() calls.
      Parameters:
      popupmenu - the JPopupMenu to be attached to the "More »" button.
      See Also:
    • assignPopupToHelpButton

      public void assignPopupToHelpButton(String buttonLabel, JPopupMenu popupmenu)
      Deprecated.
      Adds a "Help" button and attaches the specified JPopupMenu to it. NB: Actions triggered by menu items will not be macro recordable unless they trigger e.g., IJ.doCommand() calls.
      Parameters:
      buttonLabel - the label of the "Help" button.
      popupmenu - the JPopupMenu to be attached to the "Help" button.
    • showScrollableDialog

      public void showScrollableDialog()
      Deprecated.
      Adds AWT scroll bars to the dialog before displaying it, when not running headless. Scroll bars are only added if the largest dimension of the Dialog reaches ~90% of the primary display as reported by IJ.getScreenSize(). Dialog remains fully recordable.
    • disposeWithouRecording

      public void disposeWithouRecording()
      Deprecated.
      Closes the dialog without Recording the command.
    • addClickableURLtoLabel

      protected static void addClickableURLtoLabel(Component label, String url, Color color)
      Deprecated.
    • improveRecording

      public static final void improveRecording()
      Deprecated.
      Customizes macro recordings
    • getDisabledComponentColor

      public static Color getDisabledComponentColor()
      Deprecated.
      Returns the foreground color of disabled components.
      Returns:
      The UIManager foreground color of a disabled component.
    • isHeadless

      public static boolean isHeadless()
      Deprecated.
      Returns:
      true if running on a headless environment
    • citationURL

      protected static final String citationURL()
      Deprecated.
    • citationMsg

      protected static final String citationMsg()
      Deprecated.
    • infoColor

      public static final Color infoColor()
      Deprecated.
    • warningColor

      public static final Color warningColor()
      Deprecated.