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 TypeMethodDescriptionvoidaddScalingLineMarker(double xPos, String name) Configures the command to add a custom marker.protected booleanSubclasses 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.IsWidgetCreates and returns the calibration widget.protected voidexecute()This method is called in order to execute the command.protected StringReturns the widget caption.voidRemoves all markers.voidsetHandler(WidgetCommand.Handler handler) Registers a callback.voidsetPageView(PageView pageView) Sets thePageViewinstance.Methods inherited from class com.levigo.jadice.web.client.command.InjectedWidgetCommand
createWidgetMethods inherited from class com.levigo.jadice.web.client.util.command.InjectedCommand
canExecute, clearInjections, execute, getKey, isSelected, isSelected, setKeyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 thePageViewinstance.- Parameters:
pageView- thePageViewinstance to set.
-
canExecute
protected boolean canExecute()Description copied from class:InjectedCommandSubclasses 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:
canExecutein classInjectedCommand- Returns:
trueif the command can/may be executed in the current context,falseotherwise.
-
execute
protected void execute()Description copied from class:InjectedCommandThis 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:
executein classInjectedWidgetCommand
-
createWidget
protected com.google.gwt.user.client.ui.IsWidget createWidget()Creates and returns the calibration widget.- Specified by:
createWidgetin classInjectedWidgetCommand- Returns:
- the resolution calibration widget
-
getCaption
Returns the widget caption.- Specified by:
getCaptionin 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.
-