From 8be53ca2b5c318c2eddda4ad6de11351b482e117 Mon Sep 17 00:00:00 2001 From: Robert Greene Date: Sun, 11 Jul 2004 15:08:23 +0000 Subject: [PATCH] Moved S-Leak to test package. --- .../applecommander/ui/swt/Sleak.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) rename {src => test}/com/webcodepro/applecommander/ui/swt/Sleak.java (89%) diff --git a/src/com/webcodepro/applecommander/ui/swt/Sleak.java b/test/com/webcodepro/applecommander/ui/swt/Sleak.java similarity index 89% rename from src/com/webcodepro/applecommander/ui/swt/Sleak.java rename to test/com/webcodepro/applecommander/ui/swt/Sleak.java index 087e24e..7e0d92b 100644 --- a/src/com/webcodepro/applecommander/ui/swt/Sleak.java +++ b/test/com/webcodepro/applecommander/ui/swt/Sleak.java @@ -72,7 +72,7 @@ public static void main (String [] args) { void open () { display = Display.getCurrent (); shell = new Shell (display); - shell.setText ("S-Leak"); + shell.setText ("S-Leak"); //$NON-NLS-1$ list = new List (shell, SWT.BORDER | SWT.V_SCROLL); list.addListener (SWT.Selection, new Listener () { public void handleEvent (Event event) { @@ -87,28 +87,28 @@ void open () { } }); check = new Button (shell, SWT.CHECK); - check.setText ("Stack"); + check.setText ("Stack"); //$NON-NLS-1$ check.addListener (SWT.Selection, new Listener () { public void handleEvent (Event e) { toggleStackTrace (); } }); start = new Button (shell, SWT.PUSH); - start.setText ("Snap"); + start.setText ("Snap"); //$NON-NLS-1$ start.addListener (SWT.Selection, new Listener () { public void handleEvent (Event event) { refreshAll (); } }); stop = new Button (shell, SWT.PUSH); - stop.setText ("Diff"); + stop.setText ("Diff"); //$NON-NLS-1$ stop.addListener (SWT.Selection, new Listener () { public void handleEvent (Event event) { refreshDifference (); } }); label = new Label (shell, SWT.BORDER); - label.setText ("0 object(s)"); + label.setText ("0 object(s)"); //$NON-NLS-1$ shell.addListener (SWT.Resize, new Listener () { public void handleEvent (Event e) { layout (); @@ -132,13 +132,13 @@ void refreshLabel () { if (object instanceof Image) images++; if (object instanceof Region) regions++; } - String string = ""; - if (colors != 0) string += colors + " Color(s)\n"; - if (cursors != 0) string += cursors + " Cursor(s)\n"; - if (fonts != 0) string += fonts + " Font(s)\n"; - if (gcs != 0) string += gcs + " GC(s)\n"; - if (images != 0) string += images + " Image(s)\n"; - if (regions != 0) string += regions + " Region(s)\n"; + String string = ""; //$NON-NLS-1$ + if (colors != 0) string += colors + " Color(s)\n"; //$NON-NLS-1$ + if (cursors != 0) string += cursors + " Cursor(s)\n"; //$NON-NLS-1$ + if (fonts != 0) string += fonts + " Font(s)\n"; //$NON-NLS-1$ + if (gcs != 0) string += gcs + " GC(s)\n"; //$NON-NLS-1$ + if (images != 0) string += images + " Image(s)\n"; //$NON-NLS-1$ + if (regions != 0) string += regions + " Region(s)\n"; //$NON-NLS-1$ if (string.length () != 0) { string = string.substring (0, string.length () - 1); } @@ -150,7 +150,7 @@ void refreshDifference () { if (!info.tracking) { MessageBox dialog = new MessageBox (shell, SWT.ICON_WARNING | SWT.OK); dialog.setText (shell.getText ()); - dialog.setMessage ("Warning: Device is not tracking resource allocation"); + dialog.setMessage ("Warning: Device is not tracking resource allocation"); //$NON-NLS-1$ dialog.open (); } Object [] newObjects = info.objects; @@ -175,7 +175,7 @@ void refreshDifference () { System.arraycopy (diffObjects, 0, objects, 0, count); System.arraycopy (diffErrors, 0, errors, 0, count); list.removeAll (); - text.setText (""); + text.setText (""); //$NON-NLS-1$ canvas.redraw (); for (int i=0; i