sky.monome.frame
Class AbstractFrameWindow<T extends Frame,F extends AbstractFrameWindow<T,F>>
java.lang.Object
sky.monome.frame.AbstractWindow<T,F>
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
|
Field Summary |
protected int |
xOffset
Offset on the X-axis. |
protected int |
yOffset
Offset on the Y-axis. |
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface sky.monome.frame.Frame |
get |
xOffset
protected int xOffset
- Offset on the X-axis.
yOffset
protected int yOffset
- Offset on the Y-axis.
AbstractFrameWindow
public AbstractFrameWindow(T frame)
- Constructs an abstract frame window with the specified frame.
- Parameters:
frame - Frame over which this windows makes a view.
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.