Scope View ObjectsScope Views are the presentation layout only. Data bearing components are Scope SObjects, objects which wrap Swing objects with the addition of data binding methods to associate SObjects with objects in the Scope model class. There is no event handling in Scope Views. Scope view components issue controls which are intercepted by controllers and executed in models.
public class Hello2View1 extends SPanel { public Hello2View1() { setLayout(new BorderLayout(12, 12)); JLabel l = new JLabel("What's your name?"); add(l, BorderLayout.WEST); STextField t = new STextField(); t.setColumns(20); t.setSelectorString("name"); t.setControlID(Hello2Controller.GOT_NAME); add(t, BorderLayout.EAST); add(new SButton(Hello2Controller.CHANGE_TO_FRED), BorderLayout.SOUTH); } }
|