/*
* rssgui.java
*
* Created on 13 april 2008, 21:47
*/
package dshub.plugin;
/**
*
* @author Toast
*/
public class rssgui extends javax.swing.JFrame {
/** Creates new form rssgui */
public rssgui() {
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.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
save_btn = new javax.swing.JButton();
url_addie = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
RSSLabel = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("RSS Feed Plugin v 0.2");
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setName("rssframe"); // NOI18N
setResizable(false);
addWindowFocusListener(new java.awt.event.WindowFocusListener() {
public void windowGainedFocus(java.awt.event.WindowEvent evt) {
formWindowGainedFocus(evt);
}
public void windowLostFocus(java.awt.event.WindowEvent evt) {
}
});
save_btn.setText("Save");
save_btn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
save_btnActionPerformed(evt);
}
});
url_addie.setToolTipText("Enter your URL Adress here then press save");
url_addie.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(204, 204, 204)));
url_addie.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
url_addieActionPerformed(evt);
}
});
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12));
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/dshub/plugin/rss-16x16.png"))); // NOI18N
jLabel2.setText("RSS Feed Plugin v0.2");
jLabel4.setText("2008 © Toast - www.adcportal.com");
jLabel4.setToolTipText("Visit ADCPortal today ;)");
RSSLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/dshub/plugin/rss-add-16x16.png"))); // NOI18N
RSSLabel.setText("Enter your RSS URL");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(save_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(RSSLabel))
.addGroup(layout.createSequentialGroup()
.addGap(255, 255, 255)
.addComponent(jLabel1))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(url_addie, javax.swing.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)))
.addContainerGap())
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(5, 5, 5)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(RSSLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(url_addie, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(save_btn)
.addComponent(jLabel4))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
getAccessibleContext().setAccessibleName("RSS Feed Plugin v0.2");
pack();
}// </editor-fold>//GEN-END:initComponents
private void url_addieActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_url_addieActionPerformed
{//GEN-HEADEREND:event_url_addieActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_url_addieActionPerformed
private void formWindowGainedFocus(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowGainedFocus
{//GEN-HEADEREND:event_formWindowGainedFocus
// TODO add your handling code here:
url_addie.setText(feed.Address);
}//GEN-LAST:event_formWindowGainedFocus
private void save_btnActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_save_btnActionPerformed
{//GEN-HEADEREND:event_save_btnActionPerformed
feed.Address=url_addie.getText();
PluginMain.writeRSSAddress();
this.dispose();
}//GEN-LAST:event_save_btnActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel RSSLabel;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel4;
private javax.swing.JButton save_btn;
private javax.swing.JTextField url_addie;
// End of variables declaration//GEN-END:variables
}