Changeset 399
- Timestamp:
- 08/10/10 18:46:20 (1 year ago)
- Files:
-
- kahina/trunk/src/org/kahina/core/KahinaInstance.java (modified) (6 diffs)
- kahina/trunk/src/org/kahina/core/gui/KahinaMainWindow.java (modified) (2 diffs)
- kahina/trunk/src/org/kahina/core/gui/profiler/KahinaProfilerMenu.java (added)
- kahina/trunk/src/org/kahina/core/util/KahinaSwingUtilities.java (moved) (moved from kahina/trunk/src/org/kahina/core/util/SwingUtilities.java) (2 diffs)
- kahina/trunk/src/org/kahina/core/visual/dag/KahinaDAGViewPanel.java (modified) (2 diffs)
- kahina/trunk/src/org/kahina/core/visual/tree/KahinaTreeViewPanel.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
kahina/trunk/src/org/kahina/core/KahinaInstance.java
r390 r399 31 31 import org.kahina.core.util.FileUtilities; 32 32 import org.kahina.core.util.ProgressMonitorWrapper; 33 import org.kahina.core.util. SwingUtilities;33 import org.kahina.core.util.KahinaSwingUtilities; 34 34 import org.kahina.core.visual.KahinaDefaultView; 35 35 import org.kahina.core.visual.source.KahinaSourceCodeView; … … 162 162 } catch (Exception e) 163 163 { 164 gui.showMessageDialog( SwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE);164 gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 165 165 return; 166 166 } finally … … 174 174 } catch (IOException e) 175 175 { 176 gui.showMessageDialog( SwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE);176 gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be loaded due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 177 177 } 178 178 } … … 194 194 } catch (IOException e) 195 195 { 196 gui.showMessageDialog( SwingUtilities.visualError("Session could not be saved due to the following problem:", e), "Error", JOptionPane.ERROR_MESSAGE);196 gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be saved due to the following problem:", e), "Error", JOptionPane.ERROR_MESSAGE); 197 197 return; 198 198 } … … 233 233 { 234 234 monitor.close(); 235 gui.showMessageDialog( SwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE);235 gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 236 236 } finally 237 237 { … … 243 243 } catch (IOException e) 244 244 { 245 gui.showMessageDialog( SwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE);245 gui.showMessageDialog(KahinaSwingUtilities.visualError("Session could not be saved due to the following problem: ", e), "Error", JOptionPane.ERROR_MESSAGE); 246 246 } 247 247 } kahina/trunk/src/org/kahina/core/gui/KahinaMainWindow.java
r392 r399 15 15 import org.kahina.core.event.KahinaTreeEvent; 16 16 import org.kahina.core.event.KahinaTreeEventType; 17 import org.kahina.core.gui.profiler.KahinaProfilerMenu; 17 18 18 19 public class KahinaMainWindow extends KahinaWindow implements KahinaListener … … 38 39 menuBar.add(new KahinaParseMenu()); 39 40 menuBar.add(new KahinaBreakpointMenu()); 41 menuBar.add(new KahinaProfilerMenu()); 40 42 menuBar.add(new KahinaHelpMenu()); 41 43 this.setJMenuBar(menuBar); kahina/trunk/src/org/kahina/core/util/KahinaSwingUtilities.java
r373 r399 2 2 3 3 import java.awt.Point; 4 import java.awt.event.ActionListener; 4 5 6 import javax.swing.JMenuItem; 5 7 import javax.swing.JScrollPane; 6 8 import javax.swing.JTextArea; 7 9 import javax.swing.JViewport; 8 10 9 public class SwingUtilities11 public class KahinaSwingUtilities 10 12 { 11 13 public static void scrollToCenter(JScrollPane scrollPane, int x, int y) … … 36 38 return new Object[] { message, new JScrollPane(new JTextArea(Utilities.join(System.getProperty("line.separator"), Utilities.portrayStackTrace(t)), 20, 80)) }; 37 39 } 40 41 public static JMenuItem createMenuItem(String text, String actionCommand, ActionListener actionListener) 42 { 43 JMenuItem result = new JMenuItem(text); 44 result.setActionCommand(actionCommand); 45 result.addActionListener(actionListener); 46 return result; 47 } 38 48 } kahina/trunk/src/org/kahina/core/visual/dag/KahinaDAGViewPanel.java
r357 r399 15 15 import javax.swing.JScrollPane; 16 16 17 import org.kahina.core.util. SwingUtilities;17 import org.kahina.core.util.KahinaSwingUtilities; 18 18 import org.kahina.core.visual.KahinaViewPanel; 19 19 import org.kahina.core.visual.tree.KahinaTreeView; … … 324 324 else 325 325 { 326 SwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID));326 KahinaSwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID)); 327 327 } 328 328 } kahina/trunk/src/org/kahina/core/visual/tree/KahinaTreeViewPanel.java
r314 r399 15 15 import javax.swing.JScrollPane; 16 16 17 import org.kahina.core.util. SwingUtilities;17 import org.kahina.core.util.KahinaSwingUtilities; 18 18 import org.kahina.core.visual.KahinaViewPanel; 19 19 … … 467 467 else 468 468 { 469 SwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID));469 KahinaSwingUtilities.scrollToCenter((JScrollPane) parent, view.getNodeX(nodeID), view.getNodeY(nodeID)); 470 470 } 471 471 }
