|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kalmeo.util.frame.FrameHandler
public class FrameHandler
The FrameHandler id the base of the 'Frame' mecanism. It permits to process
messages through separate object instance called Frame and organized
into a stack.
The last pushed frame of this FrameHandler will be invoke to process a new
message first. If it doesn't use it, the message is pass to the next frame
untile a frame returns false on its onMessage(...) call.
Constructor Summary | |
---|---|
FrameHandler()
|
Method Summary | |
---|---|
Frame |
getTopFrame()
Returns th Frame on top of the frames stack, or null if the
FrameHandler is empty. |
boolean |
processMessage(java.lang.Object identifier,
java.lang.Object[] arguments)
Process a message into the frame stack. |
boolean |
pushFrame(Frame frame)
Push a frame on top of the frames stack |
void |
removeAllFrameOnTopOf(Frame frame)
Remove all frames on top of the given frame . |
void |
removeAllFrames()
Remove all frames. |
boolean |
removeFrame(Frame frame)
Remove a frame ont top of the frames stack |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FrameHandler()
Method Detail |
---|
public Frame getTopFrame()
Frame
on top of the frames stack, or null if the
FrameHandler
is empty.
Frame
on top of the stackpublic boolean pushFrame(Frame frame)
frame
- the Frame
to push
true
if frame is pushed or false
if
the frame was already present in to the stackpublic boolean removeFrame(Frame frame)
frame
- the Frame
to remove
true
if frame is removed or false
if
the frame wasn't present in to the stackpublic void removeAllFrames()
public void removeAllFrameOnTopOf(Frame frame)
frame
. The
frame
is not removed and become the new top frame.
frame
- the reference Frame
public boolean processMessage(java.lang.Object identifier, java.lang.Object[] arguments)
identifier
- the message identifierarguments
- the message arguments
true
if the message has been processed by a frame.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |