From 447a275f5025e4d887cd479148e9d5c4258cb31b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 30 Jul 2008 01:27:51 +0000 Subject: Client: Created Add Subscription form shell Added the frontend for the Add Subscription form, as well as some menus for InstaDiscView. However, the Add Subscription form doesn't do anything yet, and the menus don't open anything yet. --- .../fourisland/instadisc/AddSubscriptionForm.form | 123 ++++++++++++++++ .../fourisland/instadisc/AddSubscriptionForm.java | 154 +++++++++++++++++++++ .../com/fourisland/instadisc/InstaDiscView.form | 40 ++++++ .../com/fourisland/instadisc/InstaDiscView.java | 45 ++++++ .../resources/AddSubscriptionForm.properties | 9 ++ .../instadisc/resources/InstaDiscView.properties | 7 +- 6 files changed, 377 insertions(+), 1 deletion(-) create mode 100644 client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.form create mode 100644 client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.java create mode 100644 client/trunk/src/com/fourisland/instadisc/resources/AddSubscriptionForm.properties diff --git a/client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.form b/client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.form new file mode 100644 index 0000000..3435493 --- /dev/null +++ b/client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.form @@ -0,0 +1,123 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.java b/client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.java new file mode 100644 index 0000000..149bea1 --- /dev/null +++ b/client/trunk/src/com/fourisland/instadisc/AddSubscriptionForm.java @@ -0,0 +1,154 @@ +/* + * AddSubscriptionForm.java + * + * Created on July 29, 2008, 6:45 PM + */ + +package com.fourisland.instadisc; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author hatkirby + */ +public class AddSubscriptionForm extends javax.swing.JDialog { + + /** Creates new form AddSubscriptionForm */ + public AddSubscriptionForm(java.awt.Frame parent, boolean modal) { + super(parent, modal); + initComponents(); + } + + /** 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. + */ + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jTextField1 = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jLabel4 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setName("Form"); // NOI18N + + org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.fourisland.instadisc.InstaDiscApp.class).getContext().getResourceMap(AddSubscriptionForm.class); + jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N + jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N + jLabel1.setName("jLabel1"); // NOI18N + + jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N + jLabel2.setName("jLabel2"); // NOI18N + + jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N + jLabel3.setName("jLabel3"); // NOI18N + + jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N + jTextField1.setName("jTextField1"); // NOI18N + + jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N + jButton1.setName("jButton1"); // NOI18N + + jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N + jButton2.setName("jButton2"); // NOI18N + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N + jLabel4.setName("jLabel4"); // NOI18N + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel1) + .addGroup(layout.createSequentialGroup() + .addGap(12, 12, 12) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jTextField1)) + .addComponent(jLabel2))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton1))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel2) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel3) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2) + .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + try { + URL url = new URL(jTextField1.getText());//GEN-LAST:event_jButton2ActionPerformed + } catch (MalformedURLException ex) { + jLabel4.setText("Error: "); + } + } + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + AddSubscriptionForm dialog = new AddSubscriptionForm(new javax.swing.JFrame(), true); + dialog.addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent e) { + System.exit(0); + } + }); + dialog.setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables + +} diff --git a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.form b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.form index d88434a..ec8d250 100644 --- a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.form +++ b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.form @@ -65,6 +65,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -79,6 +99,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java index e2d0058..d2362dd 100644 --- a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java +++ b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java @@ -122,7 +122,13 @@ public class InstaDiscView extends FrameView { jList1 = new javax.swing.JList(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); + jMenuItem1 = new javax.swing.JMenuItem(); + jMenuItem2 = new javax.swing.JMenuItem(); + jSeparator1 = new javax.swing.JSeparator(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); + jMenu1 = new javax.swing.JMenu(); + jMenuItem3 = new javax.swing.JMenuItem(); + jMenuItem4 = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); statusPanel = new javax.swing.JPanel(); @@ -161,6 +167,22 @@ public class InstaDiscView extends FrameView { fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N + jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N + jMenuItem1.setName("jMenuItem1"); // NOI18N + jMenuItem1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jMenuItem1ActionPerformed(evt); + } + }); + fileMenu.add(jMenuItem1); + + jMenuItem2.setText(resourceMap.getString("jMenuItem2.text")); // NOI18N + jMenuItem2.setName("jMenuItem2"); // NOI18N + fileMenu.add(jMenuItem2); + + jSeparator1.setName("jSeparator1"); // NOI18N + fileMenu.add(jSeparator1); + javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(com.fourisland.instadisc.InstaDiscApp.class).getContext().getActionMap(InstaDiscView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N @@ -168,6 +190,19 @@ public class InstaDiscView extends FrameView { menuBar.add(fileMenu); + jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N + jMenu1.setName("jMenu1"); // NOI18N + + jMenuItem3.setText(resourceMap.getString("jMenuItem3.text")); // NOI18N + jMenuItem3.setName("jMenuItem3"); // NOI18N + jMenu1.add(jMenuItem3); + + jMenuItem4.setText(resourceMap.getString("jMenuItem4.text")); // NOI18N + jMenuItem4.setName("jMenuItem4"); // NOI18N + jMenu1.add(jMenuItem4); + + menuBar.add(jMenu1); + helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N @@ -232,9 +267,19 @@ public class InstaDiscView extends FrameView { } }//GEN-LAST:event_jList1MouseClicked + private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jMenuItem1ActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JList jList1; + private javax.swing.JMenu jMenu1; + private javax.swing.JMenuItem jMenuItem1; + private javax.swing.JMenuItem jMenuItem2; + private javax.swing.JMenuItem jMenuItem3; + private javax.swing.JMenuItem jMenuItem4; private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JSeparator jSeparator1; private javax.swing.JPanel mainPanel; private javax.swing.JMenuBar menuBar; private javax.swing.JProgressBar progressBar; diff --git a/client/trunk/src/com/fourisland/instadisc/resources/AddSubscriptionForm.properties b/client/trunk/src/com/fourisland/instadisc/resources/AddSubscriptionForm.properties new file mode 100644 index 0000000..1bafc98 --- /dev/null +++ b/client/trunk/src/com/fourisland/instadisc/resources/AddSubscriptionForm.properties @@ -0,0 +1,9 @@ +jLabel1.text=Add a Subscription +#NOI18N +jLabel1.font=DejaVu Sans-Plain-18 +jLabel2.text=To recieve InstaDisc notifications, you need to subscribe
to a website's content. If a website supports InstaDisc
it should be advertising a link to an "InstaDisc Subscription
File". To subscribe to that website's content, copy the URL
into the box below. +jLabel3.text=Subscription File URL: +jTextField1.text= +jButton1.text=Cancel +jButton2.text=OK +jLabel4.text= diff --git a/client/trunk/src/com/fourisland/instadisc/resources/InstaDiscView.properties b/client/trunk/src/com/fourisland/instadisc/resources/InstaDiscView.properties index e1c2be6..80a0b3e 100644 --- a/client/trunk/src/com/fourisland/instadisc/resources/InstaDiscView.properties +++ b/client/trunk/src/com/fourisland/instadisc/resources/InstaDiscView.properties @@ -29,4 +29,9 @@ StatusBar.busyIcons[10] = busyicons/busy-icon10.png StatusBar.busyIcons[11] = busyicons/busy-icon11.png StatusBar.busyIcons[12] = busyicons/busy-icon12.png StatusBar.busyIcons[13] = busyicons/busy-icon13.png -StatusBar.busyIcons[14] = busyicons/busy-icon14.png \ No newline at end of file +StatusBar.busyIcons[14] = busyicons/busy-icon14.png +jMenuItem1.text=Add Subscription +jMenuItem2.text=Manage Subscriptions +jMenu1.text=Tools +jMenuItem3.text=Manage Filters +jMenuItem4.text=Request Retained Items -- cgit 1.4.1