[Jtreeview-cvs] jtreeview commit notification
Brought to you by:
alokito
From: Alok S. <al...@us...> - 2009-09-04 13:42:17
|
Update of /cvsroot/jtreeview/LinkedView/src/edu/stanford/genetics/treeview In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv390/src/edu/stanford/genetics/treeview Modified Files: TreeViewFrame.java TreeViewApp.java Log Message: aggressive storing of global config help menu item for global config error dialog on registration storage failure. Index: TreeViewApp.java =================================================================== RCS file: /cvsroot/jtreeview/LinkedView/src/edu/stanford/genetics/treeview/TreeViewApp.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TreeViewApp.java 7 Jul 2008 01:20:44 -0000 1.11 --- TreeViewApp.java 4 Sep 2009 13:42:06 -0000 1.12 *************** *** 29,32 **** --- 29,34 ---- import javax.swing.JOptionPane; import javax.swing.ToolTipManager; + import javax.swing.UIManager; + import javax.swing.UnsupportedLookAndFeelException; /** *************** *** 146,150 **** System.setProperty( "com.apple.hwaccel", "true" ); // only needed for 1.3.1 on OS X 10.2 System.setProperty( "com.apple.mrj.application.apple.menu.about.name", "TreeView" ); ! // Mac Java 1.4 System.setProperty( "apple.laf.useScreenMenuBar", "true" ); --- 148,163 ---- System.setProperty( "com.apple.hwaccel", "true" ); // only needed for 1.3.1 on OS X 10.2 System.setProperty( "com.apple.mrj.application.apple.menu.about.name", "TreeView" ); ! try { ! UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); ! } catch (ClassNotFoundException e) { ! LogBuffer.logException(e); ! } catch (InstantiationException e) { ! LogBuffer.logException(e); ! } catch (IllegalAccessException e) { ! LogBuffer.logException(e); ! } catch (UnsupportedLookAndFeelException e) { ! LogBuffer.logException(e); ! } ! // Mac Java 1.4 System.setProperty( "apple.laf.useScreenMenuBar", "true" ); *************** *** 329,333 **** * @return A system-specific guess at a global config file name. */ ! private static String globalConfigName() { // must find and construct the properties object... String dir = System.getProperty("user.home"); --- 342,346 ---- * @return A system-specific guess at a global config file name. */ ! public static String globalConfigName() { // must find and construct the properties object... String dir = System.getProperty("user.home"); Index: TreeViewFrame.java =================================================================== RCS file: /cvsroot/jtreeview/LinkedView/src/edu/stanford/genetics/treeview/TreeViewFrame.java,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** TreeViewFrame.java 6 Jul 2008 00:24:35 -0000 1.73 --- TreeViewFrame.java 4 Sep 2009 13:42:05 -0000 1.74 *************** *** 611,614 **** --- 611,615 ---- public void actionPerformed(ActionEvent actionEvent) { getApp().getPrefs().showEditor(); + getApp().getGlobalConfig().store(); } }); *************** *** 919,923 **** }); menubar.setMnemonic(KeyEvent.VK_T); ! /* This is to help debug plugin instance naming. MenuItem pluginSearch = new MenuItem("Search for instances"); --- 920,937 ---- }); menubar.setMnemonic(KeyEvent.VK_T); ! ! menubar.addMenuItem("Global Pref Info...", new ActionListener () { ! public void actionPerformed(ActionEvent e) { ! JPanel msg = new JPanel(); ! msg.add(new JLabel("Global preferences are stored in ")); ! JTextField txt = new JTextField(TreeViewApp.globalConfigName()); ! txt.setEditable(false); ! msg.add(txt); ! JOptionPane.showMessageDialog(TreeViewFrame.this, ! msg, ! "About...", JOptionPane.INFORMATION_MESSAGE); ! } ! }); ! /* This is to help debug plugin instance naming. MenuItem pluginSearch = new MenuItem("Search for instances"); |