sky.monome.frame
Class InertiaBoundedFrameWindow


java.lang.Object

  extended by sky.monome.frame.AbstractWindow<T,F>

      extended by sky.monome.frame.AbstractInertiaFrameWindow<SizedFrame,InertiaBoundedFrameWindow>

          extended by sky.monome.frame.InertiaBoundedFrameWindow

All Implemented Interfaces:
DynamicFrame<InertiaBoundedFrameWindow>, Frame

public class InertiaBoundedFrameWindow
extends AbstractInertiaFrameWindow<SizedFrame,InertiaBoundedFrameWindow>

Window that makes a movable view over a frame with an inertia translation offset that cannot exceed frame bounds. The bounding effect needs an instance of SizedFrame instead of Frame.

Since:
SkyMonome v1.3
Author:
PJ Skyman

Nested Class Summary
 
Nested classes/interfaces inherited from class sky.monome.frame.AbstractWindow
AbstractWindow.WindowType
 
Field Summary
 
Fields inherited from class sky.monome.frame.AbstractInertiaFrameWindow
intX, intY, LOOP_TIME, loopTime, x, xIncrement, y, yIncrement
 
Fields inherited from class sky.monome.frame.AbstractWindow
eventListenerList, frame, windowContainer
 
Constructor Summary
InertiaBoundedFrameWindow(SizedFrame sizedFrame)
          Constructs an inertia bounded frame window with the specified sized frame.
 
Method Summary
protected  void applyXIncrement()
          Apply the increment on the X-axis.
protected  void applyYIncrement()
          Apply the increment on the Y-axis.
 LedButtonCouple.LedState get(int x, int y)
          Returns the led state at specified coordinates.
 
Methods inherited from class sky.monome.frame.AbstractInertiaFrameWindow
getLoopTime, setLoopTime, setXIncrement, setYIncrement
 
Methods inherited from class sky.monome.frame.AbstractWindow
addFrameListener, fireFrameChanged, getFrameListeners, getOnFrame, removeFrameListener, set, setOnFrame, setWindowContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InertiaBoundedFrameWindow


public InertiaBoundedFrameWindow(SizedFrame sizedFrame)
Constructs an inertia bounded frame window with the specified sized frame.

Parameters:
sizedFrame - Sized frame over which this windows makes a view.
Method Detail

get


public LedButtonCouple.LedState get(int x,

                                    int y)
Returns the led state at specified coordinates.

Parameters:
x - X-coordinate of the led state needed.
y - Y-coordinate of the led state needed.
Returns:
The led state at specified coordinates.

applyXIncrement


protected void applyXIncrement()
Apply the increment on the X-axis.

Overrides:
applyXIncrement in class AbstractInertiaFrameWindow<SizedFrame,InertiaBoundedFrameWindow>
Since:
SkyMonome v1.3

applyYIncrement


protected void applyYIncrement()
Apply the increment on the Y-axis.

Overrides:
applyYIncrement in class AbstractInertiaFrameWindow<SizedFrame,InertiaBoundedFrameWindow>
Since:
SkyMonome v1.3