/** * Operates like {@link #addTo(Target, DirectionEstimator)}, but always uses * a default DirectionEstimator, {@link * com.google.gwt.i18n.shared.WordCountDirectionEstimator}. * * @param target Object whose direction should be automatically adjusted on * relevant events. * @return AutoDirectionHandler An instance of AutoDirectionHandler for the * given object. */ public static AutoDirectionHandler addTo(Target target) { return addTo(target, true); }
/** * Creates a value box that wraps the given browser element handle. This is * only used by subclasses. * * @param elem the browser element to wrap */ protected ValueBoxBase(Element elem, Renderer<T> renderer, Parser<T> parser) { super(elem); autoDirHandler = AutoDirectionHandler.addTo(this, BidiPolicy.isBidiEnabled()); this.renderer = renderer; this.parser = parser; }
/** * Operates like {@link #addTo(Target, DirectionEstimator)}, but uses a * default DirectionEstimator, {@link * com.google.gwt.i18n.shared.WordCountDirectionEstimator} if {@code enabled}, * or else a null DirectionEstimator, which means disabling direction * estimation. * * @param target Object whose direction should be automatically adjusted on * relevant events. * @param enabled Whether the handler is enabled upon creation. * @return AutoDirectionHandler An instance of AutoDirectionHandler for the * given object. */ public static AutoDirectionHandler addTo(Target target, boolean enabled) { return addTo(target, enabled ? WordCountDirectionEstimator.get() : null); }
/** * Operates like {@link #addTo(Target, DirectionEstimator)}, but always uses * a default DirectionEstimator, {@link * com.google.gwt.i18n.shared.WordCountDirectionEstimator}. * * @param target Object whose direction should be automatically adjusted on * relevant events. * @return AutoDirectionHandler An instance of AutoDirectionHandler for the * given object. */ public static AutoDirectionHandler addTo(Target target) { return addTo(target, true); }
/** * Operates like {@link #addTo(Target, DirectionEstimator)}, but always uses * a default DirectionEstimator, {@link * com.google.gwt.i18n.shared.WordCountDirectionEstimator}. * * @param target Object whose direction should be automatically adjusted on * relevant events. * @return AutoDirectionHandler An instance of AutoDirectionHandler for the * given object. */ public static AutoDirectionHandler addTo(Target target) { return addTo(target, true); }
/** * Creates a value box that wraps the given browser element handle. This is * only used by subclasses. * * @param elem the browser element to wrap */ protected ValueBoxBase(Element elem, Renderer<T> renderer, Parser<T> parser) { super(elem); autoDirHandler = AutoDirectionHandler.addTo(this, BidiPolicy.isBidiEnabled()); this.renderer = renderer; this.parser = parser; }
/** * Creates a value box that wraps the given browser element handle. This is * only used by subclasses. * * @param elem the browser element to wrap */ protected ValueBoxBase(Element elem, Renderer<T> renderer, Parser<T> parser) { super(elem); autoDirHandler = AutoDirectionHandler.addTo(this, BidiPolicy.isBidiEnabled()); this.renderer = renderer; this.parser = parser; }
/** * Operates like {@link #addTo(Target, DirectionEstimator)}, but uses a * default DirectionEstimator, {@link * com.google.gwt.i18n.shared.WordCountDirectionEstimator} if {@code enabled}, * or else a null DirectionEstimator, which means disabling direction * estimation. * * @param target Object whose direction should be automatically adjusted on * relevant events. * @param enabled Whether the handler is enabled upon creation. * @return AutoDirectionHandler An instance of AutoDirectionHandler for the * given object. */ public static AutoDirectionHandler addTo(Target target, boolean enabled) { return addTo(target, enabled ? WordCountDirectionEstimator.get() : null); }
/** * Operates like {@link #addTo(Target, DirectionEstimator)}, but uses a * default DirectionEstimator, {@link * com.google.gwt.i18n.shared.WordCountDirectionEstimator} if {@code enabled}, * or else a null DirectionEstimator, which means disabling direction * estimation. * * @param target Object whose direction should be automatically adjusted on * relevant events. * @param enabled Whether the handler is enabled upon creation. * @return AutoDirectionHandler An instance of AutoDirectionHandler for the * given object. */ public static AutoDirectionHandler addTo(Target target, boolean enabled) { return addTo(target, enabled ? WordCountDirectionEstimator.get() : null); }