|
![]() |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.thefrontside.freestyle.Component
The fundamental building block for creating user interfaces with Freestyle. For details, see: http://www.thefrontside.net/freestyle/architecture/components
| Constructor Summary | |
Component()
Create a new component. |
|
| Method Summary | |
Component |
addChild(Component child)
Insert child into the hierarchy by making it a direct child
of this component. |
Component |
addChild(java.lang.String role,
Component child)
Insert child into the component hierarchy by making it a direct child
of this component while at the same time, assign it the role role. |
Component |
addChild(java.lang.String role,
java.lang.String text)
Creates a Label from text, and adds it as a child with role role |
void |
addStyle(java.lang.String name)
Adds name to this component's styles in the global scope. |
void |
addStyle(java.lang.String name,
Component scope)
Adds name to this component's styles within the given scope. |
CallbackBinding |
captureEvent(java.lang.String type,
EventHandler handler)
Adds handler as a callback to be invoked during the capture phase whenever an event of type
is received by this component or one of its descendants |
CallbackBinding |
captureEvent(java.lang.String type,
KeyEventHandler handler)
Registers handler as a callback to be invoked during the capture phase
whenever a KeyEvent of type type
is received by this component or one of its descendants. |
CallbackBinding |
captureEvent(java.lang.String type,
MouseEventHandler handler)
Registers handler as a callback to be invoked during the capture phase whenever a mouse event of type type
is received by this component or one of its descendants. |
CallbackBinding |
catchEvent(java.lang.String type,
EventHandler handler)
Registers handler as a callback to be invoked during the capture phase whenever an event of type
is received by this component or one of its descendants |
CallbackBinding |
catchEvent(java.lang.String type,
KeyEventHandler handler)
Registers handler as a callback to be invoked during the capture phase
whenever a key event of type type
is received by this component or one of its descendants. |
CallbackBinding |
catchEvent(java.lang.String type,
MouseEventHandler handler)
Registers handler as a callback to be invoked during the capture phase whenever a mouse event of type type
is received by this component or one of its descendants. |
Application |
getApplication()
Every component that is part of a hierarchy, has an application. |
java.util.Collection |
getChildren()
Deprecated. this will not be in the release 1 API |
Component |
getParent()
Gets the parent of this component in the hierarchy. |
boolean |
isChild(Component component)
Tests if component is one of this object's direct children |
boolean |
isDescendent(Component component)
Tests if component is a descendant of this object. |
CallbackBinding |
onEvent(java.lang.String type,
EventHandler handler)
Registers handler as a callback to be invoked during the capture phase whenever an event of type
is received by this component |
CallbackBinding |
onEvent(java.lang.String type,
KeyEventHandler handler)
Registers handler as a callback to be invoked during the capture phase
whenever a key event of type type
is received by this component. |
CallbackBinding |
onEvent(java.lang.String type,
MouseEventHandler handler)
Registers handler as a callback to be invoked during the capture phase whenever a mouse event of type type
is received by this component. |
void |
removeAllChildren()
Remove every child contained in this component |
void |
removeChild(Component child)
Removes child from the component hierarchy, by making it no longer
a child of this component. |
void |
removeStyle(java.lang.String name)
Removes name from this component's styles within the global scope. |
void |
removeStyle(java.lang.String name,
Component scope)
Removes name from this component's styles within the given scope. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Component()
| Method Detail |
public Application getApplication()
public Component getParent()
public Component addChild(Component child)
child into the hierarchy by making it a direct child
of this component.
see
http://www.thefrontside.net/freestyle/architecture/components#composition
child - the component to add to this component's children.
public Component addChild(java.lang.String role,
Component child)
child into the component hierarchy by making it a direct child
of this component while at the same time, assign it the role role.
see
http://www.thefrontside.net/freestyle/architecture/components#roles
role - the role which child will play in this componentchild - the component which will be the new child
public Component addChild(java.lang.String role,
java.lang.String text)
text, and adds it as a child with role role
public void removeChild(Component child)
child from the component hierarchy, by making it no longer
a child of this component.
If child is not a child of component, this method has no effect.
child - the component to remove from this component's children.public void removeAllChildren()
public CallbackBinding captureEvent(java.lang.String type,
EventHandler handler)
handler as a callback to be invoked during the capture phase whenever an event of type
is received by this component or one of its descendants
type - the type of event to listen for ("keydown", "mouseup", etc..)handler - the callback to invoke when the event occurs
Event
public CallbackBinding captureEvent(java.lang.String type,
MouseEventHandler handler)
handler as a callback to be invoked during the capture phase whenever a mouse event of type type
is received by this component or one of its descendants.
type - type the type of mouse event to listen for ("mousedown", "mouseup", etc..)handler - the callback to invoke when the event occurs
java.lang.IllegalArgumentException - if type is not a valid mouse event type.MouseEvent
public CallbackBinding captureEvent(java.lang.String type,
KeyEventHandler handler)
handler as a callback to be invoked during the capture phase
whenever a KeyEvent of type type
is received by this component or one of its descendants.
type - type the type of mouse event to listen for ("keydown", "keyup", etc..)handler - the callback to invoke when the event occurs
java.lang.IllegalArgumentException - if type is not a valid key event type.KeyEvent
public CallbackBinding catchEvent(java.lang.String type,
EventHandler handler)
handler as a callback to be invoked during the capture phase whenever an event of type
is received by this component or one of its descendants
type - the type of event to listen for ("keydown", "mouseup", etc..)handler - the callback to invoke when the event occursEvent
public CallbackBinding catchEvent(java.lang.String type,
MouseEventHandler handler)
handler as a callback to be invoked during the capture phase whenever a mouse event of type type
is received by this component or one of its descendants.
type - type the type of mouse event to listen for ("mousedown", "mouseup", etc..)handler - the callback to invoke when the event occurs
java.lang.IllegalArgumentException - if type is not a valid mouse event type.MouseEvent
public CallbackBinding catchEvent(java.lang.String type,
KeyEventHandler handler)
handler as a callback to be invoked during the capture phase
whenever a key event of type type
is received by this component or one of its descendants.
type - type the type of mouse event to listen for ("keydown", "keyup", etc..)handler - the callback to invoke when the event occurs
java.lang.IllegalArgumentException - if type is not a valid key event type.KeyEvent
public CallbackBinding onEvent(java.lang.String type,
EventHandler handler)
handler as a callback to be invoked during the capture phase whenever an event of type
is received by this component
type - type the type of event to listen for ("keydown", "mouseup", etc..)handler - the callback to invoke when the event occursEvent
public CallbackBinding onEvent(java.lang.String type,
MouseEventHandler handler)
handler as a callback to be invoked during the capture phase whenever a mouse event of type type
is received by this component.
type - the type of mouse event to listen for ("mousedown", "mouseup", etc..)handler - the callback to invoke when the event occurs
java.lang.IllegalArgumentException - if type is not a valid mouse event type.MouseEvent
public CallbackBinding onEvent(java.lang.String type,
KeyEventHandler handler)
handler as a callback to be invoked during the capture phase
whenever a key event of type type
is received by this component.
type - the type of mouse event to listen for ("keydown", "keyup", etc..)handler - the callback to invoke when the event occurs
java.lang.IllegalArgumentException - if type is not a valid key event type.KeyEventpublic void addStyle(java.lang.String name)
name to this component's styles in the global scope.
If this component already has style name, then this method has no effect.
name - -- identifier for the new style
public void addStyle(java.lang.String name,
Component scope)
name to this component's styles within the given scope.
If this component already has style name, within the given scope, then this method has no effect.
name - scope - public void removeStyle(java.lang.String name)
name from this component's styles within the global scope.
If this component does not already have style name, then this method has no effect.
name -
public void removeStyle(java.lang.String name,
Component scope)
name from this component's styles within the given scope.
If this component has no style name, within the given scope, then this method has no effect.
name - scope - public boolean isChild(Component component)
component is one of this object's direct children
component -
component is a direct child of this component.public boolean isDescendent(Component component)
component is a descendant of this object.
component -
component is descendend from this object.public java.util.Collection getChildren()
|
Welcome to the Millenium!!!!! | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||