java.lang.Object | |
↳ | com.google.gwt.i18n.client.AutoDirectionHandler |
Utility class for handling auto-direction adjustment. This class is useful for automatically adjusting the direction of an object that takes text input, while the text is being entered.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AutoDirectionHandler.Target | The interface an object must implement in order to add an AutoDirectionHandler to it. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds auto-direction adjustment to a given object:
- Creates an AutoDirectionHandler.
| |||||||||||
Operates like
addTo(Target, DirectionEstimator) , but uses a
default DirectionEstimator, WordCountDirectionEstimator if enabled ,
or else a null DirectionEstimator, which means disabling direction
estimation. | |||||||||||
Operates like
addTo(Target, DirectionEstimator) , but always uses
a default DirectionEstimator, WordCountDirectionEstimator . | |||||||||||
Returns the DirectionEstimator object.
| |||||||||||
Automatically adjusts hasDirection's direction on KeyUpEvent events.
| |||||||||||
Adjusts target's direction according to the estimated direction of the text
it supplies.
| |||||||||||
Sets the DirectionEstimator object.
| |||||||||||
Toggles direction estimation on (using a default estimator) and off.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Adds auto-direction adjustment to a given object: - Creates an AutoDirectionHandler. - Initializes it with the given DirectionEstimator. - Adds it as an event handler for the relevant events on the given object. - Returns the AutoDirectionHandler, so its setAutoDir() method can be called when the object's text changes by means other than the handled events.
target | Object whose direction should be automatically adjusted on relevant events. |
---|---|
directionEstimator | A DirectionEstimator object used for direction estimation (use null to disable direction estimation). |
Operates like addTo(Target, DirectionEstimator)
, but uses a
default DirectionEstimator, WordCountDirectionEstimator
if enabled
,
or else a null DirectionEstimator, which means disabling direction
estimation.
target | Object whose direction should be automatically adjusted on relevant events. |
---|---|
enabled | Whether the handler is enabled upon creation. |
Operates like addTo(Target, DirectionEstimator)
, but always uses
a default DirectionEstimator, WordCountDirectionEstimator
.
target | Object whose direction should be automatically adjusted on relevant events. |
---|
Automatically adjusts hasDirection's direction on KeyUpEvent events. Implementation of KeyUpHandler interface method.
event | the KeyUpEvent that was fired
|
---|
Adjusts target's direction according to the estimated direction of the text it supplies.
Sets the DirectionEstimator object.
directionEstimator | The {code DirectionEstimator} to be set. null means turning off direction estimation.
|
---|
Toggles direction estimation on (using a default estimator) and off.
enabled | Whether to enable direction estimation. If true ,
sets the DirectionEstimator object to a default
DirectionEstimator .
|
---|