Class ColorField

    • Constructor Detail

      • ColorField

        public ColorField()
    • Method Detail

      • isInitial

        public boolean isInitial()
        Description copied from interface: Settable
        Returns true, if a value for the settable should be specified on the creation of an item.
        Specified by:
        isInitial in interface Settable<Color>
      • isFinal

        public boolean isFinal()
        Description copied from interface: Settable
        Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.
        Specified by:
        isFinal in interface Settable<Color>
      • isAlphaAllowed

        public boolean isAlphaAllowed()
        If this method returns false, this ColorField allows opaque colors only. This means, the alpha value must be 255. If this method returns true, this ColorField allows any colors with any alpha value.
      • getDefaultConstant

        public Color getDefaultConstant()
      • getRGB

        public IntegerField getRGB()
        Returns the field containing almost the result of Color.getRGB() of the persisted color. The difference is as follows:

        For Color.getRGB() an alpha value of 255 means that the color is completely opaque and an alpha value of 0 means that the color is completely transparent.

        Values of the IntegerField returned by this method do have the reverse meaning: An alpha value of 255 means that the color is completely transparent and an alpha value of 0 means that the color is completely opaque.

        This transformation ensures, that the persistent value of any opaque Color does not depend on whether the ColorField allows alpha or not.

      • toRGB

        public static int toRGB​(Color color)
        Returns the value for field getRGB() representing the given color.
      • fromRGB

        public static Color fromRGB​(int rgb)
        Converts a value for field getRGB() into a color.
      • notEqual

        public Condition notEqual​(Color value)
        NOT EQUAL Condition. Note: according to SQL, a NULL value is evaluated to unknown, so a NOT EQUAL using a non null RHS is false for null values
        Specified by:
        notEqual in interface ColorFunction
      • isNotOpaque

        public Condition isNotOpaque()