Add icon to export window
This commit is contained in:
parent
4d7ec26a3f
commit
8d321b9e28
@ -7,6 +7,10 @@
|
||||
<Property name="maximizable" type="boolean" value="true"/>
|
||||
<Property name="resizable" type="boolean" value="true"/>
|
||||
<Property name="title" type="java.lang.String" value="Export Code"/>
|
||||
<Property name="frameIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/net/apocalypselabs/symat/icons/export.png"/>
|
||||
</Property>
|
||||
<Property name="icon" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
@ -33,10 +37,10 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" pref="286" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="268" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -68,7 +72,7 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="titleBox" min="-2" pref="154" max="-2" attributes="0"/>
|
||||
<Component id="titleBox" pref="154" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@ -89,18 +93,18 @@
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane2" min="-2" pref="239" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane2" pref="239" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
|
||||
<EmptySpace min="5" pref="5" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
@ -127,7 +131,7 @@
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -192,7 +196,7 @@
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Export as:"/>
|
||||
<TitledBorder title="Export to:"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
@ -213,10 +217,10 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="exHtml" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="exPdf" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="13" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
@ -166,6 +166,7 @@ public class CodeExport extends javax.swing.JInternalFrame {
|
||||
setMaximizable(true);
|
||||
setResizable(true);
|
||||
setTitle("Export Code");
|
||||
setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/export.png"))); // NOI18N
|
||||
|
||||
previewPane.setEditable(false);
|
||||
previewPane.setContentType("text/html"); // NOI18N
|
||||
@ -195,7 +196,7 @@ public class CodeExport extends javax.swing.JInternalFrame {
|
||||
}
|
||||
});
|
||||
|
||||
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Export as:"));
|
||||
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Export to:"));
|
||||
|
||||
exHtml.setText("HTML");
|
||||
exHtml.addActionListener(new java.awt.event.ActionListener() {
|
||||
@ -225,10 +226,10 @@ public class CodeExport extends javax.swing.JInternalFrame {
|
||||
jPanel2Layout.setVerticalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(exHtml)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(exPdf)
|
||||
.addGap(0, 13, Short.MAX_VALUE))
|
||||
.addComponent(exPdf))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
@ -241,7 +242,7 @@ public class CodeExport extends javax.swing.JInternalFrame {
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(jLabel1)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(titleBox, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(titleBox, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel2)
|
||||
@ -256,10 +257,10 @@ public class CodeExport extends javax.swing.JInternalFrame {
|
||||
.addComponent(jLabel4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jButton1))
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -284,7 +285,7 @@ public class CodeExport extends javax.swing.JInternalFrame {
|
||||
.addComponent(dateBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel3)))
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addGap(0, 0, 0))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
@ -297,10 +298,10 @@ public class CodeExport extends javax.swing.JInternalFrame {
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
|
||||
.addGap(4, 4, 4)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0))
|
||||
.addGap(10, 10, 10))
|
||||
);
|
||||
|
||||
pack();
|
||||
|
@ -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,7 +22,7 @@
|
||||
* 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;
|
||||
@ -94,15 +94,16 @@ public class FileUtils {
|
||||
|
||||
/**
|
||||
* Get an MD5 hash.
|
||||
*
|
||||
*
|
||||
* http://stackoverflow.com/a/6565597/2534036
|
||||
*
|
||||
* @param md5 the text to hash.
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public static String MD5(String md5) {
|
||||
try {
|
||||
java.security.MessageDigest md =
|
||||
java.security.MessageDigest.getInstance("MD5");
|
||||
java.security.MessageDigest md
|
||||
= java.security.MessageDigest.getInstance("MD5");
|
||||
byte[] array = md.digest(md5.getBytes());
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < array.length; ++i) {
|
||||
|
BIN
src/net/apocalypselabs/symat/icons/export.png
Normal file
BIN
src/net/apocalypselabs/symat/icons/export.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 512 B |
Loading…
x
Reference in New Issue
Block a user