|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.Component sky.monome.Container sky.monome.AbstractGroup<Page> sky.monome.AbstractPageSwitcher
public abstract class AbstractPageSwitcher
Page switcher which can show different pages. This class is the base class for all implementations of page switchers.
Field Summary | |
---|---|
protected Page |
activePage
Active page in this page switcher. |
Fields inherited from class sky.monome.AbstractGroup |
---|
components |
Fields inherited from class sky.monome.Container |
---|
height, width |
Fields inherited from class sky.monome.Component |
---|
container, eventListenerList, lockObject, name, x, y |
Constructor Summary | |
---|---|
AbstractPageSwitcher(java.lang.String name,
Container container,
int x,
int y,
int width,
int height)
Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor. |
|
AbstractPageSwitcher(java.lang.String name,
int x,
int y,
int width,
int height)
Constructs an abstract page switcher with the specified name and specified coordinates and dimensions. |
Method Summary | |
---|---|
void |
addPage(Page page)
Adds the specified page to the list of contained pages. |
Page |
getActivePage()
Returns the currently active page. |
Page[] |
getPages()
Returns an array of all pages contained by this page switcher. |
void |
notify(OSCMessageDigester messageDigester)
Notifies this page switcher that a message comes from the Monome device. |
abstract void |
removePage(Page page)
Removes the specified page from the list of contained pages. |
abstract void |
showPage(Page page)
Shows the specified page, if this page is actually contained by this page switcher. |
void |
writeOn(Frame frame)
Writes this page switcher on the specified frame in order to refresh the Monome device. |
Methods inherited from class sky.monome.AbstractGroup |
---|
canHaveParentContainer, getAbsoluteX, getAbsoluteY, getBounds, getMonome, isVisible |
Methods inherited from class sky.monome.Container |
---|
getHeight, getWidth |
Methods inherited from class sky.monome.Component |
---|
getContainer, getLockObject, getName, getX, getY, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Page activePage
Constructor Detail |
---|
@Deprecated public AbstractPageSwitcher(java.lang.String name, Container container, int x, int y, int width, int height)
name
- Name of this page switcher.container
- Container that contains this page switcher.x
- X-coordinate of this page switcher in the local context of its container.y
- Y-coordinate of this page switcher in the local context of its container.width
- Width of this page switcher.height
- Height of this page switcher.public AbstractPageSwitcher(java.lang.String name, int x, int y, int width, int height)
name
- Name of this page switcher.x
- X-coordinate of this page switcher in the local context of its container.y
- Y-coordinate of this page switcher in the local context of its container.width
- Width of this page switcher.height
- Height of this page switcher.Method Detail |
---|
public Page[] getPages()
public void addPage(Page page) throws MonomeException
page
- Page to add to the list of contained pages.
MonomeException
- When the first page is added and when it can't be drawn.public abstract void removePage(Page page) throws MonomeException
page
- Page to remove from the list of contained pages.
MonomeException
- When the active page is changed as a result of the call, and it can't be drawn.public Page getActivePage()
public abstract void showPage(Page page) throws MonomeException
page
- Page to show. It will become the new active page.
MonomeException
- When the new active page can't be drawn.public void notify(OSCMessageDigester messageDigester) throws MonomeException
notify
in class AbstractGroup<Page>
messageDigester
- Message digester that prepares and encapsulates the message for an easy access of informations contained in the message.
MonomeException
- When a problem has occured when treating the message.
By example, a led/button couple can treat a message by lighting on the led, and lighting on a led is a potentially risked operation.public void writeOn(Frame frame) throws MonomeException
writeOn
in class AbstractGroup<Page>
frame
- Frame in which this page switcher must write its led state.
MonomeException
- When a problem has occured while getting the led state of a component inside this page switcher.Monome.refresh()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |