Class ShowResolutionCalibrationWidgetCommand
java.lang.Object
com.levigo.jadice.web.client.util.command.InjectedCommand
com.levigo.jadice.web.client.command.InjectedWidgetCommand
com.levigo.jadice.web.client.commands.ShowResolutionCalibrationWidgetCommand
- All Implemented Interfaces:
Command
,WidgetCommand
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.levigo.jadice.web.client.util.command.WidgetCommand
WidgetCommand.Handler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addScalingLineMarker
(double xPos, String name) Configures the command to add a custom marker.protected boolean
Subclasses may override this method to perform argument validation beyond the validation that happens automatically during the injection phase.protected com.google.gwt.user.client.ui.IsWidget
Creates and returns the calibration widget.protected void
execute()
This method is called in order to execute the command.protected String
Returns the widget caption.void
Removes all markers.void
setHandler
(WidgetCommand.Handler handler) Registers a callback.void
setPageView
(PageView pageView) Sets thePageView
instance.Methods inherited from class com.levigo.jadice.web.client.command.InjectedWidgetCommand
createWidget
Methods inherited from class com.levigo.jadice.web.client.util.command.InjectedCommand
canExecute, clearInjections, execute, getKey, isSelected, isSelected, setKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.levigo.jadice.web.client.util.command.Command
canExecute, execute, getID, isAvailable, isAvailable, isSelected
-
Constructor Details
-
ShowResolutionCalibrationWidgetCommand
public ShowResolutionCalibrationWidgetCommand()
-
-
Method Details
-
setPageView
Sets thePageView
instance.- Parameters:
pageView
- thePageView
instance to set.
-
canExecute
protected boolean canExecute()Description copied from class:InjectedCommand
Subclasses may override this method to perform argument validation beyond the validation that happens automatically during the injection phase. This method is called after the context has been found to match the requirements specified via the @ link Argument} annotations and the arguments have been injected.- Overrides:
canExecute
in classInjectedCommand
- Returns:
true
if the command can/may be executed in the current context,false
otherwise.
-
execute
protected void execute()Description copied from class:InjectedCommand
This method is called in order to execute the command. It is only called, after the arguments have been validated and injected and only ifInjectedCommand.canExecute()
has returnedtrue
.- Overrides:
execute
in classInjectedWidgetCommand
-
createWidget
protected com.google.gwt.user.client.ui.IsWidget createWidget()Creates and returns the calibration widget.- Specified by:
createWidget
in classInjectedWidgetCommand
- Returns:
- the resolution calibration widget
-
getCaption
Returns the widget caption.- Specified by:
getCaption
in classInjectedWidgetCommand
- Returns:
- the string that will be used as caption.
-
setHandler
Registers a callback.Not needed here. Could be used - e.g. - to close the popup.
- Parameters:
handler
- the handler that implements the callback.
-
addScalingLineMarker
Configures the command to add a custom marker.- Parameters:
xPos
- x position in inches were the marker will be placed.name
- the name of the marker.
-
removeMarkers
public void removeMarkers()Removes all markers.
-