Class ZoomToCommand

  • All Implemented Interfaces:
    Command

    public final class ZoomToCommand
    extends AbstractDocumentCommand
    Provides absolute zooming behaviour.

    This includes zoom in and zoom out behaviour. Defaults to 100% if no absolute zoom factor is supplied by the caller.

    Zooming behaviour can be configured to be document- or page specific by using the underlying AbstractDocumentCommand.setScope(Scope) method.

    • Constructor Detail

      • ZoomToCommand

        public ZoomToCommand()
        Default Constructor.

        Initializes the zoom factor to 100%.

    • Method Detail

      • setZoomFactor

        public ZoomToCommand setZoomFactor​(float zoomFactor)
        Sets the absolute zoom factor.

        The @Parameter annotation allows to wire command params. See examples in com.levigo.jadice.web.demo.common.server.DefaultDescriptorService.

        Parameters:
        zoomFactor - the relative zoom factor that will be applied when execute() is called
        Returns:
        this command instance
      • getID

        public String getID()
        Description copied from interface: Command
        The ID of the command. This is typically the command class name. If the Command is parameterized the ID should comprise the class name + parameter information.
        Specified by:
        getID in interface Command
        Overrides:
        getID in class AbstractDocumentCommand
        Returns:
        the ID of the command