diff --git a/src/net/apocalypselabs/symat/PadEditor.form b/src/net/apocalypselabs/symat/PadEditor.form index 8daefd9..98b2d19 100644 --- a/src/net/apocalypselabs/symat/PadEditor.form +++ b/src/net/apocalypselabs/symat/PadEditor.form @@ -85,7 +85,7 @@ - + @@ -107,16 +107,19 @@ - + - + + + + @@ -143,23 +146,66 @@ - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + diff --git a/src/net/apocalypselabs/symat/PadEditor.java b/src/net/apocalypselabs/symat/PadEditor.java index a5ba409..f65dee0 100644 --- a/src/net/apocalypselabs/symat/PadEditor.java +++ b/src/net/apocalypselabs/symat/PadEditor.java @@ -219,8 +219,11 @@ public class PadEditor extends javax.swing.JInternalFrame implements RunScriptLi jSplitPane1 = new javax.swing.JSplitPane(); browserBox = new javax.swing.JPanel(); + jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); outputBox = new javax.swing.JTextArea(); + clearBtn = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); statusBar = new javax.swing.JToolBar(); statusLbl = new javax.swing.JLabel(); jMenuBar1 = new javax.swing.JMenuBar(); @@ -239,7 +242,7 @@ public class PadEditor extends javax.swing.JInternalFrame implements RunScriptLi setTitle("Pad Editor"); setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/editor.png"))); // NOI18N setMinimumSize(new java.awt.Dimension(300, 300)); - setPreferredSize(new java.awt.Dimension(480, 400)); + setPreferredSize(new java.awt.Dimension(550, 391)); addInternalFrameListener(new javax.swing.event.InternalFrameListener() { public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) { } @@ -266,9 +269,10 @@ public class PadEditor extends javax.swing.JInternalFrame implements RunScriptLi } }); - jSplitPane1.setDividerLocation(260); + jSplitPane1.setDividerLocation(200); jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane1.setResizeWeight(0.7); + jSplitPane1.setPreferredSize(new java.awt.Dimension(550, 375)); browserBox.setMinimumSize(new java.awt.Dimension(100, 25)); browserBox.addComponentListener(new java.awt.event.ComponentAdapter() { @@ -284,7 +288,37 @@ public class PadEditor extends javax.swing.JInternalFrame implements RunScriptLi outputBox.setTabSize(4); jScrollPane1.setViewportView(outputBox); - jSplitPane1.setRightComponent(jScrollPane1); + clearBtn.setText("Clear"); + clearBtn.setToolTipText(""); + clearBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + clearBtnActionPerformed(evt); + } + }); + + jLabel1.setText("Output:"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 437, Short.MAX_VALUE) + .addComponent(clearBtn)) + .addComponent(jScrollPane1) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addComponent(clearBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, 0) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)) + ); + + jSplitPane1.setBottomComponent(jPanel1); getContentPane().add(jSplitPane1, java.awt.BorderLayout.CENTER); @@ -447,6 +481,10 @@ public class PadEditor extends javax.swing.JInternalFrame implements RunScriptLi resizeAll(); }//GEN-LAST:event_browserBoxComponentResized + private void clearBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearBtnActionPerformed + outputBox.setText(""); + }//GEN-LAST:event_clearBtnActionPerformed + private void resizeAll() { Platform.runLater(new Runnable() { @Override @@ -460,8 +498,11 @@ public class PadEditor extends javax.swing.JInternalFrame implements RunScriptLi // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel browserBox; + private javax.swing.JButton clearBtn; private javax.swing.JMenu codeLangMenu; + private javax.swing.JLabel jLabel1; private javax.swing.JMenuBar jMenuBar1; + private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSplitPane jSplitPane1; private javax.swing.JRadioButtonMenuItem javaOption; diff --git a/src/net/apocalypselabs/symat/WebBrowser.form b/src/net/apocalypselabs/symat/WebBrowser.form index 269846b..fa9f7a9 100644 --- a/src/net/apocalypselabs/symat/WebBrowser.form +++ b/src/net/apocalypselabs/symat/WebBrowser.form @@ -61,11 +61,14 @@ - + + + + - + @@ -93,31 +96,69 @@ - + - - - - - - - - - - - - - + + + - - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/net/apocalypselabs/symat/WebBrowser.java b/src/net/apocalypselabs/symat/WebBrowser.java index abe6457..de0ca74 100644 --- a/src/net/apocalypselabs/symat/WebBrowser.java +++ b/src/net/apocalypselabs/symat/WebBrowser.java @@ -211,15 +211,21 @@ public class WebBrowser extends javax.swing.JInternalFrame { this(title, url); switch (icon) { case WIKI_LOGO: + homeBtn.setVisible(false); + sepBar.setVisible(false); setFrameIcon(new ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/wiki.png"))); break; case FORUM_LOGO: + homeBtn.setVisible(false); + sepBar.setVisible(false); setFrameIcon(new ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/forum.png"))); break; case PAD_LOGO: navBar.setVisible(false); goBtn.setEnabled(false); backBtn.setEnabled(false); + homeBtn.setVisible(false); + sepBar.setVisible(false); setFrameIcon(new ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/editor.png"))); break; default: @@ -373,7 +379,10 @@ public class WebBrowser extends javax.swing.JInternalFrame { navBar = new javax.swing.JToolBar(); backBtn = new javax.swing.JButton(); urlBox = new javax.swing.JTextField(); + buttonBar = new javax.swing.JToolBar(); goBtn = new javax.swing.JButton(); + sepBar = new javax.swing.JToolBar.Separator(); + homeBtn = new javax.swing.JButton(); browserBox = new javax.swing.JPanel(); setClosable(true); @@ -415,10 +424,11 @@ public class WebBrowser extends javax.swing.JInternalFrame { navBar.setLayout(new java.awt.BorderLayout()); backBtn.setFont(Main.ubuntuRegular.deriveFont(16.0f)); - backBtn.setText("<"); + backBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/arrow-left.png"))); // NOI18N + backBtn.setToolTipText("Go back a page"); backBtn.setFocusable(false); backBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - backBtn.setMaximumSize(new java.awt.Dimension(30, 21)); + backBtn.setMaximumSize(new java.awt.Dimension(50, 50)); backBtn.setMinimumSize(new java.awt.Dimension(30, 21)); backBtn.setPreferredSize(new java.awt.Dimension(30, 21)); backBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); @@ -442,21 +452,45 @@ public class WebBrowser extends javax.swing.JInternalFrame { navBar.add(urlBox); */ - goBtn.setText("Go"); - goBtn.setFocusable(false); + buttonBar.setFloatable(false); + buttonBar.setRollover(true); + buttonBar.setBorderPainted(false); + navBar.add(buttonBar, BorderLayout.EAST); + + goBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/goarrow.png"))); // NOI18N + goBtn.setToolTipText("Navigate"); goBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - goBtn.setMaximumSize(new java.awt.Dimension(30, 21)); + goBtn.setMaximumSize(new java.awt.Dimension(50, 50)); goBtn.setMinimumSize(new java.awt.Dimension(30, 21)); - goBtn.setPreferredSize(new java.awt.Dimension(30, 21)); + goBtn.setPreferredSize(new java.awt.Dimension(30, 30)); goBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - navBar.add(goBtn, java.awt.BorderLayout.EAST); + buttonBar.add(goBtn); goBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { goBtnActionPerformed(evt); } }); /* - navBar.add(goBtn); + buttonBar.add(goBtn); + */ + buttonBar.add(sepBar); + + homeBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/home.png"))); // NOI18N + homeBtn.setToolTipText("Go to homepage"); + homeBtn.setFocusable(false); + homeBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + homeBtn.setMaximumSize(new java.awt.Dimension(50, 50)); + homeBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + homeBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + homeBtnActionPerformed(evt); + } + }); + buttonBar.add(homeBtn); + + /* + + navBar.add(buttonBar); */ getContentPane().add(navBar, java.awt.BorderLayout.PAGE_START); @@ -511,6 +545,10 @@ public class WebBrowser extends javax.swing.JInternalFrame { }); }//GEN-LAST:event_backBtnActionPerformed + private void homeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_homeBtnActionPerformed + loadURL("about:home"); + }//GEN-LAST:event_homeBtnActionPerformed + private void resizeAll() { Platform.runLater(new Runnable() { @Override @@ -525,8 +563,11 @@ public class WebBrowser extends javax.swing.JInternalFrame { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton backBtn; private javax.swing.JPanel browserBox; + public javax.swing.JToolBar buttonBar; private javax.swing.JButton goBtn; + private javax.swing.JButton homeBtn; private javax.swing.JToolBar navBar; + private javax.swing.JToolBar.Separator sepBar; private javax.swing.JTextField urlBox; // End of variables declaration//GEN-END:variables } diff --git a/src/net/apocalypselabs/symat/icons/arrow-left.png b/src/net/apocalypselabs/symat/icons/arrow-left.png new file mode 100644 index 0000000..d8372ad Binary files /dev/null and b/src/net/apocalypselabs/symat/icons/arrow-left.png differ diff --git a/src/net/apocalypselabs/symat/icons/arrow-right.png b/src/net/apocalypselabs/symat/icons/arrow-right.png new file mode 100644 index 0000000..84515b8 Binary files /dev/null and b/src/net/apocalypselabs/symat/icons/arrow-right.png differ diff --git a/src/net/apocalypselabs/symat/icons/goarrow.png b/src/net/apocalypselabs/symat/icons/goarrow.png new file mode 100644 index 0000000..bbdbf90 Binary files /dev/null and b/src/net/apocalypselabs/symat/icons/goarrow.png differ diff --git a/src/net/apocalypselabs/symat/icons/home.png b/src/net/apocalypselabs/symat/icons/home.png new file mode 100644 index 0000000..122dfd9 Binary files /dev/null and b/src/net/apocalypselabs/symat/icons/home.png differ