All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----jcsp.awt.event.EventSourceFilter
___________________ eventIn | | sourceOut ---->----| EventSourcefilter |----->----- |___________________|
Input Channels | ||
---|---|---|
eventIn | java.awt.AWTEvent | The event that the Source is required from |
Any other Class | If any other Object is sent down the eventIn Channel a ClassCastException will be thrown by the Runtime system. | |
Output Channels | ||
sourceOut | java.lang.Object | The event Source of the AWTEvent Object sent down the eventIn Channel |
import jcsp.awt.*; import jcsp.awt.event.*; import jcsp.lang.*; : : { final Channel event = new One2OneChannel(); final Channel source = new One2OneChannel(); ActiveButton c = new ActiveButton("Active"); add(c); c.addFocusEventChannel(event); new Parallel(new CSProcess[] { c, new EventSourceFilter(event, source), new CSProcess() { public void run() { while (true) { Object o = source.read(); System.out.println("FocusEvent source='" + o); } } } }).run(); } }
public EventSourceFilter(ChannelInput eventIn, ChannelOutput sourceOut)
public void run()
All Packages Class Hierarchy This Package Previous Next Index