Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.globalretailtech.pos.context
Class PosEventStack  view PosEventStack download PosEventStack.java

java.lang.Object
  extended bycom.globalretailtech.pos.context.PosStack
      extended bycom.globalretailtech.pos.context.PosEventStack

public class PosEventStack
extends PosStack

Implements a stack of POS events by extending PosStack. Manages the current and queued event for a PosContext. This class included the more complex operations for loading and executing events/dialogs (nextEvent () and loadDialog ()).


Field Summary
 
Fields inherited from class com.globalretailtech.pos.context.PosStack
 
Constructor Summary
PosEventStack()
          Simple constructor calls super ().
 
Method Summary
 void clearPending()
          Removes all events from the pending stack.
 void clearProcessed()
          Removes all events from the processed stack.
 com.globalretailtech.pos.events.PosEvent event()
          Return the current event type.
 void insertElementAt(com.globalretailtech.pos.events.PosEvent event, int pos)
          Set the fist event in the pending stack to the object.
 void loadDialog(java.lang.String dialog_name, PosContext context)
          Finds a dialog set in PosConfig and loads it.
 void nextEvent()
          Pops and executes the next event on the stack.
 int pendingSize()
          The size of the pending stack.
 com.globalretailtech.pos.events.PosEvent popEvent()
          Remove the top of the pending stack and return it.
 int processedSize()
          The size of the processed stack.
 void pushEvent(com.globalretailtech.pos.events.PosEvent value)
          Add an object to the pending stack.
 void pushProcessed(java.lang.Object value)
          Add an object to the processed stack.
 void restore()
          Removes all events from the proccesed and puts them back on the pending stack.
 void setEvent(com.globalretailtech.pos.events.PosEvent event)
          Set the fist event in the pending stack to the object.
 
Methods inherited from class com.globalretailtech.pos.context.PosStack
clear, dump, peek, pendingInsertElementAt, popPending, pushPending, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PosEventStack

public PosEventStack()
Simple constructor calls super ().

Method Detail

event

public com.globalretailtech.pos.events.PosEvent event()
Return the current event type.


popEvent

public com.globalretailtech.pos.events.PosEvent popEvent()
Remove the top of the pending stack and return it. Invoke the push operation to move it to the pending stack. If there is only one event on the stack leave it and just peek.


pushEvent

public void pushEvent(com.globalretailtech.pos.events.PosEvent value)
Add an object to the pending stack.


pushProcessed

public void pushProcessed(java.lang.Object value)
Add an object to the processed stack.


setEvent

public void setEvent(com.globalretailtech.pos.events.PosEvent event)
Set the fist event in the pending stack to the object.


insertElementAt

public void insertElementAt(com.globalretailtech.pos.events.PosEvent event,
                            int pos)
Set the fist event in the pending stack to the object.


pendingSize

public int pendingSize()
The size of the pending stack.

Overrides:
pendingSize in class PosStack

processedSize

public int processedSize()
The size of the processed stack.

Overrides:
processedSize in class PosStack

restore

public void restore()
Removes all events from the proccesed and puts them back on the pending stack.

Overrides:
restore in class PosStack

clearPending

public void clearPending()
Removes all events from the pending stack.

Overrides:
clearPending in class PosStack

clearProcessed

public void clearProcessed()
Removes all events from the processed stack.

Overrides:
clearProcessed in class PosStack

nextEvent

public void nextEvent()
Pops and executes the next event on the stack.


loadDialog

public void loadDialog(java.lang.String dialog_name,
                       PosContext context)
Finds a dialog set in PosConfig and loads it.