001 /* 002 * LogPanel.java 003 * 004 * Created on May 22, 2003, 12:41 PM 005 * 006 * This file is part of the STAR Scheduler. 007 * Copyright (c) 2002-2006 STAR Collaboration - Brookhaven National Laboratory 008 * 009 * STAR Scheduler is free software; you can redistribute it and/or modify 010 * it under the terms of the GNU General Public License as published by 011 * the Free Software Foundation; either version 2 of the License, or 012 * (at your option) any later version. 013 * 014 * STAR Scheduler is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 * GNU General Public License for more details. 018 * 019 * You should have received a copy of the GNU General Public License 020 * along with STAR Scheduler; if not, write to the Free Software 021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 022 */ 023 024 package gov.bnl.star.offline.scheduler.config; 025 026 /** 027 * 028 * @author Gabriele Carcassi 029 */ 030 public class FileCatalogPanel extends javax.swing.JPanel implements WizardPanel { 031 032 /** Creates new form LogPanel */ 033 public FileCatalogPanel() { 034 initComponents(); 035 } 036 037 /** This method is called from within the constructor to 038 * initialize the form. 039 * WARNING: Do NOT modify this code. The content of this method is 040 * always regenerated by the Form Editor. 041 */ 042 private void initComponents() {//GEN-BEGIN:initComponents 043 java.awt.GridBagConstraints gridBagConstraints; 044 045 instructions = new javax.swing.JTextArea(); 046 fileCatalogLabel = new javax.swing.JLabel(); 047 fileCatalog = new javax.swing.JComboBox(); 048 049 setLayout(new java.awt.GridBagLayout()); 050 051 instructions.setEditable(false); 052 instructions.setLineWrap(true); 053 instructions.setText("The scheduler can write the statistics about the usage to a database\nstastics - on or off to turn on and off statistics\nURL/username/password - used to tell the JDBC driver which DB to use"); 054 instructions.setWrapStyleWord(true); 055 instructions.setFocusable(false); 056 instructions.setOpaque(false); 057 gridBagConstraints = new java.awt.GridBagConstraints(); 058 gridBagConstraints.gridwidth = 2; 059 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 060 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 061 gridBagConstraints.weightx = 1.0; 062 gridBagConstraints.insets = new java.awt.Insets(5, 5, 15, 5); 063 add(instructions, gridBagConstraints); 064 065 fileCatalogLabel.setText("FileCatalog implementation*"); 066 gridBagConstraints = new java.awt.GridBagConstraints(); 067 gridBagConstraints.gridx = 0; 068 gridBagConstraints.gridy = 1; 069 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 070 gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 0); 071 add(fileCatalogLabel, gridBagConstraints); 072 073 fileCatalog.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "gov.bnl.star.offline.scheduler.catalog.StarCatalog" })); 074 fileCatalog.addItemListener(new java.awt.event.ItemListener() { 075 public void itemStateChanged(java.awt.event.ItemEvent evt) { 076 comboChanged(evt); 077 } 078 }); 079 080 gridBagConstraints = new java.awt.GridBagConstraints(); 081 gridBagConstraints.gridx = 1; 082 gridBagConstraints.gridy = 1; 083 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 084 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; 085 gridBagConstraints.weightx = 1.0; 086 gridBagConstraints.weighty = 1.0; 087 gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5); 088 add(fileCatalog, gridBagConstraints); 089 090 }//GEN-END:initComponents 091 092 private void comboChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboChanged 093 firePropertyChange("ready", oldReady, isReady()); 094 oldReady = isReady(); 095 }//GEN-LAST:event_comboChanged 096 097 private boolean oldReady; 098 public String getTitle() { 099 return "File catalog"; 100 } 101 102 public boolean isReady() { 103 if ("".equals(fileCatalog.getSelectedItem())) return false; 104 return true; 105 } 106 107 public void addProperties(java.util.Map schedulerProperties) { 108 schedulerProperties.put("FileCatalog", fileCatalog.getSelectedItem()); 109 } 110 111 // Variables declaration - do not modify//GEN-BEGIN:variables 112 private javax.swing.JComboBox fileCatalog; 113 private javax.swing.JLabel fileCatalogLabel; 114 private javax.swing.JTextArea instructions; 115 // End of variables declaration//GEN-END:variables 116 117 }