comparison agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpot.java @ 1385:bc32f286fae0

6945219: minor SA fixes Reviewed-by: twisti
author never
date Tue, 20 Apr 2010 13:26:33 -0700
parents a61af66fc99e
children c18cbe5936b8
comparison
equal deleted inserted replaced
1384:c544d979f886 1385:bc32f286fae0
1 /* 1 /*
2 * Copyright 2001-2003 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 2001-2010 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
292 addFrame(attachDialog); 292 addFrame(attachDialog);
293 attachDialog.pack(); 293 attachDialog.pack();
294 attachDialog.setSize(400, 300); 294 attachDialog.setSize(400, 300);
295 GraphicsUtilities.centerInContainer(attachDialog.getComponent(), 295 GraphicsUtilities.centerInContainer(attachDialog.getComponent(),
296 getParentDimension(attachDialog.getComponent())); 296 getParentDimension(attachDialog.getComponent()));
297 attachDialog.show(); 297 attachDialog.setVisible(true);
298 } 298 }
299 299
300 public void showThreadsDialog() { 300 public void showThreadsDialog() {
301 final FrameWrapper threadsDialog = newFrame("Threads"); 301 final FrameWrapper threadsDialog = newFrame("Threads");
302 threadsDialog.getContentPane().setLayout(new BorderLayout()); 302 threadsDialog.getContentPane().setLayout(new BorderLayout());
319 3.0f, 319 3.0f,
320 0.9f, 320 0.9f,
321 getParentDimension(threadsDialog.getComponent())); 321 getParentDimension(threadsDialog.getComponent()));
322 GraphicsUtilities.centerInContainer(threadsDialog.getComponent(), 322 GraphicsUtilities.centerInContainer(threadsDialog.getComponent(),
323 getParentDimension(threadsDialog.getComponent())); 323 getParentDimension(threadsDialog.getComponent()));
324 threadsDialog.show(); 324 threadsDialog.setVisible(true);
325 } 325 }
326 326
327 public void showMemoryDialog() { 327 public void showMemoryDialog() {
328 final FrameWrapper memoryDialog = newFrame("Memory"); 328 final FrameWrapper memoryDialog = newFrame("Memory");
329 memoryDialog.getContentPane().setLayout(new BorderLayout()); 329 memoryDialog.getContentPane().setLayout(new BorderLayout());
339 1.0f, 339 1.0f,
340 0.7f, 340 0.7f,
341 getParentDimension(memoryDialog.getComponent())); 341 getParentDimension(memoryDialog.getComponent()));
342 GraphicsUtilities.centerInContainer(memoryDialog.getComponent(), 342 GraphicsUtilities.centerInContainer(memoryDialog.getComponent(),
343 getParentDimension(memoryDialog.getComponent())); 343 getParentDimension(memoryDialog.getComponent()));
344 memoryDialog.show(); 344 memoryDialog.setVisible(true);
345 } 345 }
346 346
347 /** Changes the editor factory this debugger uses to display source 347 /** Changes the editor factory this debugger uses to display source
348 code. Specified factory may be null, in which case the default 348 code. Specified factory may be null, in which case the default
349 factory is used. */ 349 factory is used. */
528 stackFrame.setResizable(true); 528 stackFrame.setResizable(true);
529 stackFrame.setClosable(false); 529 stackFrame.setClosable(false);
530 addFrame(stackFrame); 530 addFrame(stackFrame);
531 stackFrame.setSize(400, 200); 531 stackFrame.setSize(400, 200);
532 GraphicsUtilities.moveToInContainer(stackFrame.getComponent(), 0.0f, 1.0f, 0, 20); 532 GraphicsUtilities.moveToInContainer(stackFrame.getComponent(), 0.0f, 1.0f, 0, 20);
533 stackFrame.show(); 533 stackFrame.setVisible(true);
534 534
535 // Create register panel 535 // Create register panel
536 registerPanel = new RegisterPanel(); 536 registerPanel = new RegisterPanel();
537 registerPanel.setFont(fixedWidthFont); 537 registerPanel.setFont(fixedWidthFont);
538 registerFrame = newFrame("Registers"); 538 registerFrame = newFrame("Registers");
542 registerFrame.setResizable(true); 542 registerFrame.setResizable(true);
543 registerFrame.setClosable(false); 543 registerFrame.setClosable(false);
544 registerFrame.setSize(225, 200); 544 registerFrame.setSize(225, 200);
545 GraphicsUtilities.moveToInContainer(registerFrame.getComponent(), 545 GraphicsUtilities.moveToInContainer(registerFrame.getComponent(),
546 1.0f, 0.0f, 0, 0); 546 1.0f, 0.0f, 0, 0);
547 registerFrame.show(); 547 registerFrame.setVisible(true);
548 548
549 resetCurrentThread(); 549 resetCurrentThread();
550 } catch (DebuggerException e) { 550 } catch (DebuggerException e) {
551 final String errMsg = formatMessage(e.getMessage(), 80); 551 final String errMsg = formatMessage(e.getMessage(), 80);
552 setMenuItemsEnabled(attachMenuItems, true); 552 setMenuItemsEnabled(attachMenuItems, true);
977 addFrame(editorFrame); 977 addFrame(editorFrame);
978 GraphicsUtilities.reshapeToAspectRatio(editorFrame.getComponent(), 978 GraphicsUtilities.reshapeToAspectRatio(editorFrame.getComponent(),
979 1.0f, 979 1.0f,
980 0.85f, 980 0.85f,
981 getParentDimension(editorFrame.getComponent())); 981 getParentDimension(editorFrame.getComponent()));
982 editorFrame.show(); 982 editorFrame.setVisible(true);
983 shown = true; 983 shown = true;
984 } 984 }
985 code.showLineNumber(lineNo); 985 code.showLineNumber(lineNo);
986 editorFrame.toFront(); 986 editorFrame.toFront();
987 } 987 }