001: /*
002: * ReportElementCustomizationPanel.java
003: *
004: * Created on October 15, 2007, 2:56 PM
005: */
006:
007: package org.netbeans.modules.reportgenerator.customization;
008:
009: import org.netbeans.modules.reportgenerator.api.ReportCustomizationOptions;
010:
011: /**
012: *
013: * @author radval
014: */
015: public class ReportCustomizationPanel extends javax.swing.JPanel {
016:
017: private ReportCustomizationOptions mOptions;
018:
019: public ReportCustomizationPanel(ReportCustomizationOptions options) {
020: this ();
021: mOptions = options;
022: initGUI();
023: }
024:
025: /** Creates new form ReportElementCustomizationPanel */
026: public ReportCustomizationPanel() {
027: initComponents();
028: }
029:
030: /** This method is called from within the constructor to
031: * initialize the form.
032: * WARNING: Do NOT modify this code. The content of this method is
033: * always regenerated by the Form Editor.
034: */
035: // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
036: private void initComponents() {
037:
038: generateVerboseReportCheckBox = new javax.swing.JCheckBox();
039: includeOnlyElementsWithDocumentationCheckBox = new javax.swing.JCheckBox();
040:
041: generateVerboseReportCheckBox
042: .setText(org.openide.util.NbBundle
043: .getMessage(ReportCustomizationPanel.class,
044: "ReportCustomizationPanel.generateVerboseReportCheckBox.text")); // NOI18N
045: generateVerboseReportCheckBox
046: .addActionListener(new java.awt.event.ActionListener() {
047: public void actionPerformed(
048: java.awt.event.ActionEvent evt) {
049: generateVerboseReportCheckBoxActionPerformed(evt);
050: }
051: });
052:
053: includeOnlyElementsWithDocumentationCheckBox
054: .setText(org.openide.util.NbBundle
055: .getMessage(ReportCustomizationPanel.class,
056: "ReportCustomizationPanel.includeOnlyElementsWithDocumentationCheckBox.text")); // NOI18N
057: includeOnlyElementsWithDocumentationCheckBox
058: .addActionListener(new java.awt.event.ActionListener() {
059: public void actionPerformed(
060: java.awt.event.ActionEvent evt) {
061: includeOnlyElementsWithDocumentationCheckBoxActionPerformed(evt);
062: }
063: });
064:
065: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
066: this );
067: this .setLayout(layout);
068: layout
069: .setHorizontalGroup(layout
070: .createParallelGroup(
071: org.jdesktop.layout.GroupLayout.LEADING)
072: .add(
073: layout
074: .createSequentialGroup()
075: .addContainerGap()
076: .add(
077: layout
078: .createParallelGroup(
079: org.jdesktop.layout.GroupLayout.LEADING)
080: .add(
081: generateVerboseReportCheckBox)
082: .add(
083: includeOnlyElementsWithDocumentationCheckBox))
084: .addContainerGap(167,
085: Short.MAX_VALUE)));
086: layout.setVerticalGroup(layout.createParallelGroup(
087: org.jdesktop.layout.GroupLayout.LEADING).add(
088: layout.createSequentialGroup().addContainerGap().add(
089: generateVerboseReportCheckBox).addPreferredGap(
090: org.jdesktop.layout.LayoutStyle.RELATED).add(
091: includeOnlyElementsWithDocumentationCheckBox)
092: .addContainerGap(247, Short.MAX_VALUE)));
093: }// </editor-fold>//GEN-END:initComponents
094:
095: private void generateVerboseReportCheckBoxActionPerformed(
096: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateVerboseReportCheckBoxActionPerformed
097: //ReportCustomizationOptions.setGenerateVerboseReport(generateVerboseReportCheckBox.isSelected());
098: }//GEN-LAST:event_generateVerboseReportCheckBoxActionPerformed
099:
100: private void includeOnlyElementsWithDocumentationCheckBoxActionPerformed(
101: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_includeOnlyElementsWithDocumentationCheckBoxActionPerformed
102: // TODO add your handling code here:
103: }//GEN-LAST:event_includeOnlyElementsWithDocumentationCheckBoxActionPerformed
104:
105: private void initGUI() {
106: generateVerboseReportCheckBox.setSelected(mOptions
107: .isGenerateVerboseReport());
108: }
109:
110: public boolean isGenerateVerboseReport() {
111: return generateVerboseReportCheckBox.isSelected();
112: }
113:
114: public boolean isIncludeOnlyElementsWithDocumentation() {
115: return includeOnlyElementsWithDocumentationCheckBox
116: .isSelected();
117: }
118:
119: // Variables declaration - do not modify//GEN-BEGIN:variables
120: private javax.swing.JCheckBox generateVerboseReportCheckBox;
121: private javax.swing.JCheckBox includeOnlyElementsWithDocumentationCheckBox;
122: // End of variables declaration//GEN-END:variables
123:
124: }
|