/*
* JournalSearchInstructions.java
*
* Created on 16 July 2008, 15:47
*/
package paperscope;
import edu.stanford.ejalbert.BrowserLauncher;
import java.awt.Cursor;
/**
*
* @author Mark
*/
public class JournalSearchInstructions extends javax.swing.JFrame {
/** Creates new form JournalSearchInstructions */
public JournalSearchInstructions() {
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() {
jLabel1 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
Bibcode_Link_Label = new javax.swing.JLabel();
Close_Button = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12));
jLabel1.setText("Journal Search Instructions");
jTextArea1.setBackground(new java.awt.Color(204, 204, 204));
jTextArea1.setColumns(20);
jTextArea1.setEditable(false);
jTextArea1.setFont(new java.awt.Font("Tahoma", 0, 11));
jTextArea1.setLineWrap(true);
jTextArea1.setRows(5);
jTextArea1.setText("This allows you to find articles from journal references by year, journal, volume, and/or page. Each field is optional. \n\nThe entries can contain wildcard characters ('?'). Example: 20?? in the year field finds all years from 2000-2099. The Journal Codes are available by clicking on the link provided below (also found on the Journal Search Panel).");
jTextArea1.setWrapStyleWord(true);
jScrollPane1.setViewportView(jTextArea1);
Bibcode_Link_Label.setForeground(new java.awt.Color(0, 51, 255));
Bibcode_Link_Label.setText("List of Bibliographic Code Abbreviations");
Bibcode_Link_Label.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
Bibcode_Link_LabelMouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
Bibcode_Link_LabelMouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
Bibcode_Link_LabelMouseExited(evt);
}
});
Close_Button.setText("Close");
Close_Button.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
Close_ButtonMouseClicked(evt);
}
});
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)
.addComponent(jLabel1)
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Bibcode_Link_Label)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE)))
.addComponent(Close_Button, javax.swing.GroupLayout.Alignment.TRAILING))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(16, 16, 16)
.addComponent(Bibcode_Link_Label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(Close_Button)
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void Bibcode_Link_LabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Bibcode_Link_LabelMouseExited
Cursor cursor = new Cursor(Cursor.DEFAULT_CURSOR);
setCursor(cursor);
}//GEN-LAST:event_Bibcode_Link_LabelMouseExited
private void Bibcode_Link_LabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Bibcode_Link_LabelMouseEntered
Cursor cursor = new Cursor(Cursor.HAND_CURSOR);
setCursor(cursor);
}//GEN-LAST:event_Bibcode_Link_LabelMouseEntered
private void Bibcode_Link_LabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Bibcode_Link_LabelMouseClicked
try{
//==== Create the browser launcher, open the URL in the user's browser
BrowserLauncher launch = new BrowserLauncher();
launch.openURLinBrowser("http://adsabs.harvard.edu/abs_doc/journal_abbr.html");
}
catch (Exception e){
System.out.println(e);
}
}//GEN-LAST:event_Bibcode_Link_LabelMouseClicked
private void Close_ButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Close_ButtonMouseClicked
this.dispose();
}//GEN-LAST:event_Close_ButtonMouseClicked
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new JournalSearchInstructions().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel Bibcode_Link_Label;
private javax.swing.JButton Close_Button;
private javax.swing.JLabel jLabel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea jTextArea1;
// End of variables declaration//GEN-END:variables
}