Compare commits
No commits in common. "master" and "1.0b" have entirely different histories.
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,5 +1 @@
|
||||
/src/padkey
|
||||
/pub/
|
||||
/installerbanner.svg
|
||||
/installerbanner@2x.png
|
||||
/installerbanner.png
|
23
README.md
23
README.md
@ -1,23 +0,0 @@
|
||||
SyMAT Pad Viewer
|
||||
================
|
||||
|
||||
Easily collaborate on SyMAT pads without installing SyMAT.
|
||||
|
||||
Download SyMAT
|
||||
--------------
|
||||
https://symatapp.com/
|
||||
|
||||
License
|
||||
--------------
|
||||
The Etherpad Lite library (org.etherpad_lite_client) is Apache licensed.
|
||||
The original library can be found at https://github.com/nilsfr/java-etherpad-lite
|
||||
|
||||
The SyMAT code (com.netsyms) in this repository are BSD licensed (see source
|
||||
code headers), but you can use the Apache 2.0 license if you want to match
|
||||
with the library.
|
||||
|
||||
Modify
|
||||
--------------
|
||||
To make this project work with your own Etherpad instance, update
|
||||
/src/com/netsyms/symat/padview/PadUtils.java with your own PADS_URL, and put
|
||||
your Etherpad API key in the file `padkey` at the root of the `src` directory.
|
@ -36,8 +36,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="286" max="32767" attributes="0"/>
|
||||
<Component id="expandBtn" min="-2" pref="30" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="296" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@ -51,7 +50,6 @@
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="addBtn" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="expandBtn" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@ -169,16 +167,5 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="delBtnActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="expandBtn">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/netsyms/symat/padview/pop.png"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="expandBtnActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -90,7 +90,6 @@ public class Controls extends javax.swing.JPanel {
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
previewBtn = new javax.swing.JButton();
|
||||
delBtn = new javax.swing.JButton();
|
||||
expandBtn = new javax.swing.JButton();
|
||||
|
||||
jLabel1.setText("My Pads:");
|
||||
|
||||
@ -154,14 +153,6 @@ public class Controls extends javax.swing.JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
expandBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/netsyms/symat/padview/pop.png"))); // NOI18N
|
||||
expandBtn.setEnabled(false);
|
||||
expandBtn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
expandBtnActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@ -183,8 +174,7 @@ public class Controls extends javax.swing.JPanel {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 286, Short.MAX_VALUE)
|
||||
.addComponent(expandBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 296, Short.MAX_VALUE))
|
||||
.addComponent(jScrollPane2)))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
@ -193,8 +183,7 @@ public class Controls extends javax.swing.JPanel {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(addBtn)
|
||||
.addComponent(expandBtn))
|
||||
.addComponent(addBtn))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
@ -230,13 +219,7 @@ public class Controls extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
private void updateList() {
|
||||
int sel = padPane.getSelectedIndex();
|
||||
padPane.setListData(PadUtils.getPads());
|
||||
try {
|
||||
padPane.setSelectedIndex(sel);
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void padPaneValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_padPaneValueChanged
|
||||
@ -249,7 +232,6 @@ public class Controls extends javax.swing.JPanel {
|
||||
saveBtn.setEnabled(enable);
|
||||
previewBtn.setEnabled(enable);
|
||||
delBtn.setEnabled(enable);
|
||||
expandBtn.setEnabled(enable);
|
||||
}//GEN-LAST:event_padPaneValueChanged
|
||||
|
||||
private void openBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openBtnActionPerformed
|
||||
@ -279,17 +261,10 @@ public class Controls extends javax.swing.JPanel {
|
||||
updateList();
|
||||
}//GEN-LAST:event_delBtnActionPerformed
|
||||
|
||||
private void expandBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_expandBtnActionPerformed
|
||||
PopoutView pop = new PopoutView(PadUtils.getPad(getSelectedPad()), getSelectedPad());
|
||||
pop.setLocationRelativeTo(this);
|
||||
pop.setVisible(true);
|
||||
}//GEN-LAST:event_expandBtnActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton addBtn;
|
||||
private javax.swing.JButton delBtn;
|
||||
private javax.swing.JButton expandBtn;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
|
@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" value="Preview: "/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<Events>
|
||||
<EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="wrapLines" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="242" max="32767" attributes="0"/>
|
||||
<Component id="closeBtn" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="closeBtn" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="wrapLines" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="280" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="textBox">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="columns" type="int" value="1"/>
|
||||
<Property name="rows" type="int" value="1"/>
|
||||
<Property name="tabSize" type="int" value="4"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="closeBtn">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Close"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="closeBtnActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="wrapLines">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Wrap long lines"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="wrapLinesActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Skylar
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package com.netsyms.symat.padview;
|
||||
|
||||
import static com.netsyms.symat.padview.GUI.logo;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Skylar
|
||||
*/
|
||||
public class PopoutView extends javax.swing.JFrame {
|
||||
|
||||
/**
|
||||
* Creates new form PopoutView
|
||||
* @param content
|
||||
* @param title
|
||||
*/
|
||||
public PopoutView(String content, String title) {
|
||||
initComponents();
|
||||
setIconImages(logo);
|
||||
textBox.setText(content);
|
||||
setTitle(getTitle() + title);
|
||||
if (!PrefStorage.getSetting("wrapLines").equals("")) {
|
||||
wrapLines.setSelected(true);
|
||||
wrap(wrapLines.isSelected());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
textBox = new javax.swing.JTextArea();
|
||||
closeBtn = new javax.swing.JButton();
|
||||
wrapLines = new javax.swing.JCheckBox();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle("Preview: ");
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
public void windowClosing(java.awt.event.WindowEvent evt) {
|
||||
formWindowClosing(evt);
|
||||
}
|
||||
});
|
||||
|
||||
textBox.setEditable(false);
|
||||
textBox.setColumns(1);
|
||||
textBox.setRows(1);
|
||||
textBox.setTabSize(4);
|
||||
jScrollPane1.setViewportView(textBox);
|
||||
|
||||
closeBtn.setText("Close");
|
||||
closeBtn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
closeBtnActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
wrapLines.setText("Wrap long lines");
|
||||
wrapLines.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
wrapLinesActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(wrapLines)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 242, Short.MAX_VALUE)
|
||||
.addComponent(closeBtn))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(closeBtn)
|
||||
.addComponent(wrapLines))
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
pack();
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void wrapLinesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_wrapLinesActionPerformed
|
||||
wrap(wrapLines.isSelected());
|
||||
}//GEN-LAST:event_wrapLinesActionPerformed
|
||||
|
||||
private void wrap(boolean wrap) {
|
||||
textBox.setLineWrap(wrap);
|
||||
textBox.setWrapStyleWord(wrap);
|
||||
}
|
||||
|
||||
private void save() {
|
||||
PrefStorage.saveSetting("wrapLines", (wrapLines.isSelected() ? "yes" : ""));
|
||||
}
|
||||
|
||||
private void closeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeBtnActionPerformed
|
||||
save();
|
||||
dispose();
|
||||
}//GEN-LAST:event_closeBtnActionPerformed
|
||||
|
||||
private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
|
||||
save();
|
||||
}//GEN-LAST:event_formWindowClosing
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton closeBtn;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JTextArea textBox;
|
||||
private javax.swing.JCheckBox wrapLines;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 408 B |
Loading…
x
Reference in New Issue
Block a user