Class StandardHints


  • public final class StandardHints
    extends java.lang.Object
    Standard rendering hints, used for various RenderTargets.
    Since:
    3.2
    Author:
    Chris Jennings
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void reset()
      For testing and experimentation.
      static void set​(java.lang.Object key, java.lang.Object value, RenderTarget renderTarget)
      For testing and experimentation.
      static void set​(java.lang.String key, java.lang.String value)
      For testing and experimentation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • reset

        public static void reset()
        For testing and experimentation. Resets all hints to their default values.
      • set

        public static void set​(java.lang.Object key,
                               java.lang.Object value,
                               RenderTarget renderTarget)
        For testing and experimentation. Changes a hint for all render targets or the specified target.
        Parameters:
        key - the RenderingHint key
        value - the RenderingHint key's desired value
        renderTarget - the render target value to affect, or null to change all targets
      • set

        public static void set​(java.lang.String key,
                               java.lang.String value)
        For testing and experimentation. Changes a hint for all render targets or the specified target. Uses reflection to specify keys and values from strings, which do not have to include the KEY_ or VALUE_ prefix.

        Example script use:

         arkham.sheet.StandardHints.reset();
         arkham.sheet.StandardHints.set("TEXT_ANTIALIASING", "TEXT_ANTIALIAS_OFF");
         Eons.window.redrawPreviews();
         let timer = new javax.swing.Timer(2000, function() {
           arkham.sheet.StandardHints.reset();
                 Eons.window.redrawPreviews();
         });
         timer.setRepeats(false);
         timer.start();
         
        Parameters:
        key - a string name matching a rendering hint key, KEY_ prefix optional
        value - a string name matching a rendering hint key, VALUE_ prefix optional