/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.wcs.netbeans.liquiface.ui.wizards.panel; /* * #%L * Liquiface - GUI for Liquibase * %% * Copyright (C) 2013 Webstar Csoport Kft. * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ import com.wcs.netbeans.liquiface.change.store.ChangeSetMode; import com.wcs.netbeans.liquiface.facade.ModelFacade; import java.io.File; import javax.swing.JPanel; /** * * @author tveki */ public class ChangelogSummaryPanel extends JPanel { /** * Creates new form SaveChangelogVisualPanel1 */ public ChangelogSummaryPanel() { initComponents(); } @Override public String getName() { return "Verify changelog file and changesets"; } public void setSummaryData(File changelogFile, ChangeSetMode changeSetMode){ changelogFileNameField.setText(changelogFile.getAbsolutePath()); changelogTextArea.setText(ModelFacade.getInstance().writeChangeSetsToString(changeSetMode)); } /** * 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() { changelogFileNameField = new javax.swing.JTextField(); changelogScrollPane = new javax.swing.JScrollPane(); changelogTextArea = new javax.swing.JTextArea(); changelogLabel = new javax.swing.JLabel(); changelogFileNameField.setEditable(false); changelogFileNameField.setText(org.openide.util.NbBundle.getMessage(ChangelogSummaryPanel.class, "ChangelogSummaryPanel.changelogFileNameField.text")); // NOI18N changelogTextArea.setEditable(false); changelogTextArea.setColumns(50); changelogTextArea.setLineWrap(true); changelogTextArea.setText(org.openide.util.NbBundle.getMessage(ChangelogSummaryPanel.class, "ChangelogSummaryPanel.changelogTextArea.text")); // NOI18N changelogScrollPane.setViewportView(changelogTextArea); changelogLabel.setText(org.openide.util.NbBundle.getMessage(ChangelogSummaryPanel.class, "ChangelogSummaryPanel.changelogLabel.text")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(changelogScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(changelogLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(4, 4, 4) .addComponent(changelogFileNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 558, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(21, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(26, 26, 26) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(changelogFileNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(changelogLabel)) .addGap(18, 18, 18) .addComponent(changelogScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 483, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField changelogFileNameField; private javax.swing.JLabel changelogLabel; private javax.swing.JScrollPane changelogScrollPane; private javax.swing.JTextArea changelogTextArea; // End of variables declaration//GEN-END:variables }