|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsky.monome.frame.AbstractWindow<T,F>
T - Type of viewed frame.F - Type of window that extends this abstract window.public abstract class AbstractWindow<T extends Frame,F extends AbstractWindow<T,F>>
Window that makes a movable view over a frame. This class is the based class for all windows.
| Nested Class Summary | |
|---|---|
static class |
AbstractWindow.WindowType
Type of window. |
| Field Summary | |
|---|---|
protected javax.swing.event.EventListenerList |
eventListenerList
List of registered listeners. |
protected T |
frame
Frame over which this window makes a view. |
protected Container |
windowContainer
Container that contains this window. |
| Constructor Summary | |
|---|---|
AbstractWindow(T frame)
Constructs an abstract window with the specified frame. |
|
| Method Summary | |
|---|---|
void |
addFrameListener(FrameListener<F> frameListener)
Adds the specified listener to the list of all registered listeners. |
void |
fireFrameChanged(F dynamicFrame)
Invoked when a frame change occurs. |
FrameListener<F>[] |
getFrameListeners()
Returns an array of all registered listeners. |
LedButtonCouple.LedState |
getOnFrame(int x,
int y)
Returns the led state on the viewed frame at specified coordinates. |
void |
removeFrameListener(FrameListener<F> frameListener)
Removes the specified listener from the list of all registered listeners. |
void |
set(int x,
int y,
LedButtonCouple.LedState ledState)
Deprecated. Since it is recommended to set led states directly on the viewed frame with setOnFrame(int,int,LedState) method. |
void |
setOnFrame(int x,
int y,
LedButtonCouple.LedState ledState)
Modifies the led state on the viewed frame at specified coordinates. |
void |
setWindowContainer(Container windowContainer)
Modifies the container that contains this window. |
| 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 |
|---|
protected final T extends Frame frame
protected final javax.swing.event.EventListenerList eventListenerList
protected Container windowContainer
| Constructor Detail |
|---|
public AbstractWindow(T frame)
frame - Frame over which this windows makes a view.| Method Detail |
|---|
public void setWindowContainer(Container windowContainer)
windowContainer - New window container, or null to
remove this window from any container.
public LedButtonCouple.LedState getOnFrame(int x,
int y)
x - X-coordinate of the needed led state on the viewed frame.y - Y-coordinate of the needed led state on the viewed frame.
@Deprecated
public void set(int x,
int y,
LedButtonCouple.LedState ledState)
setOnFrame(int,int,LedState) method.
set in interface Framex - X-coordinate of the led state to be modified on this window.y - Y-coordinate of the led state to be modified on this window.ledState - New led state to affect at specified coordinates on this window.
public void setOnFrame(int x,
int y,
LedButtonCouple.LedState ledState)
x - X-coordinate of the led state to be modified on the viewed frame.y - Y-coordinate of the led state to be modified on the viewed frame.ledState - New led state to affect at specified coordinates on the viewed frame.public void addFrameListener(FrameListener<F> frameListener)
addFrameListener in interface DynamicFrame<F extends AbstractWindow<T,F>>frameListener - Listener to add to the list of all registered listeners.public void removeFrameListener(FrameListener<F> frameListener)
removeFrameListener in interface DynamicFrame<F extends AbstractWindow<T,F>>frameListener - Listener to remove from the list of all registered listeners.public FrameListener<F>[] getFrameListeners()
getFrameListeners in interface DynamicFrame<F extends AbstractWindow<T,F>>public void fireFrameChanged(F dynamicFrame)
fireFrameChanged in interface DynamicFrame<F extends AbstractWindow<T,F>>dynamicFrame - Dynamic frame that triggered the frame event.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||