Package warnings

Class RepeatWarning

java.lang.Object
warnings.RepeatWarning

public class RepeatWarning extends Object
Used when something might repeat a lot. Will dump messages to the terminal once or twice, but otherwise will just use the title bar warning system.
Author:
dg50
  • Constructor Details

    • RepeatWarning

      public RepeatWarning(String warningSource, int maxPrints, int maxStackTraces)
      Constructor
      Parameters:
      warningSource - text for warning source
      maxPrints - max number of times message will be printed to the terminal
      maxStackTraces - max number of stack trace dumps when the warning is an exception
    • RepeatWarning

      public RepeatWarning(String warningSource)
      Parameters:
      warningSource - text for warning source
  • Method Details

    • setToolTip

      public void setToolTip(String tip)
      Set tool tip text for the warning
      Parameters:
      tip - tip text
    • showWarning

      public void showWarning(String warningMsg, int warningLevel)
      Show a warning text.
      Parameters:
      warningMsg - message text
      warningLevel - warning level, 0, 1 or 2
    • showWarning

      public void showWarning(Exception e, int warningLevel)
      show a warning based on an exception
      Parameters:
      e - Exception.
      warningLevel - warning level, 0, 1 or 2
    • clearWarning

      public void clearWarning()
      Clear warning from the displayed list.
    • getMaxPrints

      public int getMaxPrints()
      Returns:
      the maxPrints
    • setMaxPrints

      public void setMaxPrints(int maxPrints)
      Parameters:
      maxPrints - the maxPrints to set
    • getMaxStackTraces

      public int getMaxStackTraces()
      Returns:
      the maxStackTraces
    • setMaxStackTraces

      public void setMaxStackTraces(int maxStackTraces)
      Parameters:
      maxStackTraces - the maxStackTraces to set
    • getnPrints

      public int getnPrints()
      Returns:
      the nPrints
    • setnPrints

      public void setnPrints(int nPrints)
      Parameters:
      nPrints - the nPrints to set
    • getnStackTraces

      public int getnStackTraces()
      Returns:
      the nStackTraces
    • setnStackTraces

      public void setnStackTraces(int nStackTraces)
      Parameters:
      nStackTraces - the nStackTraces to set