From: Richard K. <ric...@us...> - 2005-06-29 07:03:24
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8094/test Modified Files: ASTestControls.as Log Message: added drawing of NSBox Index: ASTestControls.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestControls.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ASTestControls.as 13 Jun 2005 02:41:18 -0000 1.2 --- ASTestControls.as 29 Jun 2005 07:03:13 -0000 1.3 *************** *** 36,40 **** public static function test() { ! var triggerButton; var actionButton; var window1; --- 36,40 ---- public static function test() { ! var triggerButton:NSButton; var actionButton; var window1; *************** *** 48,52 **** var target = new Object(); target.trigger = function(button) { ! TRACE("Bam"); } target.move = function(button) { --- 48,52 ---- var target = new Object(); target.trigger = function(button) { ! TRACE(button.state()); } target.move = function(button) { *************** *** 64,91 **** var app = NSApplication.sharedApplication(); ! window1 = (new NSWindow()).initWithContentRect(new NSRect(0,0,250,500)); window2 = (new NSWindow()).initWithContentRect(new NSRect(251,0,250,500)); - view1 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,500)); view2 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,500)); ! //box = (new NSBox()).initWithFrame(new NSRect(10,10,160,100)); //box.setTitlePosition(NSTitlePosition.NSAboveTop); ! //box.setTitle("button"); triggerButton = (new NSButton()).initWithFrame(new NSRect(10,80,70,30)); ! triggerButton.setTitle("Draw"); ! triggerButton.sendActionOn(NSEvent.NSLeftMouseDownMask); ! triggerButton.setContinuous(true); ! triggerButton.setPeriodicDelayInterval(.3, .5); ! triggerButton.setBezelStyle(NSBezelStyle.NSShadowlessSquareBezelStyle); ! actionButton = (new NSButton()).initWithFrame(new NSRect(10,120,70,30)); ! actionButton.setTitle("Switch"); textField = (new NSTextField()).initWithFrame(new NSRect(10,160,120,30)); textField2 = (new NSTextField()).initWithFrame(new NSRect(10,200,120,30)); - view1.addSubview(box); //box.setContentView(triggerButton); view1.addSubview(triggerButton); --- 64,96 ---- var app = NSApplication.sharedApplication(); ! window1 = (new NSWindow()).initWithContentRectSwf(new NSRect(0,0,250,500)); ! //window1 = (new NSWindow()).initWithContentRect(new NSRect(0,0,250,500)); window2 = (new NSWindow()).initWithContentRect(new NSRect(251,0,250,500)); view1 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,500)); view2 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,500)); ! box = (new NSBox()).initWithFrame(new NSRect(10,10,160,100)); ! //box.setBorderType(NSBorderType.NSLineBorder); ! var boxFont:NSFont = NSFont.fontWithNameSize("Arial", 12); ! boxFont.setBold(true); ! box.setTitleFont(boxFont); //box.setTitlePosition(NSTitlePosition.NSAboveTop); ! box.setTitle("button"); ! view2.addSubview(box); triggerButton = (new NSButton()).initWithFrame(new NSRect(10,80,70,30)); ! triggerButton.setTitle("Press"); ! triggerButton.setButtonType(NSButtonType.NSPushOnPushOffButton); ! actionButton = (new NSButton()).initWithFrame(new NSRect(10,120,150,28)); ! actionButton.setTitle("LOGIN"); textField = (new NSTextField()).initWithFrame(new NSRect(10,160,120,30)); textField2 = (new NSTextField()).initWithFrame(new NSRect(10,200,120,30)); + textField2.setDrawsBackground(false); + textField2.setStringValue("My String"); + textField2.setEditable(false); + textField2.setSelectable(false); //box.setContentView(triggerButton); view1.addSubview(triggerButton); |