1 29 30 package nextapp.echo2.testapp.interactive.testscreen; 31 32 import nextapp.echo2.app.Extent; 33 import nextapp.echo2.app.SplitPane; 34 import nextapp.echo2.app.event.ActionEvent; 35 import nextapp.echo2.app.event.ActionListener; 36 import nextapp.echo2.testapp.interactive.ButtonColumn; 37 38 41 public class WindowTest extends SplitPane { 42 43 public WindowTest() { 44 super(SplitPane.ORIENTATION_HORIZONTAL, new Extent(250, Extent.PX)); 45 setStyleName("DefaultResizable"); 46 47 ButtonColumn controlsColumn = new ButtonColumn(); 48 controlsColumn.setStyleName("TestControlsColumn"); 49 add(controlsColumn); 50 51 controlsColumn.addButton("Set window title", new ActionListener() { 52 public void actionPerformed(ActionEvent e) { 53 getApplicationInstance().getDefaultWindow().setTitle( 54 "Echo2 Test Application " + ((int) ( Math.random() * Integer.MAX_VALUE))); 55 } 56 }); 57 } 58 } 59 | Popular Tags |