Class ZoomCommand

  • All Implemented Interfaces:

    public final class ZoomCommand
    extends AbstractDocumentCommand
    Provides relative zooming behaviour.

    This includes zoom in and zoom out behaviour on a relative base. Defaults to 10% steps if no relative 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

      • ZoomCommand

        public ZoomCommand()
        Default Constructor. Initializes this command to provide zoom in behaviour.
      • ZoomCommand

        public ZoomCommand​(boolean zoomIn)
        zoomIn - if true zoom in behaviour is configured, if false zoom out behaviour is configured.
      • ZoomCommand

        public ZoomCommand​(ZoomHelper zoomHelper,
                           float zoomRelative)
    • Method Detail

      • setZoomRelative

        public ZoomCommand setZoomRelative​(float zoomRelative)
        Sets the relative zoom factor.

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

        zoomRelative - the relative zoom factor that will be applied when execute() is called
        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
        getID in class AbstractDocumentCommand
        the ID of the command