|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.Container
public abstract class Container
Abstract base class for containers.
| Nested Class Summary | |
|---|---|
static interface |
Container.EDT_Checker
|
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
|---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
| Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
|---|
org.apache.pivot.collections.Sequence.Tree<T> |
| Constructor Summary | |
|---|---|
Container()
|
|
| Method Summary | |
|---|---|
int |
add(Component component)
|
protected void |
assertEventDispatchThread()
|
static void |
assertEventDispatchThread(Component component)
|
void |
clear()
Propagates clear operation to subcomponents. |
boolean |
containsFocus()
Tests whether this container is an ancestor of the currently focused component. |
protected void |
descendantAdded(Component descendant)
|
protected void |
descendantGainedFocus(Component descendant,
Component previousFocusedComponent)
|
protected void |
descendantLostFocus(Component descendant)
|
protected void |
descendantRemoved(Component descendant)
|
Component |
get(int index)
|
Component |
getComponentAt(int x,
int y)
|
org.apache.pivot.util.ListenerList<ContainerListener> |
getContainerListeners()
|
org.apache.pivot.util.ListenerList<ContainerMouseListener> |
getContainerMouseListeners()
|
Component |
getDescendantAt(int x,
int y)
|
FocusTraversalPolicy |
getFocusTraversalPolicy()
Returns this container's focus traversal policy. |
int |
getLength()
|
Component |
getNamedComponent(String name)
|
int |
indexOf(Component component)
|
void |
insert(Component component,
int index)
|
boolean |
isAncestor(Component component)
Tests if this container is an ancestor of a given component. |
Iterator<Component> |
iterator()
|
protected void |
layout()
Called to lay out the component. |
void |
load(Object context)
Propagates binding to subcomponents. |
protected boolean |
mouseClick(Mouse.Button button,
int x,
int y,
int count)
|
protected boolean |
mouseDown(Mouse.Button button,
int x,
int y)
|
protected boolean |
mouseMove(int x,
int y)
|
protected void |
mouseOut()
|
protected boolean |
mouseUp(Mouse.Button button,
int x,
int y)
|
protected boolean |
mouseWheel(Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
|
void |
move(int from,
int to)
Moves a component within the component sequence. |
void |
paint(Graphics2D graphics)
Paints the component. |
int |
remove(Component component)
|
org.apache.pivot.collections.Sequence<Component> |
remove(int index,
int count)
|
org.apache.pivot.collections.Sequence<Component> |
removeAll()
|
boolean |
requestFocus()
Requests that focus be given to this container. |
static void |
setEventDispatchThreadChecker(Container.EDT_Checker runnable)
|
void |
setFocusTraversalPolicy(FocusTraversalPolicy focusTraversalPolicy)
Sets this container's focus traversal policy. |
protected void |
setParent(Container parent)
|
void |
setVisible(boolean visible)
Sets the component's visibility. |
void |
store(Object context)
Propagates binding to subcomponents. |
Component |
transferFocus(Component component,
FocusTraversalDirection direction)
Transfers focus to the next focusable component. |
Component |
update(int index,
Component component)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Container()
| Method Detail |
|---|
public final int add(Component component)
add in interface org.apache.pivot.collections.Sequence<Component>
public void insert(Component component,
int index)
insert in interface org.apache.pivot.collections.Sequence<Component>
public Component update(int index,
Component component)
update in interface org.apache.pivot.collections.Sequence<Component>public final int remove(Component component)
remove in interface org.apache.pivot.collections.Sequence<Component>
public org.apache.pivot.collections.Sequence<Component> remove(int index,
int count)
remove in interface org.apache.pivot.collections.Sequence<Component>public final org.apache.pivot.collections.Sequence<Component> removeAll()
public void move(int from,
int to)
from - to - public Component get(int index)
get in interface org.apache.pivot.collections.Sequence<Component>public int indexOf(Component component)
indexOf in interface org.apache.pivot.collections.Sequence<Component>public int getLength()
getLength in interface org.apache.pivot.collections.Sequence<Component>public Iterator<Component> iterator()
iterator in interface Iterable<Component>protected void setParent(Container parent)
setParent in class Component
public Component getComponentAt(int x,
int y)
public Component getDescendantAt(int x,
int y)
public Component getNamedComponent(String name)
public void setVisible(boolean visible)
Component
setVisible in class Componentvisible - true if the component should be painted; false,
otherwise.protected void layout()
Component
layout in class Componentpublic void paint(Graphics2D graphics)
Component
paint in interface Visualpaint in class Componentgraphics - The graphics context in which to paint the visual.public boolean isAncestor(Component component)
component - The component to test.
public boolean requestFocus()
requestFocus in class Component
public Component transferFocus(Component component,
FocusTraversalDirection direction)
component - The component from which focus will be transferred.direction - The direction in which to transfer focus.public FocusTraversalPolicy getFocusTraversalPolicy()
public void setFocusTraversalPolicy(FocusTraversalPolicy focusTraversalPolicy)
focusTraversalPolicy - The focus traversal policy to use with this container.public boolean containsFocus()
protected void descendantAdded(Component descendant)
protected void descendantRemoved(Component descendant)
protected void descendantGainedFocus(Component descendant,
Component previousFocusedComponent)
protected void descendantLostFocus(Component descendant)
public void load(Object context)
load in class Componentcontext - public void store(Object context)
store in class Componentcontext - public void clear()
clear in class Component
protected boolean mouseMove(int x,
int y)
mouseMove in class Componentprotected void mouseOut()
mouseOut in class Component
protected boolean mouseDown(Mouse.Button button,
int x,
int y)
mouseDown in class Component
protected boolean mouseUp(Mouse.Button button,
int x,
int y)
mouseUp in class Component
protected boolean mouseClick(Mouse.Button button,
int x,
int y,
int count)
mouseClick in class Component
protected boolean mouseWheel(Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
mouseWheel in class Componentpublic org.apache.pivot.util.ListenerList<ContainerListener> getContainerListeners()
public org.apache.pivot.util.ListenerList<ContainerMouseListener> getContainerMouseListeners()
protected final void assertEventDispatchThread()
public static final void assertEventDispatchThread(Component component)
public static final void setEventDispatchThreadChecker(Container.EDT_Checker runnable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||