-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
292 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
* Created by JFormDesigner on Mon Apr 10 14:57:16 PDT 2017 | ||
*/ | ||
|
||
package com.k4ch0w.pwnback; | ||
|
||
import net.miginfocom.swing.MigLayout; | ||
import org.xml.sax.SAXException; | ||
|
||
import javax.swing.*; | ||
import javax.swing.event.ListSelectionListener; | ||
import java.awt.*; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
|
||
/** | ||
* @author Paul Ganea | ||
*/ | ||
class PwnBackDocumentFrame extends JFrame { | ||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables | ||
// Generated using JFormDesigner commercial license | ||
private JScrollPane scrollPane1; | ||
private JList<PwnBackDocument> list1; | ||
private JPanel panel1; | ||
private JScrollPane scrollPane2; | ||
private JTextPane textPane1; | ||
|
||
PwnBackDocumentFrame(ArrayList<PwnBackDocument> docs) throws IOException, SAXException { | ||
initComponents(); | ||
DefaultListModel<PwnBackDocument> listModel; | ||
listModel = new DefaultListModel<>(); | ||
for (PwnBackDocument doc : docs) { | ||
listModel.addElement(doc); | ||
} | ||
list1.setModel(listModel); | ||
ListSelectionListener listSelectionListener = listSelectionEvent -> { | ||
if (!listSelectionEvent.getValueIsAdjusting()) { | ||
textPane1.setText(listModel.get(list1.getSelectedIndex()).getDocument()); | ||
} | ||
}; | ||
list1.addListSelectionListener(listSelectionListener); | ||
textPane1.setText(docs.get(0).getDocument()); | ||
textPane1.setEditable(false); | ||
} | ||
|
||
private void initComponents() { | ||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents | ||
// Generated using JFormDesigner non-commercial license | ||
scrollPane1 = new JScrollPane(); | ||
list1 = new JList<>(); | ||
panel1 = new JPanel(); | ||
scrollPane2 = new JScrollPane(); | ||
textPane1 = new JTextPane(); | ||
|
||
//======== this ======== | ||
setMinimumSize(new Dimension(1000, 700)); | ||
Container contentPane = getContentPane(); | ||
contentPane.setLayout(new MigLayout( | ||
"insets 0,hidemode 3", | ||
// columns | ||
"[fill]" + | ||
"[grow]", | ||
// rows | ||
"[grow,fill]")); | ||
|
||
//======== scrollPane1 ======== | ||
{ | ||
scrollPane1.setMinimumSize(new Dimension(250, 148)); | ||
scrollPane1.setPreferredSize(new Dimension(250, 148)); | ||
scrollPane1.setViewportView(list1); | ||
} | ||
contentPane.add(scrollPane1, "cell 0 0"); | ||
|
||
//======== panel1 ======== | ||
{ | ||
panel1.setLayout(new GridLayout()); | ||
|
||
//======== scrollPane2 ======== | ||
{ | ||
scrollPane2.setViewportView(textPane1); | ||
} | ||
panel1.add(scrollPane2); | ||
} | ||
contentPane.add(panel1, "cell 1 0,growx"); | ||
pack(); | ||
setLocationRelativeTo(getOwner()); | ||
// JFormDesigner - End of component initialization //GEN-END:initComponents | ||
} | ||
// JFormDesigner - End of variables declaration //GEN-END:variables | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
JFDML JFormDesigner: "6.0.0.0.84" Java: "1.8.0_112-release" encoding: "UTF-8" | ||
|
||
new FormModel { | ||
contentType: "form/swing" | ||
root: new FormRoot { | ||
add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { | ||
"$layoutConstraints": "insets 0,hidemode 3" | ||
"$columnConstraints": "[fill][grow]" | ||
"$rowConstraints": "[grow,fill]" | ||
} ) { | ||
name: "this" | ||
"minimumSize": new java.awt.Dimension( 1000, 700 ) | ||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { | ||
name: "scrollPane1" | ||
"minimumSize": new java.awt.Dimension( 250, 148 ) | ||
"preferredSize": new java.awt.Dimension( 250, 148 ) | ||
add( new FormComponent( "javax.swing.JList" ) { | ||
name: "list1" | ||
auxiliary() { | ||
"JavaCodeGenerator.typeParameters": "String" | ||
} | ||
} ) | ||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { | ||
"value": "cell 0 0" | ||
} ) | ||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.GridLayout ) ) { | ||
name: "panel1" | ||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { | ||
name: "scrollPane2" | ||
add( new FormComponent( "javax.swing.JTextPane" ) { | ||
name: "textPane1" | ||
} ) | ||
} ) | ||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { | ||
"value": "cell 1 0,growx" | ||
} ) | ||
}, new FormLayoutConstraints( null ) { | ||
"location": new java.awt.Point( 0, 0 ) | ||
"size": new java.awt.Dimension( 600, 400 ) | ||
} ) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.