From: <ox-...@us...> - 2003-04-16 19:12:52
|
Update of /cvsroot/sheets/sheets In directory sc8-pr-cvs1:/tmp/cvs-serv14652 Modified Files: .sheetsrc Sheets.sheets Log Message: Fixes: * Fixed corruption in the Sheets.sheets file * Reverted the .sheetsrc file back to work on windows * Added a new feature to set the look-and-feel from the .sheetsrc file (it updates dynamically too!) * Updated the installanywhere config file Index: .sheetsrc =================================================================== RCS file: /cvsroot/sheets/sheets/.sheetsrc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** .sheetsrc 16 Apr 2003 18:00:49 -0000 1.8 --- .sheetsrc 16 Apr 2003 19:12:32 -0000 1.9 *************** *** 3,9 **** ########################################## ! set compile-command "./ant compile" ! set recompile-command "./ant clean" ! #set beep-file "d:/sheets/beep.au" #set windows-task-bar-height 0 --- 3,11 ---- ########################################## ! set compile-command "ant.bat compile" ! set recompile-command "ant.bat clean" ! # Use these instead for *nix systems ! #set compile-command "./ant compile" ! #set recompile-command "./ant clean" #set windows-task-bar-height 0 *************** *** 11,14 **** --- 13,18 ---- set web-browser "explorer.exe" + # Use this instead for *nix systems: + #set web-browser "mozilla" set sheets-documentation-url "doc/reference.html" set java-documentation-url["java.*"] "http://java.sun.com/j2se/1.4/docs/api" *************** *** 27,31 **** set context-help-delay 100 ! set graphics-anti-aliasing false set toc-width 20 set editor-width 50 --- 31,35 ---- set context-help-delay 100 ! set graphics-anti-aliasing true set toc-width 20 set editor-width 50 Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Sheets.sheets 16 Apr 2003 18:00:50 -0000 1.36 --- Sheets.sheets 16 Apr 2003 19:12:33 -0000 1.37 *************** *** 398,402 **** schin:39 schin:38 - schin:146 ram:2154 nkramer:7373 --- 398,401 ---- *************** *** 8367,8370 **** --- 8366,8370 ---- nkramer:31806 rgs:12128 + schin:1234 rgs:6292 rgs:6291 *************** *** 8390,8393 **** --- 8390,8394 ---- nkramer:1182 nkramer:1185 + schin:1235 nkramer:1549 nkramer:1195 *************** *** 8592,8595 **** --- 8593,8599 ---- } else if (name.equals("graph-font")) { setFontFamily(stream, graphFont); + } else if (name.equals("look-and-feel")) { + lookAndFeel = getString(stream); + updateLookAndFeel(); } else if (name.equals("sheet-height")) { sheetHeight = getInteger(stream); *************** *** 10372,10375 **** --- 10376,10381 ---- docFont = new FontFamily("documentation-font", "TimesRoman"); + lookAndFeel = "com.incors.plaf.kunststoff.KunststoffLookAndFeel"; + updateLookAndFeel(); int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height; // Don't ask how we got these numbers. They seem to work pretty okay. *************** *** 10772,10788 **** static Sheets.<init> { Console.status("Warming up..."); - - try { - // code to use kunststoff (gradiant metal derivative) - UIManager.setLookAndFeel(new com.incors.plaf.kunststoff.KunststoffLookAndFeel()); - // code to use slaf (simple look and feel) - // com.memoire.slaf.SlafLookAndFeel.setCurrentTheme("lothar"); - // UIManager.setLookAndFeel(new com.memoire.slaf.SlafLookAndFeel()); - // code to decorate the outer window - // JFrame.setDefaultLookAndFeelDecorated(true); - } catch (UnsupportedLookAndFeelException e) { - e.printStackTrace(); - // fail gracefully - } } object nkramer:1630 --- 10778,10781 ---- *************** *** 11790,11801 **** section exports nkramer:2281 nkramer:905 - object nkramer:2281 - pkg=org.browsecode.sheets - type=java - section text nkramer:2281 - // Pop up the query dialog with "default defaults". - public class ShowQueryDialog extends GenericShowQueryDialog - section exports nkramer:2281 - nkramer:905 object nkramer:2294 pkg=org.browsecode.sheets --- 11783,11786 ---- *************** *** 16659,16663 **** // We would like the user to know when these occur. public static final void Console.error (Object message) { ! JOptionPane.showMessageDialog(Sheets.rootWindow, message.toString(), "Error", JOptionPane.ERROR_MESSAGE); } object nkramer:5980 --- 16644,16648 ---- // We would like the user to know when these occur. public static final void Console.error (Object message) { ! JOptionPane.showMessageDialog(Sheets.getRootFrame(), message.toString(), "Error", JOptionPane.ERROR_MESSAGE); } object nkramer:5980 *************** *** 30271,30284 **** nkramer:29232 nkramer:29050 - object nkramer:29048 - pkg=org.browsecode.sheets - type=java - section text nkramer:29048 - class CopyFragmentToTempSheet extends ChangeContainerCommand - implements SpecialMultiCommand - section exports nkramer:29048 - nkramer:29049 - nkramer:29232 - nkramer:29050 object nkramer:29049 pkg=org.browsecode.sheets --- 30256,30259 ---- *************** *** 31320,31327 **** nkramer:30606 nkramer:30607 ! nkramer:2281 nkramer:30609 nkramer:30610 ! nkramer:29048 nkramer:30612 rgs:13569 --- 31295,31302 ---- nkramer:30606 nkramer:30607 ! nkramer:30608 nkramer:30609 nkramer:30610 ! nkramer:30611 nkramer:30612 rgs:13569 *************** *** 31417,31420 **** --- 31392,31408 ---- return StringSplitter.stripExtension(srcFile) + ".html"; } + object nkramer:30608 + pkg=org.browsecode.xml + type=java + section text nkramer:30608 + protected String[] DocExpert.persistenceTypes () { + return new String[] { "doc-para", "doc-source", + "doc-document", "doc-section", "doc-list", "doc-definition", + "doc-edit-command", "doc-edit-variable", + + // backwards compatibility + "xml-para", "xml-section", "xml-list", "doc-preformatted" + }; + } object nkramer:30609 pkg=org.browsecode.xml *************** *** 31470,31473 **** --- 31458,31468 ---- }; } + object nkramer:30611 + pkg=org.browsecode.xml + type=java + section text nkramer:30611 + protected Sentinel[] DocExpert.sentinels () { + return new Sentinel[] { new DocSentinel() }; + } object nkramer:30612 pkg=org.browsecode.xml *************** *** 31530,31533 **** --- 31525,31529 ---- Document doc = textToXml(text, true); if (doc != null && doc.getDoctype() != null && DOCUMENT_V11.equals(doc.getDoctype().getPublicId())) + // only parse the document if it is of the right type fragments = retrieveSubFragments(doc.getDocumentElement(), null, links, true); } *************** *** 48248,48252 **** // unintended consequences. public static final void Console.warning (Object message) { ! JOptionPane.showMessageDialog(Sheets.rootWindow, message.toString(), "Warning", JOptionPane.WARNING_MESSAGE); } object rgs:291 --- 48244,48248 ---- // unintended consequences. public static final void Console.warning (Object message) { ! JOptionPane.showMessageDialog(Sheets.getRootFrame(), message.toString(), "Warning", JOptionPane.WARNING_MESSAGE); } object rgs:291 *************** *** 68224,68227 **** --- 68220,68224 ---- slot="4">getName</link>, or <link slot="5">getInteger</link>. section links rgs:13937 + schin:1235 nkramer:1549 nkramer:1197 *************** *** 70044,70056 **** return "Java fragments " + base + " named " + fullString; } - object ram:683 - pkg=org.browsecode.sheets - type=java - section text ram:683 - class ReferencesRecord - section exports ram:683 - ram:684 - ram:685 - ram:686 object schin:0 pkg=org.browsecode.sheets --- 70041,70044 ---- *************** *** 70363,70366 **** --- 70351,70356 ---- { rootFrame.init(createRootSheet(), createContextSheet(), EditMgr.createEditSheet(), createAffectedBySheet()); + // forces the menubar to use the right L&F + SwingUtilities.updateComponentTreeUI(Sheets.getRootFrame()); rootFrame.setVisible(true); } *************** *** 71208,71217 **** return makeWindowTitle(); } - object schin:146 - pkg=org.browsecode.sheets - type=java - section text schin:146 - // The SheetFrame that the root sheet goes in. - public static SheetFrame Sheets.rootWindow = null; object schin:147 pkg=org.browsecode.sheets --- 71198,71201 ---- *************** *** 82069,82076 **** public class SimpleNodeList implements NodeList section exports schin:1185 ! ram:683 schin:1187 schin:1188 schin:1189 object schin:1187 pkg=org.browsecode.xml --- 82053,82065 ---- public class SimpleNodeList implements NodeList section exports schin:1185 ! schin:1186 schin:1187 schin:1188 schin:1189 + object schin:1186 + pkg=org.browsecode.xml + type=java + section text schin:1186 + Node SimpleNodeList.node; object schin:1187 pkg=org.browsecode.xml *************** *** 82559,82562 **** --- 82548,82575 ---- section text schin:1233 static final String DocParser.DOCUMENT_V11 = "-//APACHE//DTD Documentation V1.1//EN"; + object schin:1234 + pkg=org.browsecode.sheets + type=java + section text schin:1234 + public static String Profile.lookAndFeel; + object schin:1235 + pkg=org.browsecode.sheets + type=java + section text schin:1235 + static void Profile.updateLookAndFeel() { + try { + // recognize some constants + if (lookAndFeel.equals("system")) + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + else if (lookAndFeel.equals("cross-platform")) + UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); + else + UIManager.setLookAndFeel(lookAndFeel); + } catch (Exception e) { + // fail gracefully + } + // update the look and feel immediately + SwingUtilities.updateComponentTreeUI(Sheets.getRootFrame()); + } object sjc:1 pkg=org.browsecode.sheets.dicer *************** *** 95116,95120 **** wlott:833 schin:37 - schin:146 schin:39 schin:38 --- 95129,95132 ---- *************** *** 95813,95816 **** --- 95825,95829 ---- rgs:12128 nkramer:15093 + schin:1234 rgs:6292 rgs:6291 *************** *** 95839,95842 **** --- 95852,95856 ---- nkramer:1182 nkramer:1185 + schin:1235 nkramer:1549 nkramer:1195 |