sky.monome.frame
Class BoundedFrameWindow
java.lang.Object
sky.monome.frame.AbstractWindow<T,F>
sky.monome.frame.AbstractFrameWindow<SizedFrame,BoundedFrameWindow>
sky.monome.frame.BoundedFrameWindow
- All Implemented Interfaces:
- DynamicFrame<BoundedFrameWindow>, Frame
public class BoundedFrameWindow
- extends AbstractFrameWindow<SizedFrame,BoundedFrameWindow>
Window that makes a movable view over a frame with a static 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
Method Summary |
LedButtonCouple.LedState |
get(int x,
int y)
Returns the led state at specified coordinates. |
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 |
BoundedFrameWindow
public BoundedFrameWindow(SizedFrame sizedFrame)
- Constructs a bounded frame window with the specified sized frame.
- Parameters:
sizedFrame
- Sized frame over which this windows makes a view.
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.
move
public void move(int newX,
int newY)
- Changes the translation over the frame.
- Overrides:
move
in class AbstractFrameWindow<SizedFrame,BoundedFrameWindow>
- Parameters:
newX
- New offset on the X-axis.newY
- New offset on the Y-axis.
translate
public void translate(int xOffset,
int yOffset)
- Makes a translation on the frame by the specified offset.
- Overrides:
translate
in class AbstractFrameWindow<SizedFrame,BoundedFrameWindow>
- 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.