From 000ab2153f14c7c4b075c2a60c5df66290722ec8 Mon Sep 17 00:00:00 2001 From: skylarmt Date: Fri, 12 Dec 2014 01:46:11 -0700 Subject: [PATCH] Add themes, display settings, needed icons --- build.xml | 52 ++-- nbproject/build-impl.xml | 122 +++++----- nbproject/build-native.xml | 144 +++++++---- src/net/apocalypselabs/symat/CodeEditor.form | 22 +- src/net/apocalypselabs/symat/CodeEditor.java | 79 +++--- src/net/apocalypselabs/symat/Debug.java | 15 +- src/net/apocalypselabs/symat/Display.form | 210 ++++++++++++++++ src/net/apocalypselabs/symat/Display.java | 228 ++++++++++++++++++ src/net/apocalypselabs/symat/Functions.java | 81 +++---- src/net/apocalypselabs/symat/Graph.java | 2 +- src/net/apocalypselabs/symat/Help.form | 3 +- src/net/apocalypselabs/symat/Help.java | 33 ++- src/net/apocalypselabs/symat/Interpreter.form | 44 +--- src/net/apocalypselabs/symat/Interpreter.java | 141 +++++------ src/net/apocalypselabs/symat/MainGUI.form | 70 ++++-- src/net/apocalypselabs/symat/MainGUI.java | 122 +++++++--- src/net/apocalypselabs/symat/PrefStorage.java | 12 +- .../apocalypselabs/symat/PrettifyToHtml.java | 164 +++++++------ .../apocalypselabs/symat/TextLineNumber.java | 22 +- src/net/apocalypselabs/symat/Update.java | 4 +- src/net/apocalypselabs/symat/cascade.png | Bin 0 -> 920 bytes src/net/apocalypselabs/symat/display.png | Bin 0 -> 1133 bytes src/net/apocalypselabs/symat/icon16.png | Bin 0 -> 488 bytes .../apocalypselabs/symat/icons/settings.png | Bin 0 -> 705 bytes src/net/apocalypselabs/symat/pretty.css | 2 +- 25 files changed, 1076 insertions(+), 496 deletions(-) create mode 100644 src/net/apocalypselabs/symat/Display.form create mode 100644 src/net/apocalypselabs/symat/Display.java create mode 100644 src/net/apocalypselabs/symat/cascade.png create mode 100644 src/net/apocalypselabs/symat/display.png create mode 100644 src/net/apocalypselabs/symat/icon16.png create mode 100644 src/net/apocalypselabs/symat/icons/settings.png diff --git a/build.xml b/build.xml index 242c7fc..e38d337 100644 --- a/build.xml +++ b/build.xml @@ -90,30 +90,30 @@ unless: nbproject/build-impl.xml file. --> - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try (HAXX): - - java -jar "${dist.jar.resolved}" - - - + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try (HAXX): + + java -jar "${dist.jar.resolved}" + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index fb4f4c9..85bdcdd 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -18,7 +18,7 @@ is divided into following sections: - applet - cleanup - --> +--> @@ -30,10 +30,10 @@ is divided into following sections: + ====================== + INITIALIZATION SECTION + ====================== + --> @@ -694,8 +694,8 @@ is divided into following sections: + pre NB7.2 profiling section; consider it deprecated + --> @@ -742,8 +742,8 @@ is divided into following sections: Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + end of pre NB7.2 profiling section + --> @@ -903,10 +903,10 @@ is divided into following sections: + =================== + COMPILATION SECTION + =================== + --> @@ -977,10 +977,10 @@ is divided into following sections: + ==================== + JAR BUILDING SECTION + ==================== + --> @@ -1051,10 +1051,10 @@ is divided into following sections: + ================= + EXECUTION SECTION + ================= + --> @@ -1074,10 +1074,10 @@ is divided into following sections: + ================= + DEBUGGING SECTION + ================= + --> @@ -1115,13 +1115,13 @@ is divided into following sections: + ================= + PROFILING SECTION + ================= + --> + pre NB7.2 profiler integration + --> This target only works when run from inside the NetBeans IDE. @@ -1178,8 +1178,8 @@ is divided into following sections: + end of pre NB72 profiling section + --> @@ -1214,10 +1214,10 @@ is divided into following sections: + =============== + JAVADOC SECTION + =============== + --> @@ -1258,10 +1258,10 @@ is divided into following sections: + ========================= + TEST COMPILATION SECTION + ========================= + --> @@ -1301,10 +1301,10 @@ is divided into following sections: + ======================= + TEST EXECUTION SECTION + ======================= + --> @@ -1338,10 +1338,10 @@ is divided into following sections: + ======================= + TEST DEBUGGING SECTION + ======================= + --> Must select one file in the IDE or set test.class @@ -1361,10 +1361,10 @@ is divided into following sections: + ========================= + APPLET EXECUTION SECTION + ========================= + --> Must select one file in the IDE or set applet.url @@ -1374,10 +1374,10 @@ is divided into following sections: + ========================= + APPLET DEBUGGING SECTION + ========================= + --> Must select one file in the IDE or set applet.url @@ -1388,10 +1388,10 @@ is divided into following sections: + =============== + CLEANUP SECTION + =============== + --> diff --git a/nbproject/build-native.xml b/nbproject/build-native.xml index 75448ad..b40fd54 100644 --- a/nbproject/build-native.xml +++ b/nbproject/build-native.xml @@ -67,7 +67,7 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + @@ -89,19 +89,27 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + - + + + - - + + + + + + @@ -112,7 +120,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -123,7 +133,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -134,7 +146,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -145,7 +159,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -156,7 +172,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -167,7 +185,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -178,7 +198,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -190,7 +212,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -202,7 +226,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -214,7 +240,9 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - + + + @@ -230,8 +258,8 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. + uri="javafx:com.sun.javafx.tools.ant" + classpath="${javafx.ant.classpath}"/> @@ -369,13 +397,23 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - - - - - - - + + + + + + + + + + + + + + + + + @@ -389,11 +427,17 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - - - - - + + + + + + + + + + + @@ -403,12 +447,16 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - - - - - - + + + + + + + + + + @@ -418,12 +466,16 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. - - - - - - + + + + + + + + + + @@ -462,11 +514,11 @@ Portions Copyrighted 2013 Sun Microsystems, Inc. self.addMappedName( - (source.indexOf("jfxrt.jar") >= 0) || - (source.indexOf("deploy.jar") >= 0) || - (source.indexOf("javaws.jar") >= 0) || - (source.indexOf("plugin.jar") >= 0) - ? "" : source + (source.indexOf("jfxrt.jar") >= 0) || + (source.indexOf("deploy.jar") >= 0) || + (source.indexOf("javaws.jar") >= 0) || + (source.indexOf("plugin.jar") >= 0) + ? "" : source ); diff --git a/src/net/apocalypselabs/symat/CodeEditor.form b/src/net/apocalypselabs/symat/CodeEditor.form index 5012e17..1aab7b2 100644 --- a/src/net/apocalypselabs/symat/CodeEditor.form +++ b/src/net/apocalypselabs/symat/CodeEditor.form @@ -91,14 +91,6 @@ - - - - - - - - @@ -177,15 +169,14 @@ - + - - + @@ -194,6 +185,7 @@ + @@ -229,7 +221,7 @@ - + @@ -247,11 +239,13 @@ - + - + + + diff --git a/src/net/apocalypselabs/symat/CodeEditor.java b/src/net/apocalypselabs/symat/CodeEditor.java index 2353efc..479d818 100644 --- a/src/net/apocalypselabs/symat/CodeEditor.java +++ b/src/net/apocalypselabs/symat/CodeEditor.java @@ -27,6 +27,7 @@ */ package net.apocalypselabs.symat; +import java.awt.Color; import java.awt.Font; import java.io.File; import java.io.FileOutputStream; @@ -36,12 +37,11 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextPane; +import javax.swing.UIDefaults; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.text.AttributeSet; @@ -77,10 +77,24 @@ public class CodeEditor extends javax.swing.JInternalFrame { fc.addChoosableFileFilter(filter); int font_size = 12; try { - font_size = Integer.valueOf(PrefStorage.getSetting("editor-fontsize")); + font_size = Integer.valueOf(PrefStorage.getSetting("editfont")); } catch (Exception ex) { } codeBox.setFont(new Font(Font.MONOSPACED, Font.PLAIN, font_size)); + outputBox.setFont(new Font(Font.MONOSPACED, Font.PLAIN, font_size)); + if (PrefStorage.getSetting("theme").equals("dark")) { + setBackgroundOfEditor(Color.BLACK); + codeBox.setForeground(Color.WHITE); + outputBox.setBackground(Color.BLACK); + outputBox.setForeground(Color.WHITE); + setBackground(Color.DARK_GRAY); + } else { + setBackgroundOfEditor(Color.WHITE); + codeBox.setForeground(Color.BLACK); + outputBox.setBackground(Color.WHITE); + outputBox.setForeground(Color.BLACK); + setBackground(Color.LIGHT_GRAY); + } TabStop[] tabs = new TabStop[30]; for (int i = 0; i < tabs.length; i++) { tabs[i] = new TabStop(15 * i, TabStop.ALIGN_RIGHT, TabStop.LEAD_NONE); @@ -97,6 +111,14 @@ public class CodeEditor extends javax.swing.JInternalFrame { codeBox.requestFocus(); } + private void setBackgroundOfEditor(Color c) { + UIDefaults defaults = new UIDefaults(); + defaults.put("TextPane[Enabled].backgroundPainter", c); + codeBox.putClientProperty("Nimbus.Overrides", defaults); + codeBox.putClientProperty("Nimbus.Overrides.InheritDefaults", true); + codeBox.setBackground(c); + } + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -116,7 +138,7 @@ public class CodeEditor extends javax.swing.JInternalFrame { jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); - outputPane = new javax.swing.JTextArea(); + outputBox = new javax.swing.JTextArea(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); @@ -125,7 +147,6 @@ public class CodeEditor extends javax.swing.JInternalFrame { jMenuItem8 = new javax.swing.JMenuItem(); jMenu5 = new javax.swing.JMenu(); jMenuItem6 = new javax.swing.JMenuItem(); - jMenuItem7 = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); jMenuItem5 = new javax.swing.JMenuItem(); @@ -145,20 +166,22 @@ public class CodeEditor extends javax.swing.JInternalFrame { setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/editor.png"))); // NOI18N setMinimumSize(new java.awt.Dimension(125, 50)); - jSplitPane1.setDividerLocation(275); - jSplitPane1.setDividerSize(3); + jSplitPane1.setDividerLocation(220); jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane1.setResizeWeight(0.7); + scrollPane.setOpaque(false); scrollPane.setRequestFocusEnabled(false); jSplitPane1.setTopComponent(scrollPane); jLabel1.setText("Output:"); - outputPane.setEditable(false); - outputPane.setColumns(20); - outputPane.setRows(5); - jScrollPane1.setViewportView(outputPane); + outputBox.setEditable(false); + outputBox.setColumns(20); + outputBox.setLineWrap(true); + outputBox.setRows(3); + outputBox.setWrapStyleWord(true); + jScrollPane1.setViewportView(outputBox); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); @@ -174,7 +197,7 @@ public class CodeEditor extends javax.swing.JInternalFrame { .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE)) ); jSplitPane1.setRightComponent(jPanel2); @@ -187,7 +210,7 @@ public class CodeEditor extends javax.swing.JInternalFrame { ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE) + .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE) ); jMenu1.setText("File"); @@ -240,14 +263,6 @@ public class CodeEditor extends javax.swing.JInternalFrame { }); jMenu5.add(jMenuItem6); - jMenuItem7.setText("Font size..."); - jMenuItem7.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jMenuItem7ActionPerformed(evt); - } - }); - jMenu5.add(jMenuItem7); - jMenuBar1.add(jMenu5); jMenu2.setText("Run"); @@ -352,31 +367,16 @@ public class CodeEditor extends javax.swing.JInternalFrame { CodeRunner cr = new CodeRunner(); Object result = cr.evalString(codeBox.getText()); try { - outputPane.append(result.toString() + "\n"); + outputBox.append(result.toString() + "\n"); } catch (NullPointerException ex) { } }//GEN-LAST:event_jMenuItem5ActionPerformed private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed - outputPane.setText(""); + outputBox.setText(""); }//GEN-LAST:event_jMenuItem6ActionPerformed - private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed - try { - int size = Integer.parseInt(JOptionPane.showInternalInputDialog(this, - "New font size (8-36):", - "Font Size", - JOptionPane.QUESTION_MESSAGE)); - if (size >= 8 && size <= 36) { - codeBox.setFont(new Font(Font.MONOSPACED, Font.PLAIN, size)); - PrefStorage.saveSetting("editor-fontsize", size + ""); - } - } catch (Exception ex) { - - } - }//GEN-LAST:event_jMenuItem7ActionPerformed - private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed CodeExport ce = new CodeExport(codeBox.getText()); MainGUI.loadFrame(ce); @@ -431,13 +431,12 @@ public class CodeEditor extends javax.swing.JInternalFrame { private javax.swing.JMenuItem jMenuItem4; private javax.swing.JMenuItem jMenuItem5; private javax.swing.JMenuItem jMenuItem6; - private javax.swing.JMenuItem jMenuItem7; private javax.swing.JMenuItem jMenuItem8; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSplitPane jSplitPane1; - private javax.swing.JTextArea outputPane; + private javax.swing.JTextArea outputBox; private javax.swing.JScrollPane scrollPane; // End of variables declaration//GEN-END:variables } diff --git a/src/net/apocalypselabs/symat/Debug.java b/src/net/apocalypselabs/symat/Debug.java index 92fa11f..5e11355 100644 --- a/src/net/apocalypselabs/symat/Debug.java +++ b/src/net/apocalypselabs/symat/Debug.java @@ -29,18 +29,23 @@ package net.apocalypselabs.symat; /** * This class handles DEBUG logging, so it's easy to disable. - * + * * @author Skylar */ public class Debug { + // If output should be on or off public static final boolean DEBUG = true; - + public static void println(Object data) { - if (DEBUG) System.out.println(data); + if (DEBUG) { + System.out.println(data); + } } - + public static void printerr(Object data) { - if (DEBUG) System.err.println(data); + if (DEBUG) { + System.err.println(data); + } } } diff --git a/src/net/apocalypselabs/symat/Display.form b/src/net/apocalypselabs/symat/Display.form new file mode 100644 index 0000000..da04521 --- /dev/null +++ b/src/net/apocalypselabs/symat/Display.form @@ -0,0 +1,210 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/net/apocalypselabs/symat/Display.java b/src/net/apocalypselabs/symat/Display.java new file mode 100644 index 0000000..74f1e32 --- /dev/null +++ b/src/net/apocalypselabs/symat/Display.java @@ -0,0 +1,228 @@ +/* + * Apocalypse Laboratories + * Open Source License + * + * Source code can be used for any purpose, as long as: + * - Compiled binaries are rebranded and trademarks are not + * visible by the end user at any time, except to give + * credit to Apocalypse Laboratories, such as by showing + * "Based on by Apocalypse Laboratories" or a + * similar notice; + * - You do not use the code for evil; + * - Rebranded compiled applications have significant + * differences in functionality; + * - and you provide your modified source code for download, + * under the terms of the GNU LGPL v3 or a comparable + * license. + * + * Compiled binaries cannot be redistributed or mirrored, + * unless: + * - You have written permission from Apocalypse Laboratories; + * - Downloads are not available from Apocalypse Laboratories, + * not even behind a paywall or other blocking mechanism; + * - or you have received a multi-computer license, in which + * case you should take measures to prevent unauthorized + * downloads, such as preventing download access from the + * Internet. + */ +package net.apocalypselabs.symat; + +/** + * + * @author Skylar + */ +public class Display extends javax.swing.JInternalFrame { + + /** + * Creates new form Display + */ + public Display() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + themeGroup = new javax.swing.ButtonGroup(); + jPanel1 = new javax.swing.JPanel(); + themeLight = new javax.swing.JRadioButton(); + themeDark = new javax.swing.JRadioButton(); + jPanel2 = new javax.swing.JPanel(); + fontSizeBox = new javax.swing.JComboBox(); + jLabel1 = new javax.swing.JLabel(); + saveBtn = new javax.swing.JButton(); + cancelBtn = new javax.swing.JButton(); + + setClosable(true); + setIconifiable(true); + setTitle("Display Settings"); + setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/settings.png"))); // NOI18N + addComponentListener(new java.awt.event.ComponentAdapter() { + public void componentShown(java.awt.event.ComponentEvent evt) { + formComponentShown(evt); + } + }); + + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Theme")); + jPanel1.setToolTipText("Change the UI theme."); + + themeGroup.add(themeLight); + themeLight.setSelected(true); + themeLight.setText("Light"); + + themeGroup.add(themeDark); + themeDark.setText("Dark"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(themeLight) + .addComponent(themeDark)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(themeLight) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(themeDark) + .addContainerGap(51, Short.MAX_VALUE)) + ); + + jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Font")); + jPanel2.setToolTipText("Change the default font for the editor and shell."); + + fontSizeBox.setEditable(true); + fontSizeBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "8", "9", "10", "11", "12", "14", "16", "18", "20", "22", "24" })); + + jLabel1.setText("Font Size (pt): "); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(fontSizeBox, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(125, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(fontSizeBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + saveBtn.setText("Save"); + saveBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + saveBtnActionPerformed(evt); + } + }); + + cancelBtn.setText("Cancel"); + cancelBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cancelBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(cancelBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(saveBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(42, 42, 42) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(saveBtn) + .addComponent(cancelBtn))) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void cancelBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelBtnActionPerformed + dispose(); + }//GEN-LAST:event_cancelBtnActionPerformed + + private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown + if (PrefStorage.isset("editfont")) { + fontSizeBox.setSelectedItem(PrefStorage.getSetting("editfont")); + } + if (PrefStorage.isset("theme")) { + switch (PrefStorage.getSetting("theme")) { + case "light": + themeLight.setSelected(true); + themeDark.setSelected(false); + break; + case "dark": + themeLight.setSelected(false); + themeDark.setSelected(true); + break; + default: + themeLight.setSelected(true); + themeDark.setSelected(false); + } + } + }//GEN-LAST:event_formComponentShown + + private void saveBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveBtnActionPerformed + PrefStorage.saveSetting("editfont", fontSizeBox.getSelectedItem().toString()); + if (themeDark.isSelected()) { + PrefStorage.saveSetting("theme", "dark"); + } else { + PrefStorage.saveSetting("theme", "light"); + } + MainGUI.updateDisplay(); + dispose(); + }//GEN-LAST:event_saveBtnActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton cancelBtn; + private javax.swing.JComboBox fontSizeBox; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JButton saveBtn; + private javax.swing.JRadioButton themeDark; + private javax.swing.ButtonGroup themeGroup; + private javax.swing.JRadioButton themeLight; + // End of variables declaration//GEN-END:variables +} diff --git a/src/net/apocalypselabs/symat/Functions.java b/src/net/apocalypselabs/symat/Functions.java index ada563f..9dcec7f 100644 --- a/src/net/apocalypselabs/symat/Functions.java +++ b/src/net/apocalypselabs/symat/Functions.java @@ -33,127 +33,124 @@ import org.matheclipse.parser.client.math.MathException; /** * These functions are accessible from JavaScript. - * + * * There are a lot of aliases in here too. - * + * * @author Skylar */ public class Functions { + EvalUtilities util = new EvalUtilities(false, true); Graph graphwin = new Graph(true); - + /* - Useful interactions - */ + Useful interactions + */ public void notify(Object message) { JOptionPane.showInternalMessageDialog(MainGUI.mainPane, message.toString()); } - + public String ask(String question) { return JOptionPane.showInternalInputDialog(MainGUI.mainPane, question); } - + public void write(String content) { // TODO: enable output logging } - - + /* - Math commands - */ + Math commands + */ public String d(String function, String idv) { - return util.evaluate("diff("+function+","+idv+")").toString(); + return util.evaluate("diff(" + function + "," + idv + ")").toString(); } - + public String sym(String input) { return util.evaluate(input).toString(); } - + // Shortcut for non-JS math evaluation. public String $(String input) { return sym(input); } - - + public String replace(String function, String variable, String newvar) { return function.replaceAll(variable, newvar); } - + public double subs(String function, String variable, String newvar) { return numof(function.replaceAll(variable, newvar)); } - + public double numof(String f) { try { - return Double.parseDouble(util.evaluate("N("+f+")").toString()); + return Double.parseDouble(util.evaluate("N(" + f + ")").toString()); } catch (MathException | NumberFormatException ex) { return 0.0; } } - + /* - Graphing interfaces - */ + Graphing interfaces + */ public void plot(String function) { graphwin.setVisible(true); graphwin.graphFunction(function); } - + public void ezplot(String f) { plot(f); } - + public void graph(String f) { plot(f); } - + public void plotname(String t) { graphwin.setVisible(true); graphwin.setWindowTitle(t); } - + public String plotname() { return graphwin.getTitle(); } - + public void plotclr() { graphwin.clearDraw(); } - + public void clearplot() { plotclr(); } - + public void plotclear() { plotclr(); } - + public void plotscale(int level) { graphwin.setVisible(true); graphwin.setZoom(level); } - + public void drawdot(double x, double y) { graphwin.setVisible(true); graphwin.drawDot(x, y); } - - + /* - Other - */ - + Other + */ public String sysinfo() { String info = "==Java System Information==\n"; - info += "Java version: "+System.getProperty("java.version"); - info += "\nJava vendor: "+System.getProperty("java.vendor"); - info += "\nJava home: "+System.getProperty("java.home"); + info += "Java version: " + System.getProperty("java.version"); + info += "\nJava vendor: " + System.getProperty("java.vendor"); + info += "\nJava home: " + System.getProperty("java.home"); return info; } - + /* - Constructor. - */ + Constructor. + */ public Functions() { MainGUI.mainPane.add(graphwin); } diff --git a/src/net/apocalypselabs/symat/Graph.java b/src/net/apocalypselabs/symat/Graph.java index 1b91b3c..42cbf8d 100644 --- a/src/net/apocalypselabs/symat/Graph.java +++ b/src/net/apocalypselabs/symat/Graph.java @@ -384,7 +384,7 @@ public class Graph extends javax.swing.JInternalFrame { private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed try { - int size = Integer.parseInt(JOptionPane.showInternalInputDialog(this, + int size = Integer.parseInt(JOptionPane.showInternalInputDialog(this, "Graph scale, -1 to 3 (-1 least detail, 3 most detail):", "Scale", JOptionPane.QUESTION_MESSAGE)); diff --git a/src/net/apocalypselabs/symat/Help.form b/src/net/apocalypselabs/symat/Help.form index 46d7b95..c6059e1 100644 --- a/src/net/apocalypselabs/symat/Help.form +++ b/src/net/apocalypselabs/symat/Help.form @@ -6,7 +6,7 @@ - + @@ -76,6 +76,7 @@ + diff --git a/src/net/apocalypselabs/symat/Help.java b/src/net/apocalypselabs/symat/Help.java index ff43a4c..4430a27 100644 --- a/src/net/apocalypselabs/symat/Help.java +++ b/src/net/apocalypselabs/symat/Help.java @@ -27,8 +27,10 @@ */ package net.apocalypselabs.symat; +import java.awt.Color; import java.io.BufferedReader; import java.io.InputStreamReader; +import javax.swing.UIDefaults; /** * @@ -41,6 +43,27 @@ public class Help extends javax.swing.JInternalFrame { */ public Help() { initComponents(); + if (PrefStorage.getSetting("theme").equals("dark")) { + setBackgroundOfBrowser(Color.BLACK); + setBackgroundOfBrowser(Color.WHITE); + topicList.setBackground(Color.BLACK); + topicList.setForeground(Color.WHITE); + setBackground(Color.DARK_GRAY); + } else { + setBackgroundOfBrowser(Color.WHITE); + setBackgroundOfBrowser(Color.BLACK); + topicList.setBackground(Color.WHITE); + topicList.setForeground(Color.BLACK); + setBackground(Color.LIGHT_GRAY); + } + } + + private void setBackgroundOfBrowser(Color c) { + UIDefaults defaults = new UIDefaults(); + defaults.put("EditorPane.backgroundPainter", c); + topicBrowser.putClientProperty("Nimbus.Overrides", defaults); + topicBrowser.putClientProperty("Nimbus.Overrides.InheritDefaults", true); + topicBrowser.setBackground(c); } public void loadTopic(String name) { @@ -49,18 +72,19 @@ public class Help extends javax.swing.JInternalFrame { BufferedReader reader = new BufferedReader( new InputStreamReader( CodeRunner.class - .getResourceAsStream("help/"+name+".html"))); + .getResourceAsStream("help/" + name + ".html"))); String line; while ((line = reader.readLine()) != null) { text += line; } topicBrowser.setText(text); topicBrowser.setCaretPosition(0); + setTitle("Manual (" + topicList.getSelectedValue().toString() + ")"); } catch (Exception e) { //JOptionPane.showInternalMessageDialog(MainGUI.mainPane, //"Error: Cannot load help topic "+name+".\n\n"+e.getMessage()); topicBrowser.setText("

