sky.monome
Class Page


java.lang.Object

  extended by sky.monome.Component

      extended by sky.monome.Container

          extended by sky.monome.AbstractGroup<Component>

              extended by sky.monome.Group

                  extended by sky.monome.Page


public class Page
extends Group

Page of components to be added in a page switcher.

Author:
PJ Skyman

Field Summary
protected  AbstractPageSwitcher pageSwitcher
          Page switcher which contains this page.
 
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
Page(java.lang.String name)
          Constructs a page with the specified name.
Page(java.lang.String name, PageSwitcher pageSwitcher)
          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.
 
Method Summary
 boolean canHaveParentContainer()
          Indicates whether this page can have a parent container in the Monome assembling tree.
 int getAbsoluteX()
          Returns the absolute X-coordinate of this page.
 int getAbsoluteY()
          Returns the absolute Y-coordinate of this page.
 java.awt.Rectangle getBounds()
          Returns bounds of this page in the local context of its page switcher.
 int getHeight()
          Returns the height of this page.
 int getWidth()
          Returns the width of this page.
 boolean isVisible()
          Indicates whether this page is actually visible.
 java.lang.String toString()
          Returns a string representation of this page.
 
Methods inherited from class sky.monome.Group
addComponent, getComponents, removeComponent, removeComponents
 
Methods inherited from class sky.monome.AbstractGroup
getMonome, notify, writeOn
 
Methods inherited from class sky.monome.Component
getContainer, getLockObject, getName, getX, getY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pageSwitcher


protected AbstractPageSwitcher pageSwitcher
Page switcher which contains this page. Since SkyMonome v1.2, this field is not final anymore due to the automatic registering of this page inside its page switcher. Since SkyMonome v1.2.1, this field is an AbstractPageSwitcher instead of a PageSwitcher for more flexibility.

Constructor Detail

Page


@Deprecated

public Page(java.lang.String name,

                       PageSwitcher pageSwitcher)
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 with the specified name and contained in the specified page switcher.

Parameters:
name - Name of this page.
pageSwitcher - Page switcher which contains this page.

Page


public Page(java.lang.String name)
Constructs a page with the specified name.

Parameters:
name - Name of this page.
Since:
SkyMonome v1.2
Method Detail

toString


public java.lang.String toString()
Returns a string representation of this page.

Overrides:
toString in class Group
Returns:
A string representation of this page.

getAbsoluteX


public int getAbsoluteX()
Returns the absolute X-coordinate of this page.

Overrides:
getAbsoluteX in class AbstractGroup<Component>
Returns:
The absolute X-coordinate of this page.

getAbsoluteY


public int getAbsoluteY()
Returns the absolute Y-coordinate of this page.

Overrides:
getAbsoluteY in class AbstractGroup<Component>
Returns:
The absolute Y-coordinate of this page.

isVisible


public boolean isVisible()
Indicates whether this page is actually visible.

Overrides:
isVisible in class AbstractGroup<Component>
Returns:
true if this page is actually visible, false otherwise.

canHaveParentContainer


public boolean canHaveParentContainer()
Indicates whether this page can have a parent container in the Monome assembling tree.

Overrides:
canHaveParentContainer in class AbstractGroup<Component>
Returns:
Always false, since pages are contained only by page switchers.

getBounds


public java.awt.Rectangle getBounds()
Returns bounds of this page in the local context of its page switcher.

Overrides:
getBounds in class AbstractGroup<Component>
Returns:
Bounds of this page in the local context of its page switcher.
Since:
SkyMonome v1.2

getWidth


public int getWidth()
Returns the width of this page.

Overrides:
getWidth in class Container
Returns:
The width of this page.
Since:
SkyMonome v1.2

getHeight


public int getHeight()
Returns the height of this page.

Overrides:
getHeight in class Container
Returns:
The height of this page.
Since:
SkyMonome v1.2