From: Scott H. <sco...@us...> - 2005-05-27 06:23:57
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28474/src/org/actionstep/test Modified Files: ASTestMatrix.as Log Message: column removal buttons Index: ASTestMatrix.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestMatrix.as,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ASTestMatrix.as 27 May 2005 06:03:15 -0000 1.3 --- ASTestMatrix.as 27 May 2005 06:23:46 -0000 1.4 *************** *** 49,53 **** var cell:NSButtonCell = (new NSButtonCell()).initTextCell("test"); var matrix:NSMatrix = (new NSMatrix()).initWithFrameModePrototypeNumberOfRowsNumberOfColumns ! (new NSRect(10,50,270,200), org.actionstep.constants.NSMatrixMode.NSRadioModeMatrix, cell, 2, 2); --- 49,53 ---- var cell:NSButtonCell = (new NSButtonCell()).initTextCell("test"); var matrix:NSMatrix = (new NSMatrix()).initWithFrameModePrototypeNumberOfRowsNumberOfColumns ! (new NSRect(10,90,270,200), org.actionstep.constants.NSMatrixMode.NSRadioModeMatrix, cell, 2, 2); *************** *** 61,68 **** --- 61,80 ---- { matrix.addColumn(); + matrix.sizeToCells(); } target.addRow = function() { matrix.addRow(); + matrix.sizeToCells(); + } + target.removeRow = function() + { + matrix.removeRow(matrix.numberOfRows() - 1); + matrix.sizeToCells(); + } + target.removeColumn = function() + { + matrix.removeColumn(matrix.numberOfColumns() - 1); + matrix.sizeToCells(); } *************** *** 78,81 **** --- 90,105 ---- addRowButton.setAction("addRow"); view.addSubview(addRowButton); + + var remRowButton:NSButton = (new NSButton()).initWithFrame(new NSRect(120,50,100,30)); + remRowButton.setTitle("Remove Row"); + remRowButton.setTarget(target); + remRowButton.setAction("removeRow"); + view.addSubview(remRowButton); + + var remColButton:NSButton = (new NSButton()).initWithFrame(new NSRect(10,50,100,30)); + remColButton.setTitle("Remove Column"); + remColButton.setTarget(target); + remColButton.setAction("removeColumn"); + view.addSubview(remColButton); window.setContentView(view); |