/** * Abstract base class for number fields. * * @author Lateef Ojulari * @since 1.0 */ @UplAttributes({ @UplAttribute(name = "precision", type = int.class), @UplAttribute(name = "acceptNegative", type = boolean.class), @UplAttribute(name = "useGrouping", type = boolean.class), @UplAttribute(name = "formatter", type = Formatter.class) }) public abstract class AbstractNumberField extends TextField { }
@Override protected UplAttributesInfo create(String componentName, Object... params) throws Exception { Map<String, UplAttributeInfo> uplAttributeInfoMap = new HashMap<String, UplAttributeInfo>(); for (Class<?> clazz : ReflectUtils .getClassHierachyList(getComponentType(UplComponent.class, componentName))) { UplAttributes uas = clazz.getAnnotation(UplAttributes.class); if (uas != null) { for (UplAttribute ua : uas.value()) { uplAttributeInfoMap.put(ua.name(), new UplAttributeInfo(ua.type(), AnnotationUtils.getAnnotationString(ua.defaultValue()), ua.mandatory())); } } } return new UplAttributesInfo(componentName, uplAttributeInfoMap); } };
/** * Default amount formatter. * * @author Lateef Ojulari * @since 1.0 */ @Component(name = "amountformat", description = "$m{format.amount}") @UplAttributes({ @UplAttribute(name = "precision", type = int.class, defaultValue = "16"), @UplAttribute(name = "scale", type = int.class, defaultValue = "2"), @UplAttribute(name = "useGrouping", type = boolean.class, defaultValue = "true") }) public class AmountFormatterImpl extends DecimalFormatterImpl implements AmountFormatter { }
@UplAttributes({ @UplAttribute(name = "cellType", type = TabularCellType.class, defaultValue = "top"), @UplAttribute(name = "cellPadding", type = boolean.class, defaultValue = "true"), @UplAttribute(name = "widths", type = String[].class), @UplAttribute(name = "heights", type = String[].class), }) public abstract class AbstractTabularLayout extends AbstractLayout implements TabularLayout {
/** * Serves as a base class for an event handler. * * @author Lateef Ojulari * @since 1.0 */ @UplAttributes({ @UplAttribute(name = "event", type = String.class, mandatory = true), @UplAttribute(name = "action", type = UplElementReferences.class) }) public abstract class AbstractEventHandler extends AbstractBehavior implements EventHandler { private PageAction[] pageAction; @Override public void setPageAction(PageAction[] pageAction) { this.pageAction = pageAction; } public PageAction[] getPageAction() { return pageAction; } }
@UplAttributes({ @UplAttribute(name = "styleClass", type = String.class, defaultValue = "$e{}"), @UplAttribute(name = "style", type = String.class), @UplAttribute(name = "showCaption", type = boolean.class, defaultValue = "false"), @UplAttribute(name = "captionStyle", type = String.class), @UplAttribute(name = "captionSuffix", type = String.class), @UplAttribute(name = "inlineCaption", type = boolean.class) }) public abstract class AbstractLayout extends AbstractUplComponent implements Layout {
/** * Post command action. * * @author Lateef Ojulari * @since 1.0 */ @Component("ui-postcommand") @UplAttributes({ @UplAttribute(name = "command", type = String.class, defaultValue = "switchState"), @UplAttribute(name = "target", type = String.class), @UplAttribute(name = "validations", type = UplElementReferences.class), @UplAttribute(name = "refresh", type = UplElementReferences.class) }) public class PostCommandAction extends AbstractPageAction { public PostCommandAction() { super("postcommand"); } }
@UplAttributes({ @UplAttribute(name = "components", type = UplElementReferences.class), @UplAttribute(name = "confirm", type = String.class), @UplAttribute(name = "shortcut", type = String.class) }) public abstract class AbstractPageAction extends AbstractBehavior implements PageAction {
@UplAttributes({ @UplAttribute(name = "buttonImgSrc", type = String.class, defaultValue = "$t{images/droparrow.png}"), @UplAttribute(name = "timeout", type = long.class, defaultValue = "-1"), @UplAttribute(name = "clearable", type = boolean.class), @UplAttribute(name = "popupAlways", type = boolean.class, defaultValue = "false") }) public abstract class AbstractPopupTextField extends TextField {
@UplAttributes({ @UplAttribute(name = "size", type = int.class), @UplAttribute(name = "minLen", type = int.class), @UplAttribute(name = "maxLen", type = int.class), @UplAttribute(name = "case", type = String.class), @UplAttribute(name = "extStyleClass", type = String.class, defaultValue = "tread"), @UplAttribute(name = "extReadOnly", type = boolean.class, defaultValue = "true") }) public class TextField extends AbstractFormattedControl {
@UplAttributes({ @UplAttribute(name = "columns", type = int.class), @UplAttribute(name = "rows", type = int.class), @UplAttribute(name = "minLen", type = int.class), @UplAttribute(name = "maxLen", type = int.class), @UplAttribute(name = "wordWrap", type = boolean.class, defaultValue = "true"), @UplAttribute(name = "scrollToEnd", type = boolean.class) }) public class TextArea extends AbstractControl {
/** * Graphical indicator that shows a toggle state. The toggle state is the * boolean value of the widget's binded property. * * @author Lateef Ojulari * @since 1.0 */ @Component("ui-toggleimage") @UplAttributes({ @UplAttribute(name = "onImgSrc", type = String.class, defaultValue = "$t{images/toggleon.png}"), @UplAttribute(name = "offImgSrc", type = String.class, defaultValue = "$t{images/toggleoff.png}") }) public class ToggleImage extends AbstractTargetControl { }
@UplAttributes({ @UplAttribute(name = "styleSheet", type = String[].class), @UplAttribute(name = "script", type = String[].class), @UplAttribute(name = "layout", type = DocumentLayout.class, defaultValue = "$d{!ui-desktoptype0}"), @UplAttribute(name = "headerPanel", type = String.class), @UplAttribute(name = "footerPanel", type = String.class), @UplAttribute(name = "menuPanel", type = String.class), @UplAttribute(name = "contentPanel", type = String.class), @UplAttribute(name = "caption", type = String.class, defaultValue = "$m{application.title}"), @UplAttribute(name = "favicon", type = String.class, defaultValue = "web/images/favicon.png") }) public abstract class AbstractDocument extends AbstractPage implements Document {
/** * Post action. * * @author Lateef Ojulari * @since 1.0 */ @Component("ui-post") @UplAttributes({ @UplAttribute(name = "path", type = String.class, mandatory = true), @UplAttribute(name = "valueList", type = String[].class), @UplAttribute(name = "validations", type = UplElementReferences.class) }) public class PostAction extends AbstractPageAction { public PostAction() { super("post"); } protected PostAction(String action) { super(action); } }
@UplAttributes({ @UplAttribute(name = "list", type = String.class, mandatory = true), @UplAttribute(name = "listParams", type = String[].class), @UplAttribute(name = "listKey", type = String.class), @UplAttribute(name = "listDescription", type = String.class), @UplAttribute(name = "listParamType", type = ListParamType.class, defaultValue = "control"), @UplAttribute(name = "flow", type = boolean.class) }) public abstract class AbstractListControl extends AbstractControl implements ListControl {
@UplAttributes({ @UplAttribute(name = "underscore", type = boolean.class, defaultValue = "false"), @UplAttribute(name = "dollar", type = boolean.class, defaultValue = "false"), @UplAttribute(name = "period", type = boolean.class, defaultValue = "false"), @UplAttribute(name = "dash", type = boolean.class, defaultValue = "false") }) public class NameField extends TextField {
@UplAttributes({ @UplAttribute(name = "src", type = String.class), @UplAttribute(name = "srcBinding", type = String.class), @UplAttribute(name = "scope", type = String.class), @UplAttribute(name = "clearOnRead", type = boolean.class, defaultValue = "true"), @UplAttribute(name = "alwaysFetch", type = boolean.class) }) public class Image extends AbstractTargetControl {
@UplAttributes({ @UplAttribute(name = "tag", type = String.class), @UplAttribute(name = "caption", type = String.class), @UplAttribute(name = "binding", type = String.class), @UplAttribute(name = "components", type = UplElementReferences.class, mandatory = true), @UplAttribute(name = "privilege", type = String.class), @UplAttribute(name = "hidden", type = boolean.class, defaultValue = "false") }) public class SectionImpl extends AbstractUplComponent implements Section {
@UplAttributes({ @UplAttribute(name = "currency", type = String.class, mandatory = true), @UplAttribute(name = "precision", type = int.class), @UplAttribute(name = "scale", type = int.class), @UplAttribute(name = "acceptNegative", type = boolean.class), @UplAttribute(name = "useGrouping", type = boolean.class), @UplAttribute(name = "list", type = String.class, defaultValue = "currencylist"), @UplAttribute(name = "listParamType", type = ListParamType.class, defaultValue = "immediate"), @UplAttribute(name = "formatter", type = Formatter.class, defaultValue = "$d{!decimalformat}"), @UplAttribute(name = "extStyleClass", type = String.class, defaultValue = "tnread"), @UplAttribute(name = "extReadOnly", type = boolean.class, defaultValue = "false") }) public class MoneyField extends AbstractListPopupTextField {
@UplAttributes({ @UplAttribute(name = "list", type = String.class, mandatory = true), @UplAttribute(name = "listParams", type = String[].class), @UplAttribute(name = "listKey", type = String.class), @UplAttribute(name = "listDescription", type = String.class), @UplAttribute(name = "listParamType", type = ListParamType.class, defaultValue = "control") }) public abstract class AbstractListPopupTextField extends AbstractPopupTextField implements ListControl {