com.levigo.jadice.demo
Class SpacePanBehaviour

java.lang.Object
  extended by com.levigo.jadice.demo.SpacePanBehaviour

public final class SpacePanBehaviour
extends Object

Allows pressing and holding space to trigger the PanTool in a configured PageView. Space panning has become famous of some well known image manipulation programs. The use can press hand hold the space key and switches into the panning mode. Once the the space key is released panning will be stopped and the previous Tool will become active again.


Constructor Summary
SpacePanBehaviour()
           
 
Method Summary
 ToolActivationPolicy getDecoratedToolActivationPolicy()
           
 void install(PageView pageView)
          Install the SpacePanBehaviour into the given PageView.
 void setDecoratedToolActivationPolicy(ToolActivationPolicy decoratedToolActivationPolicy)
           
 void uninstall()
          Uninstall the SpacePanBehaviour from the PageView for which it has been installed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpacePanBehaviour

public SpacePanBehaviour()
Method Detail

setDecoratedToolActivationPolicy

public void setDecoratedToolActivationPolicy(ToolActivationPolicy decoratedToolActivationPolicy)
Parameters:
decoratedToolActivationPolicy -

getDecoratedToolActivationPolicy

public ToolActivationPolicy getDecoratedToolActivationPolicy()

install

public void install(PageView pageView)
Install the SpacePanBehaviour into the given PageView. A SpacePanBehaviour must not be shared accross multiple PageView instances and will throw a IllegalStateException if someone tries to do so.

Parameters:
pageView - the PageView
Throws:
IllegalStateException - if install has been called before and the instance is already registered.
IllegalArgumentException - if the PageView is null

uninstall

public void uninstall()
Uninstall the SpacePanBehaviour from the PageView for which it has been installed

Throws:
IllegalStateException - if the SpacePanBehaviour has not been installed before


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.