MCPcopy Index your code
hub / github.com/OpenSourcePhysics/osp / EncryptionTool

Class EncryptionTool

src/org/opensourcephysics/tools/EncryptionTool.java:54–604  ·  view source on GitHub ↗

This provides a GUI for encrypting and decrypting XMLControls. @author Douglas Brown @version 1.0

Source from the content-addressed store, hash-verified

52 * @version 1.0
53 */
54@SuppressWarnings("serial")
55public class EncryptionTool extends JFrame implements Tool {
56 // static fields
57 private static Dimension dim = new Dimension(720, 500);
58 // instance fields
59 private XMLTreePanel treePanel;
60 private JPanel contentPane = new JPanel(new BorderLayout());
61 private JobManager jobManager = new JobManager(this);
62 private JTextField passwordField;
63 private JCheckBox encryptedCheckBox;
64 private JCheckBox previewCheckBox;
65 private String fileName;
66 private JMenuItem openItem;
67 private JMenuItem saveItem;
68 private JMenuItem saveAsItem;
69 private JLabel passwordLabel;
70 private JMenu fileMenu;
71 private JMenu helpMenu;
72 private JMenuItem exitItem;
73 private JMenuItem logItem;
74 private JMenuItem aboutItem;
75 private Icon openIcon;
76 private JButton openButton;
77 private Icon saveIcon;
78 private JButton saveButton;
79
80 /**
81 * A shared encryption tool.
82 */
83 private static final EncryptionTool ENCRYPTION_TOOL = new EncryptionTool();
84
85 /**
86 * Gets the shared EncryptionTool.
87 *
88 * @return the shared EncryptionTool
89 */
90 public static EncryptionTool getTool() {
91 return ENCRYPTION_TOOL;
92 }
93
94 /**
95 * Constructs a blank EncryptionTool.
96 */
97 public EncryptionTool() {
98 String name = "EncryptionTool"; //$NON-NLS-1$
99 setName(name);
100 createGUI();
101 refreshGUI();
102 Toolbox.addTool(name, this);
103 }
104
105 /**
106 * Constructs a EncryptionTool and opens the specified xml file.
107 *
108 * @param fileName the name of the xml file
109 */
110 public EncryptionTool(String fileName) {
111 this();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected