/*************************************************** * * cismet GmbH, Saarbruecken, Germany * * ... and it just works. * ****************************************************/ package de.cismet.cids.custom.switchon.wizards; import org.openide.WizardDescriptor; import de.cismet.cids.custom.switchon.gui.InfoReceiver; /** * An {@code InfoReceiver} used in the wizard to explain the functionality of a panel to the user. * * @author Gilles Baatz * @version $Revision$, $Date$ */ public class WizardInfoBoxPanel extends javax.swing.JPanel implements InfoReceiver { //~ Static fields/initializers --------------------------------------------- private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(WizardInfoBoxPanel.class); //~ Instance fields -------------------------------------------------------- private WizardDescriptor wizard; // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea txtaInfo; // End of variables declaration//GEN-END:variables //~ Constructors ----------------------------------------------------------- /** * Creates new form WizardInfoBoxPanel. */ public WizardInfoBoxPanel() { initComponents(); } //~ Methods ---------------------------------------------------------------- /** * 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. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); txtaInfo = new javax.swing.JTextArea(); setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory.createTitledBorder( org.openide.util.NbBundle.getMessage( WizardInfoBoxPanel.class, "WizardInfoBoxPanel.border.outsideBorder.title")), javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10))); // NOI18N setMinimumSize(new java.awt.Dimension(380, 95)); setPreferredSize(new java.awt.Dimension(380, 95)); setLayout(new java.awt.BorderLayout()); jScrollPane1.setBorder(null); txtaInfo.setEditable(false); txtaInfo.setColumns(20); txtaInfo.setLineWrap(true); txtaInfo.setRows(3); txtaInfo.setWrapStyleWord(true); txtaInfo.setOpaque(false); jScrollPane1.setViewportView(txtaInfo); add(jScrollPane1, java.awt.BorderLayout.CENTER); } // </editor-fold>//GEN-END:initComponents @Override public void setInformation(final String information) { txtaInfo.setText(information); } @Override public void setError(final String error) { if (wizard != null) { wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, error); } else { LOG.warn("No wizard object.", new Exception()); } } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public WizardDescriptor getWizard() { return wizard; } /** * DOCUMENT ME! * * @param wizard DOCUMENT ME! */ public void setWizard(final WizardDescriptor wizard) { this.wizard = wizard; } }