visad.util
Class ResSwitcher
- java.lang.Object
-
- visad.util.DualRes
-
- visad.util.ResSwitcher
-
- All Implemented Interfaces:
- ActivityHandler
public class ResSwitcher extends DualRes implements ActivityHandler
Handles automatic toggling between a high-resolution representation and a low-resolution one for a data object. When the display is busy, the low-resolution representation is used for faster response time. When the display is idle, the high-resolution representation is used for greater detail.
-
-
Constructor Summary
Constructors Constructor and Description ResSwitcher(LocalDisplay d, DataReferenceImpl ref)Constructs a resolution switcher for swapping between high- and low- resolution representations for the referenced data on the given display.ResSwitcher(LocalDisplay d, DataReferenceImpl ref, DataRenderer renderer, ConstantMap[] cmaps)Constructs a resolution switcher for swapping between high- and low- resolution representations for the referenced data on the given display.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidbusyDisplay(LocalDisplay d)Swaps in the low-resolution data when the display is busy.voididleDisplay(LocalDisplay d)Swaps in the high-resolution data when the display is idle.static voidmain(java.lang.String[] args)Run 'java visad.util.ResSwitcher data_file' to test ResSwitcher.voidunlink()Unlinks the resolution switcher from its display.-
Methods inherited from class visad.util.DualRes
getHighResReference, getLowResReference, getResolutionScale, rescale, rescale, setResolutionScale
-
-
-
-
Constructor Detail
-
ResSwitcher
public ResSwitcher(LocalDisplay d, DataReferenceImpl ref) throws VisADException, java.rmi.RemoteException
Constructs a resolution switcher for swapping between high- and low- resolution representations for the referenced data on the given display.- Throws:
VisADExceptionjava.rmi.RemoteException
-
ResSwitcher
public ResSwitcher(LocalDisplay d, DataReferenceImpl ref, DataRenderer renderer, ConstantMap[] cmaps) throws VisADException, java.rmi.RemoteException
Constructs a resolution switcher for swapping between high- and low- resolution representations for the referenced data on the given display.- Parameters:
renderer- The data renderer to be used for the low-res rendering.cmaps- The ConstantMaps to be used for the low-res rendering.- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
Method Detail
-
unlink
public void unlink() throws VisADExceptionUnlinks the resolution switcher from its display.- Throws:
VisADException
-
busyDisplay
public void busyDisplay(LocalDisplay d)
Swaps in the low-resolution data when the display is busy.- Specified by:
busyDisplayin interfaceActivityHandler- Parameters:
d- Busy Display.
-
idleDisplay
public void idleDisplay(LocalDisplay d)
Swaps in the high-resolution data when the display is idle.- Specified by:
idleDisplayin interfaceActivityHandler- Parameters:
d- Idle Display.
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionRun 'java visad.util.ResSwitcher data_file' to test ResSwitcher.- Throws:
java.lang.Exception
-
-
DMelt 3.0 © DataMelt by jWork.ORG