All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.citytechinc.cq.component.annotations.widgets.NumberField Maven / Gradle / Ivy

There is a newer version: 7.0.0
Show newest version
package com.citytechinc.cq.component.annotations.widgets;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Represents a Widget of type CQ.Ext.form.NumberField in Classic UI
 * 

* Represents a Widget of type granite/ui/components/foundation/form/numberfield * in Touch UI */ @Retention(RetentionPolicy.CLASS) @Target({ ElementType.FIELD, ElementType.METHOD }) public @interface NumberField { boolean ALLOW_DECIMALS_DEFAULT = true; boolean ALLOW_NEGATIVE_DEFAULT = true; int DECIMAL_PRECISION_DEFAULT = 2; String DECIMAL_SEPARATOR_DEFAULT = "."; /** * Used for Classic UI only *

* False to disallow decimal values * * @return boolean */ boolean allowDecimals() default ALLOW_DECIMALS_DEFAULT; /** * False to prevent entering a negative sign *

* In Touch UI, if no min is set, setting allowNegative to false will set * min to 0.0. * * @return boolean */ boolean allowNegative() default ALLOW_NEGATIVE_DEFAULT; /** * Used for Classic UI only *

* The maximum precision to display after the decimal separator * * @return int */ int decimalPrecision() default DECIMAL_PRECISION_DEFAULT; /** * Character(s) to allow as the decimal separator * * @return String */ String decimalSeparator() default DECIMAL_SEPARATOR_DEFAULT; /** * Used for Touch UI Only *

* Indicates the minimum allowed value in the field * * @return String */ String min() default ""; /** * Used for Touch UI Only *

* Indicates the maximum allowed value in the field * * @return String */ String max() default ""; /** * Used for Touch UI Only *

* Indicates the valid numeric increments for values in the field *

* Defaults to 1 - NOTE setting this to anything other than 1 * really does not work due to Javascripts floating point arithmetic * limitations. * * @return String */ double step() default 1; /** * Used for Coral 3 Touch UI Only *

* The value of SlingPostServlet @TypeHint * * @return String */ String typeHint() default ""; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy