sky.monome
Class PageSwitcher
java.lang.Object
sky.monome.Component
sky.monome.Container
sky.monome.AbstractGroup<Page>
sky.monome.AbstractPageSwitcher
sky.monome.PageSwitcher
public class PageSwitcher
- extends AbstractPageSwitcher
Page switcher that is capable to show no page if you want.
- Author:
- PJ Skyman
Constructor Summary |
PageSwitcher(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. |
PageSwitcher(java.lang.String name,
int x,
int y,
int width,
int height)
Constructs a page switcher with the specified name, specified coordinates and dimensions. |
Method Summary |
void |
removePage(Page page)
Removes the specified page from the list of contained pages. |
void |
showPage(Page page)
Shows the specified page, if this page is actually contained by this page switcher. |
java.lang.String |
toString()
Returns a string representation of this page switcher. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PageSwitcher
@Deprecated
public PageSwitcher(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.
- Constructs a page switcher with the specified name, specified coordinates and dimensions, and contained by the specified container.
- Parameters:
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.
PageSwitcher
public PageSwitcher(java.lang.String name,
int x,
int y,
int width,
int height)
- Constructs a page switcher with the specified name, specified coordinates and dimensions.
- Parameters:
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.- Since:
- SkyMonome v1.2
showPage
public void showPage(Page page)
throws MonomeException
- Shows the specified page, if this page is actually contained by this page switcher.
- Specified by:
showPage
in class AbstractPageSwitcher
- Parameters:
page
- Page to show. It will become the new active page.
- Throws:
MonomeException
- When the new active page can't be drawn.
removePage
public void removePage(Page page)
throws MonomeException
- Removes the specified page from the list of contained pages.
- Specified by:
removePage
in class AbstractPageSwitcher
- Parameters:
page
- Page to remove from the list of contained pages.
- Throws:
MonomeException
- When the active page is changed as a result of the call, and it can't be drawn.
toString
public java.lang.String toString()
- Returns a string representation of this page switcher.
- Specified by:
toString
in class Component
- Returns:
- A string representation of this page switcher.