com.threerings.media
Class VirtualRangeModel

java.lang.Object
  extended by com.threerings.media.VirtualRangeModel
All Implemented Interfaces:
EventListener, ChangeListener

public class VirtualRangeModel
extends Object
implements ChangeListener

Provides a BoundedRangeModel interface to a virtual media panel so that it can easily be wired up to scroll bars or other scrolling controls.


Field Summary
protected  BoundedRangeModel _hrange
           
protected  VirtualMediaPanel _panel
           
protected  BoundedRangeModel _vrange
           
 
Constructor Summary
VirtualRangeModel(VirtualMediaPanel panel)
          Creates a virtual media panel range model that will interact with the supplied virtual media panel.
 
Method Summary
 BoundedRangeModel getHorizModel()
          Returns a range model that controls the scrollability of the scene in the horizontal direction.
 BoundedRangeModel getVertModel()
          Returns a range model that controls the scrollability of the scene in the vertical direction.
 void setScrollableArea(int x, int y, int width, int height)
          Informs the virtual range model the extent of the area over which we can scroll.
 void stateChanged(ChangeEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_panel

protected VirtualMediaPanel _panel

_hrange

protected BoundedRangeModel _hrange

_vrange

protected BoundedRangeModel _vrange
Constructor Detail

VirtualRangeModel

public VirtualRangeModel(VirtualMediaPanel panel)
Creates a virtual media panel range model that will interact with the supplied virtual media panel.

Method Detail

setScrollableArea

public void setScrollableArea(int x,
                              int y,
                              int width,
                              int height)
Informs the virtual range model the extent of the area over which we can scroll.


getHorizModel

public BoundedRangeModel getHorizModel()
Returns a range model that controls the scrollability of the scene in the horizontal direction.


getVertModel

public BoundedRangeModel getVertModel()
Returns a range model that controls the scrollability of the scene in the vertical direction.


stateChanged

public void stateChanged(ChangeEvent e)
Specified by:
stateChanged in interface ChangeListener