/** * An input box for entering big decimal values. */ @Component(tag = "decimalbox", widgetClass = "Doublebox", parentTag = "*") public class Decimalbox extends BaseNumberboxComponent<BigDecimal> { public Decimalbox() { super(BigDecimal.class); } }
/** * When set to true, this component is a namespace boundary. This may not be changed once a * parent or children are added. * * @param namespace True to make component a namespace boundary. */ @PropertySetter("namespace") private void setNamespace(boolean namespace) { this.namespace = namespace; }
/** * Convenience method for getting subtitle. * * @return Subtitle text */ @PropertyGetter("subtitle") public String getSubtitle() { return options.subtitle.text; }
@EventHandler("close") private void _onClose() { this.open = false; } }
@EventType(KeydownEvent.TYPE) public class KeydownEvent extends KeyEvent { public static final String TYPE = "keydown"; public KeydownEvent() { super(TYPE); } public KeydownEvent(BaseComponent target, Object data) { super(TYPE, target, data); } }
/** * Conditionally prevents the factory from creating a component. * * @param condition If false, prevent factory from creating a component. */ @FactoryParameter("if") protected void setIf(boolean condition) { inactive = !condition; }
/** * An input box for entering floating point values. */ @Component(tag = "doublebox", widgetClass = "Doublebox", parentTag = "*") public class Doublebox extends BaseNumberboxComponent<Double> { public Doublebox() { super(Double.class); } }
/** * Returns the alignment of the label. Defaults to 'start'. * * @return May be one of start, center, end. */ @PropertyGetter("alignment") public LabelAlignment getAlignment() { return alignment; }
@EventType(DblclickEvent.TYPE) public class DblclickEvent extends MouseEvent { public static final String TYPE = "dblclick"; public DblclickEvent() { super(TYPE); } public DblclickEvent(BaseComponent target, Object data) { super(TYPE, target, data); } }
/** * Conditionally prevents the factory from creating a component. * * @param condition If true, prevent factory from creating a component. */ @FactoryParameter("unless") protected void setUnless(boolean condition) { inactive = condition; }
/** * A simple cell component with an optional label. */ @Component(tag = "cell", widgetClass = "Cell", content = ContentHandling.AS_CHILD, parentTag = "*", childTag = @ChildTag("*")) public class Cell extends BaseLabeledComponent<BaseLabeledComponent.LabelPositionNone> { public Cell() { super(); } public Cell(String label) { super(label); } }
/** * A component that presents a visual header within a menu. */ @Component(tag = "menuheader", widgetClass = "Menuheader", parentTag = { "menu", "menupopup", "menuitem" }) public class Menuheader extends BaseMenuComponent { }
@Override @PropertyGetter("label") public String getLabel() { return label; }
/** * An input box for entering integers. */ @Component(tag = "integerbox", widgetClass = "Integerbox", parentTag = "*") public class Integerbox extends BaseNumberboxComponent<Integer> { public Integerbox() { super(Integer.class); } }
@Override @PropertyGetter("disabled") public boolean isDisabled() { return disabled; }
/** * A simple container for holding text content. It is created implicitly during parsing of * components that support text content. */ @Component(tag = "#text", widgetClass = "Content", parentTag = "*") public class Content extends BaseComponent { }