Package javascript

Class SwingJS


  • public class SwingJS
    extends java.lang.Object
    The class to perform some "magics"
    Author:
    gianpiero.diblasi
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void build()
      Builds the new global style
      static <T> T convert​(java.lang.Object object)
      Converts "any" Java object into a JavaScript object.
      SwingJS darkMode​(boolean b)
      Sets the dark mode
      SwingJS fontFamily​(java.lang.String fontFamily)
      Sets the global font family, to complete the setting the build method has to be called
      SwingJS fontSize​(int fontSize)
      Sets the global font size, to complete the setting the build method has to be called
      static SwingJS instance()
      Returns the singleton instance of SwingJS
      SwingJS mainActionBGColor​(java.lang.String color)
      Sets the global main action background color, to complete the setting the build method has to be called
      SwingJS mainActionColor​(java.lang.String color)
      Sets the global main action color, to complete the setting the build method has to be called
      SwingJS mainBGColor​(java.lang.String color)
      Sets the global main background color, to complete the setting the build method has to be called
      SwingJS mainColor​(java.lang.String color)
      Sets the global main color, to complete the setting the build method has to be called
      SwingJS roundness​(double roundness)
      Sets the roundness, to complete the setting the build method has to be called
      • Methods inherited from class java.lang.Object

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

      • convert

        public static <T> T convert​(java.lang.Object object)
        Converts "any" Java object into a JavaScript object. This method is useful when developing in Java, whene developing in JavaScript this method is useless
        Type Parameters:
        T - The return type
        Parameters:
        object - The original java object
        Returns:
        The javascript object
      • instance

        public static SwingJS instance()
        Returns the singleton instance of SwingJS
        Returns:
        The singleton instance of SwingJS
      • darkMode

        public SwingJS darkMode​(boolean b)
        Sets the dark mode
        Parameters:
        b - true to set the dark mode, false otherwise
        Returns:
        The SwingJS instance (for chaining)
      • fontFamily

        public SwingJS fontFamily​(java.lang.String fontFamily)
        Sets the global font family, to complete the setting the build method has to be called
        Parameters:
        fontFamily - The font family
        Returns:
        The SwingJS instance (for chaining)
      • fontSize

        public SwingJS fontSize​(int fontSize)
        Sets the global font size, to complete the setting the build method has to be called
        Parameters:
        fontSize - The font size
        Returns:
        The SwingJS instance (for chaining)
      • mainColor

        public SwingJS mainColor​(java.lang.String color)
        Sets the global main color, to complete the setting the build method has to be called
        Parameters:
        color - The color
        Returns:
        The SwingJS instance (for chaining)
      • mainBGColor

        public SwingJS mainBGColor​(java.lang.String color)
        Sets the global main background color, to complete the setting the build method has to be called
        Parameters:
        color - The color
        Returns:
        The SwingJS instance (for chaining)
      • mainActionColor

        public SwingJS mainActionColor​(java.lang.String color)
        Sets the global main action color, to complete the setting the build method has to be called
        Parameters:
        color - The color
        Returns:
        The SwingJS instance (for chaining)
      • mainActionBGColor

        public SwingJS mainActionBGColor​(java.lang.String color)
        Sets the global main action background color, to complete the setting the build method has to be called
        Parameters:
        color - The color
        Returns:
        The SwingJS instance (for chaining)
      • roundness

        public SwingJS roundness​(double roundness)
        Sets the roundness, to complete the setting the build method has to be called
        Parameters:
        roundness - The roundness, a value in the range [0,1]
        Returns:
        The SwingJS instance (for chaining)
      • build

        public void build()
        Builds the new global style