Class GuiUtils

java.lang.Object
org.harctoolbox.guicomponents.GuiUtils
All Implemented Interfaces:
Serializable

public class GuiUtils extends Object implements Serializable
See Also:
  • Constructor Details

    • GuiUtils

      public GuiUtils(Component frame)
  • Method Details

    • fatal

      public static void fatal(Exception ex, int errorcode)
    • fatal

      public static void fatal(Exception ex, int errorcode, GuiUtils.EmergencyFixer fixer)
    • browseStatic

      public static void browseStatic(URI uri) throws IOException
      Throws:
      IOException
    • setMaxGuiMessageLength

      public void setMaxGuiMessageLength(int aMaxGuiMessageLength)
      Parameters:
      aMaxGuiMessageLength - the maxGuiMessageLength to set
    • setProgramName

      public void setProgramName(String aProgramName)
      Parameters:
      aProgramName - the programName to set
    • setVerbose

      public void setVerbose(boolean newVerbose)
    • setOfferStackTrace

      public void setOfferStackTrace(boolean newOfferStackTrace)
    • setUsePopupsForErrors

      public void setUsePopupsForErrors(boolean newUsePopupsForErrors)
    • setUsePopupsForHelp

      public void setUsePopupsForHelp(boolean newUsePopupsForHelp)
    • info

      public void info(String message)
    • trace

      public void trace(String message)
    • message

      public void message(String message)
    • warning

      public void warning(String message)
    • error

      public void error(String message)
    • error

      public void error(Throwable ex)
    • error

      public void error(Throwable ex, String msg)
    • getInput

      public String getInput(String message, String title, String defaultAnswer)
    • getIntegerInput

      public Integer getIntegerInput(String message, int oldValue)
    • getLongInput

      public Long getLongInput(String message, long oldValue)
    • getDoubleInput

      public Double getDoubleInput(String message, double oldValue)
    • confirm

      public boolean confirm(String message)
    • confirm

      public boolean confirm(String message, int optionType)
    • browse

      public void browse(File file) throws MalformedURLException, URISyntaxException
      Throws:
      MalformedURLException
      URISyntaxException
    • browse

      public void browse(URI uri)
    • open

      public void open(File file) throws IOException
      For maximal portability and robustness, and since the support of edit is ... not omnipresent, use only this function.
      Parameters:
      file - file or directory to be opened/edited.
      Throws:
      IOException
    • browseOrEdit

      public void browseOrEdit(String urlOrFilename) throws IOException
      Throws:
      IOException
    • help

      public void help(String helpText)
    • checkUpToDate

      public boolean checkUpToDate(String currentVersionUrl, String versionString)