Error:
Cannot get help topic \"" - +name+"\".
("+e.getMessage()+")

"); + + name + "\".
(" + e.getMessage() + ")

"); } } @@ -83,7 +107,7 @@ public class Help extends javax.swing.JInternalFrame { setIconifiable(true); setMaximizable(true); setResizable(true); - setTitle("Help"); + setTitle("Manual"); setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/help.png"))); // NOI18N addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { @@ -101,6 +125,7 @@ public class Help extends javax.swing.JInternalFrame { public Object getElementAt(int i) { return strings[i]; } }); topicList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); + topicList.setSelectedIndex(0); topicList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { topicListValueChanged(evt); @@ -136,10 +161,10 @@ public class Help extends javax.swing.JInternalFrame { }//GEN-LAST:event_topicListValueChanged private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown + topicList.setSelectedIndex(0); loadTopic("welcome"); }//GEN-LAST:event_formComponentShown - // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; diff --git a/src/net/apocalypselabs/symat/Interpreter.form b/src/net/apocalypselabs/symat/Interpreter.form index ef983ad..7463efb 100644 --- a/src/net/apocalypselabs/symat/Interpreter.form +++ b/src/net/apocalypselabs/symat/Interpreter.form @@ -1,27 +1,6 @@
- - - - - - - - - - - - - - - - - - - - - @@ -33,7 +12,6 @@ - @@ -55,22 +33,22 @@ - + - + - + - + - + @@ -86,7 +64,7 @@ - + @@ -97,22 +75,22 @@ - + - + - + - + - + diff --git a/src/net/apocalypselabs/symat/Interpreter.java b/src/net/apocalypselabs/symat/Interpreter.java index f9003c1..2635eb6 100644 --- a/src/net/apocalypselabs/symat/Interpreter.java +++ b/src/net/apocalypselabs/symat/Interpreter.java @@ -1,7 +1,7 @@ -/* +/* * Apocalypse Laboratories * Open Source License - * + * * Source code can be used for any purpose, as long as: * - Compiled binaries are rebranded and trademarks are not * visible by the end user at any time, except to give @@ -14,7 +14,7 @@ * - and you provide your modified source code for download, * under the terms of the GNU LGPL v3 or a comparable * license. - * + * * Compiled binaries cannot be redistributed or mirrored, * unless: * - You have written permission from Apocalypse Laboratories; @@ -22,13 +22,13 @@ * not even behind a paywall or other blocking mechanism; * - or you have received a multi-computer license, in which * case you should take measures to prevent unauthorized - * downloads, such as preventing download access from the + * downloads, such as preventing download access from the * Internet. */ package net.apocalypselabs.symat; +import java.awt.Color; import java.awt.Font; -import javax.swing.JOptionPane; import javax.swing.text.DefaultCaret; /** @@ -38,6 +38,7 @@ import javax.swing.text.DefaultCaret; public class Interpreter extends javax.swing.JInternalFrame { private final CodeRunner cr = new CodeRunner(); + /** * Creates new form Interpreter */ @@ -45,13 +46,28 @@ public class Interpreter extends javax.swing.JInternalFrame { initComponents(); int font_size = 12; try { - font_size = Integer.valueOf(PrefStorage.getSetting("shell-fontsize")); - } catch (Exception ex) { } - jTextArea1.setFont(new Font(Font.MONOSPACED, Font.PLAIN, font_size)); - jTextArea1.setLineWrap(true); - jTextArea1.setWrapStyleWord(true); - jTextArea1.setText(">>"); - jTextField1.requestFocus(); + font_size = Integer.valueOf(PrefStorage.getSetting("editfont")); + } catch (Exception ex) { + } + mainBox.setFont(new Font(Font.MONOSPACED, Font.PLAIN, font_size)); + inputBox.setFont(new Font(Font.MONOSPACED, Font.PLAIN, font_size)); + if (PrefStorage.getSetting("theme").equals("dark")) { + mainBox.setBackground(Color.BLACK); + mainBox.setForeground(Color.WHITE); + inputBox.setBackground(Color.BLACK); + inputBox.setForeground(Color.WHITE); + setBackground(Color.DARK_GRAY); + } else { + mainBox.setBackground(Color.WHITE); + mainBox.setForeground(Color.BLACK); + inputBox.setBackground(Color.WHITE); + inputBox.setForeground(Color.BLACK); + setBackground(Color.LIGHT_GRAY); + } + mainBox.setLineWrap(true); + mainBox.setWrapStyleWord(true); + mainBox.setText(">>"); + inputBox.requestFocus(); } /** @@ -64,13 +80,10 @@ public class Interpreter extends javax.swing.JInternalFrame { private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); - jTextArea1 = new javax.swing.JTextArea(); - jTextField1 = new javax.swing.JTextField(); - jButton1 = new javax.swing.JButton(); + mainBox = new javax.swing.JTextArea(); + inputBox = new javax.swing.JTextField(); + runBtn = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); - jMenuBar1 = new javax.swing.JMenuBar(); - jMenu2 = new javax.swing.JMenu(); - jMenuItem1 = new javax.swing.JMenuItem(); setClosable(true); setIconifiable(true); @@ -79,45 +92,31 @@ public class Interpreter extends javax.swing.JInternalFrame { setTitle("Shell"); setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/shell.png"))); // NOI18N - jTextArea1.setEditable(false); - jTextArea1.setColumns(20); - jTextArea1.setFont(new java.awt.Font("Courier New", 0, 15)); // NOI18N - jTextArea1.setRows(5); - jTextArea1.setTabSize(4); - DefaultCaret caret = (DefaultCaret)jTextArea1.getCaret(); + mainBox.setEditable(false); + mainBox.setColumns(20); + mainBox.setFont(new java.awt.Font("Courier New", 0, 15)); // NOI18N + mainBox.setRows(5); + mainBox.setTabSize(4); + DefaultCaret caret = (DefaultCaret)mainBox.getCaret(); caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE); - jScrollPane1.setViewportView(jTextArea1); + jScrollPane1.setViewportView(mainBox); - jTextField1.addKeyListener(new java.awt.event.KeyAdapter() { + inputBox.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { - jTextField1KeyTyped(evt); + inputBoxKeyTyped(evt); } }); - jButton1.setText("Run"); - jButton1.addActionListener(new java.awt.event.ActionListener() { + runBtn.setText("Run"); + runBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton1ActionPerformed(evt); + runBtnActionPerformed(evt); } }); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText(">>"); - jMenu2.setText("Edit"); - - jMenuItem1.setText("Font size..."); - jMenuItem1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jMenuItem1ActionPerformed(evt); - } - }); - jMenu2.add(jMenuItem1); - - jMenuBar1.add(jMenu2); - - setJMenuBar(jMenuBar1); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -126,71 +125,53 @@ public class Interpreter extends javax.swing.JInternalFrame { .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jTextField1) + .addComponent(inputBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jButton1)) + .addComponent(runBtn)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(runBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING))) + .addComponent(inputBox, javax.swing.GroupLayout.Alignment.LEADING))) .addGap(2, 2, 2)) ); pack(); }// //GEN-END:initComponents - private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + private void runBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runBtnActionPerformed doRunCode(); - }//GEN-LAST:event_jButton1ActionPerformed + }//GEN-LAST:event_runBtnActionPerformed - private void jTextField1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyTyped + private void inputBoxKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_inputBoxKeyTyped if (evt.getKeyChar() == '\n') { doRunCode(); } - }//GEN-LAST:event_jTextField1KeyTyped - - private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed - try { - int size = Integer.parseInt(JOptionPane.showInternalInputDialog(this, - "New font size (8-36):", - "Font Size", - JOptionPane.QUESTION_MESSAGE)); - if (size >= 8 && size <= 36) { - jTextArea1.setFont(new Font(Font.MONOSPACED, Font.PLAIN, size)); - PrefStorage.saveSetting("shell-fontsize", size+""); - } - } catch (Exception ex) { - - } - }//GEN-LAST:event_jMenuItem1ActionPerformed + }//GEN-LAST:event_inputBoxKeyTyped private void doRunCode() { - String code = jTextField1.getText(); - jTextArea1.append(" "+code+"\n"); + String code = inputBox.getText(); + mainBox.append(" " + code + "\n"); try { - jTextArea1.append(cr.evalString(code).toString()+"\n"); + mainBox.append(cr.evalString(code).toString() + "\n"); } catch (NullPointerException ex) { - + } - jTextArea1.append(">>"); - jTextField1.setText(""); + mainBox.append(">>"); + inputBox.setText(""); } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton jButton1; + private javax.swing.JTextField inputBox; private javax.swing.JLabel jLabel1; - private javax.swing.JMenu jMenu2; - private javax.swing.JMenuBar jMenuBar1; - private javax.swing.JMenuItem jMenuItem1; private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JTextArea jTextArea1; - private javax.swing.JTextField jTextField1; + private javax.swing.JTextArea mainBox; + private javax.swing.JButton runBtn; // End of variables declaration//GEN-END:variables } diff --git a/src/net/apocalypselabs/symat/MainGUI.form b/src/net/apocalypselabs/symat/MainGUI.form index d67851e..ca9612b 100644 --- a/src/net/apocalypselabs/symat/MainGUI.form +++ b/src/net/apocalypselabs/symat/MainGUI.form @@ -7,10 +7,10 @@ - + - + @@ -29,7 +29,7 @@ - + @@ -52,7 +52,11 @@ + + + + @@ -62,12 +66,15 @@ - + + + + @@ -77,6 +84,9 @@ + + + @@ -96,7 +106,7 @@ - + @@ -187,6 +197,9 @@ + + + @@ -204,7 +217,7 @@ - + @@ -224,7 +237,7 @@ - + @@ -251,9 +264,9 @@ - + - + @@ -271,6 +284,9 @@ + + + @@ -282,15 +298,18 @@ - + + + + + + - - - - + + @@ -304,6 +323,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -320,6 +359,7 @@ + @@ -331,7 +371,7 @@ - + diff --git a/src/net/apocalypselabs/symat/MainGUI.java b/src/net/apocalypselabs/symat/MainGUI.java index cd60e49..c66e32f 100644 --- a/src/net/apocalypselabs/symat/MainGUI.java +++ b/src/net/apocalypselabs/symat/MainGUI.java @@ -27,14 +27,16 @@ */ package net.apocalypselabs.symat; -import java.awt.Rectangle; +import java.awt.Color; +import java.awt.Component; +import java.awt.Font; +import java.awt.Graphics; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import javax.swing.ImageIcon; -import javax.swing.JDesktopPane; import javax.swing.JInternalFrame; /** @@ -85,6 +87,19 @@ public class MainGUI extends javax.swing.JFrame { ed.openFileFromString(argfile); argfile = ""; } + updateDisplay(); + } + + /** + * (Re)load display settings. + */ + public static void updateDisplay() { + mainPane.paintImmediately(0, 0, mainPane.getWidth(), mainPane.getHeight()); + if (PrefStorage.getSetting("theme").equals("dark")) { + tabs.setBackground(Color.BLACK); + } else { + tabs.setBackground(new Color(240, 240, 240)); + } } private static String namemark() { @@ -122,21 +137,39 @@ public class MainGUI extends javax.swing.JFrame { arrangeWindowsBtn = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); - mainPane = new javax.swing.JDesktopPane(); + displaySettingsBtn = new javax.swing.JButton(); + mainPane = mainPane = new javax.swing.JDesktopPane() { + @Override + protected void paintComponent(Graphics g) { + super.paintComponent(g); + if (PrefStorage.getSetting("theme").equals("dark")) { + g.setColor(Color.DARK_GRAY); + } else { + g.setColor(Color.LIGHT_GRAY); + } + g.fillRect(0, 0, getWidth(), getHeight()); + } + } + ; setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle(APP_NAME); - setMinimumSize(new java.awt.Dimension(600, 500)); - setPreferredSize(new java.awt.Dimension(700, 500)); + setMinimumSize(new java.awt.Dimension(300, 400)); + setPreferredSize(new java.awt.Dimension(700, 575)); addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { formComponentShown(evt); } }); - jPanel4.setEnabled(false); + tabs.setBackground(new Color(240,240,240)); + tabs.setOpaque(true); + + jPanel4.setFocusable(false); jPanel4.setLayout(null); - tabs.addTab("", jPanel4); + tabs.addTab("", new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icon16.png")), jPanel4); // NOI18N + + jPanel1.setOpaque(false); shellBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/shell.png"))); // NOI18N shellBtn.setText("Shell"); @@ -193,7 +226,7 @@ public class MainGUI extends javax.swing.JFrame { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(graphBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 494, Short.MAX_VALUE)) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 498, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -208,8 +241,10 @@ public class MainGUI extends javax.swing.JFrame { tabs.addTab("Apps", jPanel1); + jPanel2.setOpaque(false); + helpBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/help.png"))); // NOI18N - helpBtn.setText("Help"); + helpBtn.setText("Manual"); helpBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); helpBtn.setFocusable(false); helpBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); @@ -225,8 +260,8 @@ public class MainGUI extends javax.swing.JFrame { jLabel3.setText(namemark()); jLabel3.setFocusable(false); - arrangeWindowsBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/help.png"))); // NOI18N - arrangeWindowsBtn.setText("Arrange"); + arrangeWindowsBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/cascade.png"))); // NOI18N + arrangeWindowsBtn.setText("Cascade"); arrangeWindowsBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); arrangeWindowsBtn.setFocusable(false); arrangeWindowsBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); @@ -248,7 +283,7 @@ public class MainGUI extends javax.swing.JFrame { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(arrangeWindowsBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 551, Short.MAX_VALUE)) + .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -260,21 +295,39 @@ public class MainGUI extends javax.swing.JFrame { tabs.addTab("Tools", jPanel2); + jPanel3.setOpaque(false); + jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel4.setText(namemark()); jLabel4.setFocusable(false); + displaySettingsBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/display.png"))); // NOI18N + displaySettingsBtn.setText("Display"); + displaySettingsBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); + displaySettingsBtn.setFocusable(false); + displaySettingsBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + displaySettingsBtn.setOpaque(false); + displaySettingsBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + displaySettingsBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + displaySettingsBtnActionPerformed(evt); + } + }); + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 691, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addComponent(displaySettingsBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 574, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel3Layout.createSequentialGroup() - .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0)) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(displaySettingsBtn) ); tabs.addTab("Settings", jPanel3); @@ -294,7 +347,7 @@ public class MainGUI extends javax.swing.JFrame { ); mainPaneLayout.setVerticalGroup( mainPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 400, Short.MAX_VALUE) + .addGap(0, 481, Short.MAX_VALUE) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); @@ -345,6 +398,11 @@ public class MainGUI extends javax.swing.JFrame { cascade(); }//GEN-LAST:event_arrangeWindowsBtnActionPerformed + private void displaySettingsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_displaySettingsBtnActionPerformed + Display d = new Display(); + loadFrame(d); + }//GEN-LAST:event_displaySettingsBtnActionPerformed + /** * Adds the given JInternalFrame to the mainPane. Automatically does layout * and sets visible as well. @@ -373,13 +431,14 @@ public class MainGUI extends javax.swing.JFrame { frame.setLocation(frame.getLocation().x, 0); } frame.setVisible(true); + //updateDisplay(); } public static void cascade() { JInternalFrame[] frames = mainPane.getAllFrames(); int x = 12; int y = 24; - Debug.println("Cascading "+frames.length+" frames..."); + Debug.println("Cascading " + frames.length + " frames..."); for (int i = 0; i < frames.length; i++) { if (frames[i].isVisible()) { Debug.println("Frame: " + frames[i].getTitle() + ", Times: " + i + ", Xpos: " + x * i + ", Ypos: " + y * i); @@ -427,19 +486,20 @@ public class MainGUI extends javax.swing.JFrame { } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton arrangeWindowsBtn; - private javax.swing.JButton editorBtn; - private javax.swing.JButton graphBtn; - private javax.swing.JButton helpBtn; - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabel3; - private javax.swing.JLabel jLabel4; - private javax.swing.JPanel jPanel1; - private javax.swing.JPanel jPanel2; - private javax.swing.JPanel jPanel3; - private javax.swing.JPanel jPanel4; + public static javax.swing.JButton arrangeWindowsBtn; + public static javax.swing.JButton displaySettingsBtn; + public static javax.swing.JButton editorBtn; + public static javax.swing.JButton graphBtn; + public static javax.swing.JButton helpBtn; + public static javax.swing.JLabel jLabel1; + public static javax.swing.JLabel jLabel3; + public static javax.swing.JLabel jLabel4; + public static javax.swing.JPanel jPanel1; + public static javax.swing.JPanel jPanel2; + public static javax.swing.JPanel jPanel3; + public static javax.swing.JPanel jPanel4; public static javax.swing.JDesktopPane mainPane; - private javax.swing.JButton shellBtn; - private javax.swing.JTabbedPane tabs; + public static javax.swing.JButton shellBtn; + public static javax.swing.JTabbedPane tabs; // End of variables declaration//GEN-END:variables } diff --git a/src/net/apocalypselabs/symat/PrefStorage.java b/src/net/apocalypselabs/symat/PrefStorage.java index 71bf58c..21ef39d 100644 --- a/src/net/apocalypselabs/symat/PrefStorage.java +++ b/src/net/apocalypselabs/symat/PrefStorage.java @@ -41,6 +41,13 @@ public class PrefStorage { prefs.put(key, value); } + public static boolean isset(String key) { + if (!getSetting(key, "NULL").equals("NULL")) { + return true; + } + return false; + } + public static String getSetting(String key) { return prefs.get(key, ""); } @@ -50,9 +57,8 @@ public class PrefStorage { } // xkcd 221 compliance. - int getRandomNumber() - { + int getRandomNumber() { return 4; // chosen by fair dice roll. - // guaranteed to be random. + // guaranteed to be random. } } diff --git a/src/net/apocalypselabs/symat/PrettifyToHtml.java b/src/net/apocalypselabs/symat/PrettifyToHtml.java index a6aff23..44d042c 100644 --- a/src/net/apocalypselabs/symat/PrettifyToHtml.java +++ b/src/net/apocalypselabs/symat/PrettifyToHtml.java @@ -1,18 +1,20 @@ -/******************************************************************************* +/** + * ***************************************************************************** * Copyright 2013 Jeremie Bresson - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ******************************************************************************/ + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + * **************************************************************************** + */ package net.apocalypselabs.symat; // Package name changed. import java.awt.Color; @@ -23,74 +25,76 @@ import syntaxhighlight.Style; import syntaxhighlight.Theme; public class PrettifyToHtml { - private static final String MAIN_CLASS = "prettyprint"; - /** - * Format the {@link ParseResult} into an HTML file. - * @param content - * @param parseResults - * @return - */ - public static String toHtml(String content, List parseResults) { - int endIndex = 0; - StringBuilder sb = new StringBuilder(); - sb.append("
"); - sb.append("
");
-		for (ParseResult pr : parseResults) {
-			int startIndex = pr.getOffset();
-			if(startIndex > endIndex) {
-				sb.append(content.substring(endIndex, startIndex));
-			}
-			endIndex = startIndex + pr.getLength();
-			sb.append("");
-			sb.append(content.substring(startIndex, endIndex));
-			sb.append("");
-		}
-		if(content.length() > endIndex) {
-			sb.append(content.substring(endIndex, content.length()));				
-		}
-		sb.append("
"); - sb.append("
"); - return sb.toString(); - } + private static final String MAIN_CLASS = "prettyprint"; - public static String toCss(Theme theme) { - StringBuilder sb = new StringBuilder(); - sb.append("." + MAIN_CLASS + " {"); - sb.append("font-family:monospace; "); - appendCssColor(sb, "background-color", theme.getBackground()); - sb.append("}\n"); - for (Entry entry : theme.getStyles().entrySet()) { - sb.append("." + MAIN_CLASS + " ."+entry.getKey()+" {"); - Style style = entry.getValue(); - appendCssColor(sb, "background-color", style.getBackground()); - appendCssColor(sb, "color", style.getColor()); - appendCssText(sb, "font-weight: bold", style.isBold()); - appendCssText(sb, "font-style: italic", style.isItalic()); - appendCssText(sb, "text-decoration: underline", style.isUnderline()); - sb.append("}\n"); - } - theme.getStyles(); - return sb.toString(); - } + /** + * Format the {@link ParseResult} into an HTML file. + * + * @param content + * @param parseResults + * @return + */ + public static String toHtml(String content, List parseResults) { + int endIndex = 0; + StringBuilder sb = new StringBuilder(); + sb.append("
"); + sb.append("
");
+        for (ParseResult pr : parseResults) {
+            int startIndex = pr.getOffset();
+            if (startIndex > endIndex) {
+                sb.append(content.substring(endIndex, startIndex));
+            }
+            endIndex = startIndex + pr.getLength();
+            sb.append("");
+            sb.append(content.substring(startIndex, endIndex));
+            sb.append("");
+        }
+        if (content.length() > endIndex) {
+            sb.append(content.substring(endIndex, content.length()));
+        }
+        sb.append("
"); + sb.append("
"); + return sb.toString(); + } - private static void appendCssColor(StringBuilder sb, String cssKey, Color color) { - if(color != null) { - sb.append(cssKey +": "+ encode(color) + "; "); - } - } - - private final static String encode(Color color) { - String s = Integer.toHexString(color.getRGB() & 0xffffff); - if (s.length() < 6) { - s = "000000".substring(0, 6 - s.length()) + s; - } - return '#' + s; - } - - private static void appendCssText(StringBuilder sb, String cssProp, boolean isSet) { - if(isSet) { - sb.append(cssProp + "; "); - } - } + public static String toCss(Theme theme) { + StringBuilder sb = new StringBuilder(); + sb.append("." + MAIN_CLASS + " {"); + sb.append("font-family:monospace; "); + appendCssColor(sb, "background-color", theme.getBackground()); + sb.append("}\n"); + for (Entry entry : theme.getStyles().entrySet()) { + sb.append("." + MAIN_CLASS + " ." + entry.getKey() + " {"); + Style style = entry.getValue(); + appendCssColor(sb, "background-color", style.getBackground()); + appendCssColor(sb, "color", style.getColor()); + appendCssText(sb, "font-weight: bold", style.isBold()); + appendCssText(sb, "font-style: italic", style.isItalic()); + appendCssText(sb, "text-decoration: underline", style.isUnderline()); + sb.append("}\n"); + } + theme.getStyles(); + return sb.toString(); + } + + private static void appendCssColor(StringBuilder sb, String cssKey, Color color) { + if (color != null) { + sb.append(cssKey + ": " + encode(color) + "; "); + } + } + + private final static String encode(Color color) { + String s = Integer.toHexString(color.getRGB() & 0xffffff); + if (s.length() < 6) { + s = "000000".substring(0, 6 - s.length()) + s; + } + return '#' + s; + } + + private static void appendCssText(StringBuilder sb, String cssProp, boolean isSet) { + if (isSet) { + sb.append(cssProp + "; "); + } + } } diff --git a/src/net/apocalypselabs/symat/TextLineNumber.java b/src/net/apocalypselabs/symat/TextLineNumber.java index bc698c2..d3695a3 100644 --- a/src/net/apocalypselabs/symat/TextLineNumber.java +++ b/src/net/apocalypselabs/symat/TextLineNumber.java @@ -46,17 +46,17 @@ public class TextLineNumber extends JPanel private final static int HEIGHT = Integer.MAX_VALUE - 1000000; - // Text component this TextTextLineNumber component is in sync with + // Text component this TextTextLineNumber component is in sync with private JTextComponent component; - // Properties that can be changed + // Properties that can be changed private boolean updateFont; private int borderGap; private Color currentLineForeground; private float digitAlignment; private int minimumDisplayDigits; - // Keep history information to reduce the number of times the component + // Keep history information to reduce the number of times the component // needs to be repainted private int lastDigits; private int lastHeight; @@ -212,7 +212,7 @@ public class TextLineNumber extends JPanel int lines = root.getElementCount(); int digits = Math.max(String.valueOf(lines).length(), minimumDisplayDigits); - // Update sizes when number of digits in the line number changes + // Update sizes when number of digits in the line number changes if (lastDigits != digits) { lastDigits = digits; FontMetrics fontMetrics = getFontMetrics(getFont()); @@ -234,12 +234,12 @@ public class TextLineNumber extends JPanel public void paintComponent(Graphics g) { super.paintComponent(g); - // Determine the width of the space available to draw the line number + // Determine the width of the space available to draw the line number FontMetrics fontMetrics = component.getFontMetrics(component.getFont()); Insets insets = getInsets(); int availableWidth = getSize().width - insets.left - insets.right; - // Determine the rows to draw within the clipped bounds. + // Determine the rows to draw within the clipped bounds. Rectangle clip = g.getClipBounds(); int rowStartOffset = component.viewToModel(new Point(0, clip.y)); int endOffset = component.viewToModel(new Point(0, clip.y + clip.height)); @@ -252,7 +252,7 @@ public class TextLineNumber extends JPanel g.setColor(getForeground()); } - // Get the line number as a string and then determine the + // Get the line number as a string and then determine the // "X" and "Y" offsets for drawing the string. String lineNumber = getTextLineNumber(rowStartOffset); int stringWidth = fontMetrics.stringWidth(lineNumber); @@ -260,7 +260,7 @@ public class TextLineNumber extends JPanel int y = getOffsetY(rowStartOffset, fontMetrics); g.drawString(lineNumber, x, y); - // Move to the next row + // Move to the next row rowStartOffset = Utilities.getRowEnd(component, rowStartOffset) + 1; } catch (Exception e) { break; @@ -318,7 +318,7 @@ public class TextLineNumber extends JPanel int y = r.y + r.height; int descent = 0; - // The text needs to be positioned above the bottom of the bounding + // The text needs to be positioned above the bottom of the bounding // rectangle based on the descent of the font(s) contained on the row. if (r.height == lineHeight) // default font is being used { @@ -366,7 +366,7 @@ public class TextLineNumber extends JPanel Element root = component.getDocument().getDefaultRootElement(); int currentLine = root.getElementIndex(caretPosition); - // Need to repaint so the correct line number can be highlighted + // Need to repaint so the correct line number can be highlighted if (lastLine != currentLine) { repaint(); lastLine = currentLine; @@ -396,7 +396,7 @@ public class TextLineNumber extends JPanel * Therefore the lines numbers will also change. */ private void documentChanged() { - // View of the component has not been updated at the time + // View of the component has not been updated at the time // the DocumentEvent is fired SwingUtilities.invokeLater(new Runnable() { diff --git a/src/net/apocalypselabs/symat/Update.java b/src/net/apocalypselabs/symat/Update.java index b6a6e38..7da0322 100644 --- a/src/net/apocalypselabs/symat/Update.java +++ b/src/net/apocalypselabs/symat/Update.java @@ -43,6 +43,7 @@ public class Update extends javax.swing.JInternalFrame { /** * Creates new form Update + * * @param latest The new version. */ public Update(double latest) { @@ -155,11 +156,10 @@ public class Update extends javax.swing.JInternalFrame { }//GEN-LAST:event_jButton1ActionPerformed private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel5MouseClicked - PrefStorage.saveSetting("update-ignore", MainGUI.APP_CODE+"|"+latestVersion); + PrefStorage.saveSetting("update-ignore", MainGUI.APP_CODE + "|" + latestVersion); dispose(); }//GEN-LAST:event_jLabel5MouseClicked - // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; diff --git a/src/net/apocalypselabs/symat/cascade.png b/src/net/apocalypselabs/symat/cascade.png new file mode 100644 index 0000000000000000000000000000000000000000..84019f896e39da45a83400909912d7e1a5b70283 GIT binary patch literal 920 zcmV;J184k+P)?cC3m*r}yurUSJJ zXLlzv=l-5uH8<~(k7)BpfT5JK-3 zAe8dV83#Jgc)%rY0P4RoTTSq^xlYLL!_LM(2d737uy#BGFSqcC@MZWZPF}W`%ek%U z4>`OtINKT?q8en(#&jsjy9W*c;Ec<;ZKiCXVIu-Uc_Yt2SjZ*;*vj%LB^5kG8ZGNH zh8Rbc4eTv^0TB_tPKH2&G#Ssu79qV&Z?zc*y80TyxN#4XlJLR656FEt04`}V_KEA@ z<{VHV5EvSS|LOtFklU#wykxc_ZEQR=>#(@JnfM?k>>XVBgjmu|7*@SHQ zyUsHZeiw<5EOl!8n86_~313J=gz)z;s7Qu4vk90T>YOY@mtmdA zZnYU>X!E;uhgcWF^l#Qxb=g!oydY6&2wf5+ zcnGhO0#HEI+a0mHa;n(64|KLF86nzZQb3yIRiEPd_4B% u<@7^28BdP+{N5*_kMmXaTPGP$j{OGwN&jPKKpFJ_0000m^U>LtKYZtv7u*k9E?>@n^V7KsP5WJGZK^wS=H#(QMjYU^6TR-% zroC^d`)b`CWtu}uXe1WryMGq3RaHyLTaS@iqf-gf-P(xLZsV~!SBJW{rm9v}!Ed8} z9H-tRW?E!LZeVQSBHeek>)cg)6h%>#k~Eb7MG@<^6-AX@;1(&_kpNf#v6=wN@9isE z-o!+3e?*?Mgo};LO8-g>xPO%wC~vZ~%ZFd{@t5XfP@CqG^9HWTE}roBP&04k@t8@q zQ(!I4Wxs*^<*f?@J?HsT_c8*E0AoNBm{!6}Cj#say66d*IO94`?n~29lPHn)ZStF} z;#b)JE-Sh>ufr3o3YY(=X4vZ@oi5!Id;5`}`xNS~!f|Z2IjccWOfM=JF{0k!&rIbV$97F@Ul&tk+m%nrYQt~ETc&rK|A@{M8 zS>EdfUw)G_UyQV1WwJtQW@h<`NvS1wNiW%?=4F3i-3b){R~ZJ!Px>QcAIM( zd4T3-SSVZ`0L22r4mc2~SniZq0jD#Cqa_K7b!XX|t1|9w-Y+G5GmZmGpcFpp*~l#4 z*$G1a+hN(^IjMP>4IAp=$O)-MdQ%kl>2ax<*@ySpmq2fnQ=*t0K6e#ile;X=E^o0y z_gN6dzt25&dK_2BV$nI9$$ep0Hbc!@fVSg;V<)HSeRE{T=jUSkHL89TjCQzn0kpsK z4z90G@cH}0JaZ&ij9*UjTwuE(@Byy)0NS2@u+L{bveFKxjz;+8#X&0dHA$M8Q4Pb$ zdmW&Mj?)`DPLCR8O7n45^Kn`8Q=4q#(C!WnJzYo3^Hv0MZ;6>O48u@w&WGm!Pa!8d zQ#zf?U34yY@%p`;(*1HW8wv-Nz+7k~7GHU=%|(((t}-*bFrr-d&-V5GFc^B+LWS_< zkH3Vj`)_`sM&j|It~SrdL*B_p>a$KH9v}J-#iS_~@C1||00000NkvXXu0mjfvuYJO literal 0 HcmV?d00001 diff --git a/src/net/apocalypselabs/symat/icon16.png b/src/net/apocalypselabs/symat/icon16.png new file mode 100644 index 0000000000000000000000000000000000000000..f16b2bb21f67a0633c51f7b6655dd582cdcb74a9 GIT binary patch literal 488 zcmVP)N<#;}u_zXm#GW}o2-USJ1V*%vJ1cI|(p5pfPLF@jHcjc+)GDa>GfAOk**;%kZa z3@vofso0%lc7i;5cvn4kD!Mb}u8VHJ#GJ0rt%}Sxv0L`@Lo-VZO(OBQVzGj|n69Ev zkth28R1(HNVH*0`O>18AZgIM#+8`gGIEL^R672&sZz?B$>>jZI0000MhgWCL2SgNkeGycXig=~r8v^%S?p}GJIu|@Ws%K;fo0}5 z@4b2Z-n?A_6gZ|F86N?TRdu2a>mt&-QikEIL^~iN4H3B-!QBv%mWW8K?w+bLXaM(t zuOzv01l;tn6=2V>J3uR-yXSQPm$e~d>X)P6nX^)sspD34EV+=P!Bl}tO8a225f~mhisX>UKxp0cFi%@ z0Y01O2f(d}Jx&R|f;sY`{Ru2MxW~W`i=8W4hEu@4WxV3y$ANx>VipV}NZAp*O^y*|L-HHu)rcZk|(lqN;Cvnnh#*c$=B(0&C=x z@W8OaGMpr7t7-Cdf$JW=LQ<+JzXMDb?FF;sGx#^K=-{3LhZZ{4g?*@zzv`p!Bv4q nq|Uf|;D5=b_%{?v{yqN(K*I~7wlTWh00000NkvXXu0mjfot`sl literal 0 HcmV?d00001 diff --git a/src/net/apocalypselabs/symat/pretty.css b/src/net/apocalypselabs/symat/pretty.css index dc9cee2..f82bc18 100644 --- a/src/net/apocalypselabs/symat/pretty.css +++ b/src/net/apocalypselabs/symat/pretty.css @@ -1,5 +1,5 @@ .header { - + } .com { color: green;