⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reportpropertiesframe.java

📁 iReport-0.4.1-src是iReport的源代码,iReport是一个开源的报表项目,可以生成PDF等格式报表
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
        jPanel5.add(jComboBoxWhenNoData, gridBagConstraints);

        jCheckBoxFloatColumnFooter.setText("Floating column footer");
        jCheckBoxFloatColumnFooter.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jCheckBoxFloatColumnFooter.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        jCheckBoxFloatColumnFooter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxFloatColumnFooterActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
        jPanel5.add(jCheckBoxFloatColumnFooter, gridBagConstraints);

        jTabbedPane1.addTab("tab4", jPanel5);

        jPanel11.setLayout(new java.awt.GridBagLayout());

        jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel17.setText("Resource budle base name");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(7, 7, 3, 3);
        jPanel11.add(jLabel17, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 7, 15, 7);
        jPanel11.add(jTextFieldResourceBundleBaseName, gridBagConstraints);

        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel16.setText("XML encoding");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 7, 3, 3);
        jPanel11.add(jLabel16, gridBagConstraints);

        jComboBoxXMLEncoding.setEditable(true);
        jComboBoxXMLEncoding.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxXMLEncodingActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 7, 5, 7);
        jPanel11.add(jComboBoxXMLEncoding, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 10;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        jPanel11.add(jPanel12, gridBagConstraints);

        jTabbedPane1.addTab("i18n", jPanel11);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
        jPanel10.add(jTabbedPane1, gridBagConstraints);

        jPanel9.setLayout(new java.awt.GridBagLayout());

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel1.setText("Report name:");
        jLabel1.setMaximumSize(new java.awt.Dimension(2000, 16));
        jLabel1.setMinimumSize(new java.awt.Dimension(150, 16));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        jPanel9.add(jLabel1, gridBagConstraints);

        jTextFieldName.setMinimumSize(new java.awt.Dimension(300, 20));
        jTextFieldName.setPreferredSize(new java.awt.Dimension(300, 20));
        jTextFieldName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldNameActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        jPanel9.add(jTextFieldName, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 5, 3);
        jPanel10.add(jPanel9, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1000.0;
        getContentPane().add(jPanel10, gridBagConstraints);

        pack();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        java.awt.Dimension dialogSize = getSize();
        setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2);
    }//GEN-END:initComponents

    private void jCheckBoxFloatColumnFooterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxFloatColumnFooterActionPerformed
        floatColumnFooter = jCheckBoxFloatColumnFooter.isSelected();
    }//GEN-LAST:event_jCheckBoxFloatColumnFooterActionPerformed
    
    private void jComboBoxScriptletHandlingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxScriptletHandlingActionPerformed
        if (jComboBoxScriptletHandling.getSelectedIndex() == 0) {
            jTextFieldScriptletClass.setText("");
            jTextFieldScriptletClass.setEnabled( false );
        }
        else if (jComboBoxScriptletHandling.getSelectedIndex() == 1) {
            jTextFieldScriptletClass.setText("");
            jTextFieldScriptletClass.setEnabled( false );
        }
        else if (jComboBoxScriptletHandling.getSelectedIndex() == 2) {
            jTextFieldScriptletClass.setEnabled( true );
        }
        this.scriptletHandling = jComboBoxScriptletHandling.getSelectedIndex();
        
    }//GEN-LAST:event_jComboBoxScriptletHandlingActionPerformed
    
    private void jCheckBoxSummaryOnNewPageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxSummaryOnNewPageActionPerformed
        this.summaryOnNewPage = jCheckBoxSummaryOnNewPage.isSelected();
    }//GEN-LAST:event_jCheckBoxSummaryOnNewPageActionPerformed
    
    private void jComboBoxOrientationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxOrientationActionPerformed
        orientation = (String)this.jComboBoxOrientation.getSelectedItem();
        int reportSwitch = 0;
        adjustSizes();
    }//GEN-LAST:event_jComboBoxOrientationActionPerformed
    
    private void jComboBoxSizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxSizeActionPerformed
        reportFormat = (String)this.jComboBoxSize.getSelectedItem();
        if( reportFormat!=null && !reportFormat.equalsIgnoreCase( "CUSTOM") ) {
            // set the Size fields.
            Point p = PageSize.getFormatSize(reportFormat);
            
            setReportWidth(p.x);
            setReportHeight(p.y);
            
            // reshuffle Height and Width according to Orientation
            adjustSizes();
        }
    }//GEN-LAST:event_jComboBoxSizeActionPerformed
    
    private void jComboBoxXMLEncodingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxXMLEncodingActionPerformed
        this.xmlEncoding = jComboBoxXMLEncoding.getSelectedItem()+"";
    }//GEN-LAST:event_jComboBoxXMLEncodingActionPerformed
    
    private void jComboBoxWhenNoDataActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxWhenNoDataActionPerformed
        this.whenNoDataType = jComboBoxWhenNoData.getSelectedItem()+"";
    }//GEN-LAST:event_jComboBoxWhenNoDataActionPerformed
    
    private void jComboBoxPrintOrderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxPrintOrderActionPerformed
        this.printOrder = jComboBoxPrintOrder.getSelectedItem()+"";
    }//GEN-LAST:event_jComboBoxPrintOrderActionPerformed
    
    private void jNumberFieldColumnsSpacingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldColumnsSpacingActionPerformed
        
        double convert = 1.0;
        convert = this.getConversionUnit(this.jComboBoxColumnsSpacingUnit);
        //int old_spacing = getColumnsSpacing();
        this.columnsSpacing  = (int)Unit.convertToPixels(jNumberFieldColumnsSpacing.getValue(),convert);
        
        int avail = getReportWidth() - getLeftMargin() - getRightMargin();
        int dim = avail;
        
        // calculate space...
        if ((this.columnsSpacing*(getColumns()-1)) > avail) {
            MessageBox.show("WARNING: Column spacing too big!", "Error", MessageBox.OK | MessageBox.ICONWARNING );
        }
        while (dim>0 && (dim*getColumns())+(getColumnsSpacing()*(getColumns()-1)) > avail) {
            dim--;
        }
        
        this.setColumnsWidth(dim);
    }//GEN-LAST:event_jNumberFieldColumnsSpacingActionPerformed
    
    private void jNumberFieldColumnsWidthActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldColumnsWidthActionPerformed
        this.columnsWidth = (int)Unit.convertToPixels(this.jNumberFieldColumnsWidth.getValue(),this.getConversionUnit(jComboBoxColumnsWidthUnit));
    }//GEN-LAST:event_jNumberFieldColumnsWidthActionPerformed
    
    private void jComboBoxColumnsWidthUnitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxColumnsWidthUnitActionPerformed
        this.adjustValue(jComboBoxColumnsWidthUnit,jNumberFieldColumnsWidth, this.getColumnsWidth() );
    }//GEN-LAST:event_jComboBoxColumnsWidthUnitActionPerformed
    
    private void jNumberFieldColumnsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldColumnsActionPerformed
        
        this.columns = (int)jNumberFieldColumns.getValue();
        // calculate space...
        int avail = getReportWidth() - getLeftMargin() - getRightMargin() - (this.getColumns()-1)*getColumnsSpacing();
        int dim = avail;
        dim = (int)( (double)dim/(double)this.getColumns());
        
        while ( (dim*this.getColumns()) > avail) {
            dim--;
        }
        this.setColumnsWidth(dim);
    }//GEN-LAST:event_jNumberFieldColumnsActionPerformed
    
    private void jComboBoxColumnsSpacingUnitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxColumnsSpacingUnitActionPerformed
        this.adjustValue(jComboBoxColumnsSpacingUnit,jNumberFieldColumnsSpacing, this.getColumnsSpacing() );
    }//GEN-LAST:event_jComboBoxColumnsSpacingUnitActionPerformed
    
    private void jTextFieldNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldNameActionPerformed
        this.reportName = jTextFieldName.getText().trim();
        
    }//GEN-LAST:event_jTextFieldNameActionPerformed
    
    private void jTextFieldScriptletClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldScriptletClassActionPerformed
        this.scriptletClass = jTextFieldScriptletClass.getText().trim();
    }//GEN-LAST:event_jTextFieldScriptletClassActionPerformed
    
    private void jComboBoxTopMarginUnitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxTopMarginUnitActionPerformed
        this.adjustValue(jComboBoxTopMarginUnit,jNumberFieldTopMargin, this.getTopMargin());
    }//GEN-LAST:event_jComboBoxTopMarginUnitActionPerformed
    
    private void jComboBoxBottomMarginUnitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxBottomMarginUnitActionPerformed
        this.adjustValue(jComboBoxBottomMarginUnit,jNumberFieldBottomMargin, this.getBottomMargin());
    }//GEN-LAST:event_jComboBoxBottomMarginUnitActionPerformed
    
    private void jComboBoxLeftMarginUnitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxLeftMarginUnitActionPerformed
        this.adjustValue(jComboBoxLeftMarginUnit,jNumberFieldLeftMargin, this.getLeftMargin());
    }//GEN-LAST:event_jComboBoxLeftMarginUnitActionPerformed
    
    private void jComboBoxRightMarginUnitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxRightMarginUnitActionPerformed
        this.adjustValue(jComboBoxRightMarginUnit,jNumberFieldRightMargin, this.getRightMargin());
    }//GEN-LAST:event_jComboBoxRightMarginUnitActionPerformed
    
    private void jNumberFieldRightMarginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldRightMarginActionPerformed
        rightMargin = (int)Unit.convertToPixels(this.jNumberFieldRightMargin.getValue(),this.getConversionUnit(jComboBoxRightMarginUnit));
    }//GEN-LAST:event_jNumberFieldRightMarginActionPerformed
    
    private void jNumberFieldLeftMarginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldLeftMarginActionPerformed
        leftMargin = (int)Unit.convertToPixels(this.jNumberFieldLeftMargin.getValue(),this.getConversionUnit(jComboBoxLeftMarginUnit));
        
    }//GEN-LAST:event_jNumberFieldLeftMarginActionPerformed
    
    private void jNumberFieldBottomMarginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldBottomMarginActionPerformed
        bottomMargin = (int)Unit.convertToPixels(this.jNumberFieldBottomMargin.getValue(),this.getConversionUnit(jComboBoxBottomMarginUnit));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -