Fix other things
This commit is contained in:
parent
386852e83e
commit
0489464d34
@ -662,6 +662,8 @@ public class CodeEditor extends javax.swing.JInternalFrame {
|
||||
outputBox.append("Error: Bad version selection syntax: "
|
||||
+ ex.getMessage() + "\n");
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -677,30 +679,22 @@ public class CodeEditor extends javax.swing.JInternalFrame {
|
||||
String[] lines = script.split("\n");
|
||||
String temp;
|
||||
String result = "";
|
||||
String pre = "//";
|
||||
if (lang.startsWith("p")) {
|
||||
pre = "##";
|
||||
}
|
||||
for (String line : lines) {
|
||||
if (lang.startsWith("j")) {
|
||||
if (line.startsWith("//include ") && !line.trim().endsWith("//include")) {
|
||||
temp = line.split(" ", 2)[1];
|
||||
try {
|
||||
line = FileUtils.readFile(filedata.getParent()
|
||||
+ "./" + temp);
|
||||
} catch (IOException ex) {
|
||||
outputBox.append("Error: Cannot read "
|
||||
+ "referenced script file: " + ex.getMessage()
|
||||
+ "\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (line.startsWith("##include ") && !line.trim().endsWith("##include")) {
|
||||
temp = line.split(" ", 2)[1];
|
||||
try {
|
||||
line = FileUtils.readFile(filedata.getParent()
|
||||
+ "./" + temp);
|
||||
} catch (IOException ex) {
|
||||
outputBox.append("Error: Cannot read "
|
||||
+ "referenced script file: " + ex.getMessage()
|
||||
+ "\n");
|
||||
}
|
||||
if (line.startsWith(pre + "include ")
|
||||
&& !line.trim().endsWith(pre + "include")) {
|
||||
temp = line.split(" ", 2)[1];
|
||||
try {
|
||||
line = loadExternalScripts(FileUtils.readFile(
|
||||
filedata.getParent()
|
||||
+ "./" + temp), lang);
|
||||
} catch (IOException ex) {
|
||||
outputBox.append("Error: Cannot read "
|
||||
+ "referenced script file: " + ex.getMessage()
|
||||
+ "\n");
|
||||
}
|
||||
}
|
||||
result += line + "\n";
|
||||
|
@ -53,7 +53,7 @@ package net.apocalypselabs.symat;
|
||||
public class Debug {
|
||||
|
||||
// If output should be on or off
|
||||
public static final boolean DEBUG = true;
|
||||
public static final boolean DEBUG = false;
|
||||
|
||||
public static void println(Object data) {
|
||||
if (DEBUG) {
|
||||
|
@ -313,6 +313,77 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Properties>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||
<JTabbedPaneConstraints tabName="Community">
|
||||
<Property name="tabTitle" type="java.lang.String" value="Community"/>
|
||||
</JTabbedPaneConstraints>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="wikiBtn" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" pref="610" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="wikiBtn" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" alignment="0" min="-2" pref="65" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="wikiBtn">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/net/apocalypselabs/symat/images/wiki.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Wiki"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="wikiBtnActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="MainGUI.ubuntuRegular.deriveFont(11.0F)" type="code"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="namemark()" type="code"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JDesktopPane" name="mainPane">
|
||||
|
@ -56,7 +56,6 @@ import java.awt.event.WindowEvent;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import javax.swing.ImageIcon;
|
||||
@ -121,6 +120,9 @@ public class MainGUI extends javax.swing.JFrame {
|
||||
|
||||
setButtonShortcuts();
|
||||
|
||||
// Disable community tab
|
||||
tabs.remove(2);
|
||||
|
||||
// Open initial windows
|
||||
boolean loaded = false;
|
||||
if (!argfile.equals("")) {
|
||||
@ -318,6 +320,9 @@ public class MainGUI extends javax.swing.JFrame {
|
||||
arrangeWindowsBtn = new javax.swing.JButton();
|
||||
closeAllBtn = new javax.swing.JButton();
|
||||
displaySettingsBtn = new javax.swing.JButton();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
wikiBtn = new javax.swing.JButton();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
mainPane = mainPane = new javax.swing.JDesktopPane() {
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
@ -514,6 +519,48 @@ public class MainGUI extends javax.swing.JFrame {
|
||||
|
||||
tabs.addTab("Window", jPanel2);
|
||||
|
||||
jPanel5.setFocusable(false);
|
||||
jPanel5.setOpaque(false);
|
||||
|
||||
wikiBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/images/wiki.png"))); // NOI18N
|
||||
wikiBtn.setText("Wiki");
|
||||
wikiBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
wikiBtn.setFocusable(false);
|
||||
wikiBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
wikiBtn.setOpaque(false);
|
||||
wikiBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
wikiBtn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
wikiBtnActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel4.setFont(MainGUI.ubuntuRegular.deriveFont(11.0F));
|
||||
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel4.setText(namemark());
|
||||
jLabel4.setFocusable(false);
|
||||
|
||||
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
|
||||
jPanel5.setLayout(jPanel5Layout);
|
||||
jPanel5Layout.setHorizontalGroup(
|
||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(wikiBtn)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 610, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel5Layout.setVerticalGroup(
|
||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(wikiBtn)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
tabs.addTab("Community", jPanel5);
|
||||
|
||||
mainPane.setBackground(new java.awt.Color(204, 204, 204));
|
||||
mainPane.setAutoscrolls(true);
|
||||
mainPane.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
@ -720,6 +767,10 @@ public class MainGUI extends javax.swing.JFrame {
|
||||
}
|
||||
}//GEN-LAST:event_recentItemsTitleMouseClicked
|
||||
|
||||
private void wikiBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_wikiBtnActionPerformed
|
||||
//loadFrame(new Wiki());
|
||||
}//GEN-LAST:event_wikiBtnActionPerformed
|
||||
|
||||
/*
|
||||
End the button handlers.
|
||||
*/
|
||||
@ -866,8 +917,10 @@ public class MainGUI extends javax.swing.JFrame {
|
||||
public static javax.swing.JLabel jLabel1;
|
||||
public static javax.swing.JLabel jLabel2;
|
||||
public static javax.swing.JLabel jLabel3;
|
||||
public static javax.swing.JLabel jLabel4;
|
||||
public static javax.swing.JPanel jPanel2;
|
||||
public static javax.swing.JPanel jPanel4;
|
||||
public static javax.swing.JPanel jPanel5;
|
||||
public static javax.swing.JScrollPane jScrollPane1;
|
||||
public static javax.swing.JDesktopPane mainPane;
|
||||
public static javax.swing.JButton recentFileBtn;
|
||||
@ -876,5 +929,6 @@ public class MainGUI extends javax.swing.JFrame {
|
||||
public static javax.swing.JLabel recentItemsTitle;
|
||||
public static javax.swing.JButton shellBtn;
|
||||
public static javax.swing.JTabbedPane tabs;
|
||||
public static javax.swing.JButton wikiBtn;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
BIN
src/net/apocalypselabs/symat/images/wiki.png
Normal file
BIN
src/net/apocalypselabs/symat/images/wiki.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Loading…
x
Reference in New Issue
Block a user