sky.monome.frame
Class AbstractFrameWindow<T extends Frame,F extends AbstractFrameWindow<T,F>>


java.lang.Object

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

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

Type Parameters:
T - Type of viewed frame.
F - Type of frame window that extends this abstract frame window.
All Implemented Interfaces:
DynamicFrame<F>, Frame
Direct Known Subclasses:
BoundedFrameWindow, FrameWindow, MirroredFrameWindow

public abstract class AbstractFrameWindow<T extends Frame,F extends AbstractFrameWindow<T,F>>
extends AbstractWindow<T,F>

Window that makes a movable view over a frame with a static translation offset. This class is the based class for all windows with a static translation offset.

Author:
PJ Skyman

Nested Class Summary
 
Nested classes/interfaces inherited from class sky.monome.frame.AbstractWindow
AbstractWindow.WindowType
 
Field Summary
protected  int xOffset
          Offset on the X-axis.
protected  int yOffset
          Offset on the Y-axis.
 
Fields inherited from class sky.monome.frame.AbstractWindow
eventListenerList, frame, windowContainer
 
Constructor Summary
AbstractFrameWindow(T frame)
          Constructs an abstract frame window with the specified frame.
 
Method Summary
 void move(int newX, int newY)
          Changes the translation over the frame.
 void translate(int xOffset, int yOffset)
          Makes a translation on the frame by the specified offset.
 
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
 
Methods inherited from interface sky.monome.frame.Frame
get
 

Field Detail

xOffset


protected int xOffset
Offset on the X-axis.


yOffset


protected int yOffset
Offset on the Y-axis.

Constructor Detail

AbstractFrameWindow


public AbstractFrameWindow(T frame)
Constructs an abstract frame window with the specified frame.

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

translate


public void translate(int xOffset,

                      int yOffset)
Makes a translation on the frame by the specified offset.

Parameters:
xOffset - Offset on the X-axis to add to the current offset.
yOffset - Offset on the Y-axis to add to the current offset.

move


public void move(int newX,

                 int newY)
Changes the translation over the frame.

Parameters:
newX - New offset on the X-axis.
newY - New offset on the Y-axis.