0001: /*
0002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0003: *
0004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
0005: *
0006: * The contents of this file are subject to the terms of either the GNU
0007: * General Public License Version 2 only ("GPL") or the Common
0008: * Development and Distribution License("CDDL") (collectively, the
0009: * "License"). You may not use this file except in compliance with the
0010: * License. You can obtain a copy of the License at
0011: * http://www.netbeans.org/cddl-gplv2.html
0012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
0013: * specific language governing permissions and limitations under the
0014: * License. When distributing the software, include this License Header
0015: * Notice in each file and include the License file at
0016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
0017: * particular file as subject to the "Classpath" exception as provided
0018: * by Sun in the GPL Version 2 section of the License file that
0019: * accompanied this code. If applicable, add the following below the
0020: * License Header, with the fields enclosed by brackets [] replaced by
0021: * your own identifying information:
0022: * "Portions Copyrighted [year] [name of copyright owner]"
0023: *
0024: * Contributor(s):
0025: *
0026: * The Original Software is NetBeans. The Initial Developer of the Original
0027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
0028: * Microsystems, Inc. All Rights Reserved.
0029: *
0030: * If you wish your version of this file to be governed by only the CDDL
0031: * or only the GPL Version 2, indicate your decision by adding
0032: * "[Contributor] elects to include this software in this distribution
0033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
0034: * single choice of license, a recipient has the option to distribute
0035: * your version of this file under either the CDDL, the GPL Version 2 or
0036: * to extend the choice of license to its licensees as provided above.
0037: * However, if you add GPL Version 2 code and therefore, elected the GPL
0038: * Version 2 license, then the option applies only if the new code is
0039: * made subject to such option by the copyright holder.
0040: */
0041: /*
0042: * SVGAnimationRasterizer.java
0043: *
0044: * Created on November 30, 2005, 10:53 AM
0045: */
0046:
0047: package org.netbeans.modules.mobility.svgcore.export;
0048:
0049: import java.awt.Dimension;
0050: import java.io.IOException;
0051: import javax.swing.ImageIcon;
0052: import javax.swing.JComboBox;
0053: import javax.swing.JComponent;
0054: import javax.swing.JLabel;
0055: import javax.swing.JSpinner;
0056: import javax.swing.SpinnerNumberModel;
0057: import javax.swing.SwingConstants;
0058: import javax.swing.SwingUtilities;
0059: import javax.swing.event.ChangeEvent;
0060: import javax.swing.event.ChangeListener;
0061: import javax.swing.text.BadLocationException;
0062: import org.netbeans.modules.mobility.svgcore.SVGDataObject;
0063: import org.netbeans.modules.mobility.svgcore.export.AnimationRasterizer.ColorReductionMethod;
0064: import org.netbeans.modules.mobility.svgcore.export.AnimationRasterizer.ImageType;
0065: import org.openide.util.Exceptions;
0066: import org.openide.util.RequestProcessor;
0067:
0068: /**
0069: *
0070: * @author Pavel Benes
0071: */
0072: public final class SVGAnimationRasterizerPanel extends
0073: SVGRasterizerPanel {
0074: private SpinnerNumberModel m_previewSpinnerModel;
0075: private final ComponentGroup m_startTime;
0076: private final ComponentGroup m_stopTime;
0077: private Thread m_sizeCalculationThread;
0078:
0079: /** Creates new form SVGAnimationRasterizer */
0080: public SVGAnimationRasterizerPanel(SVGDataObject dObj)
0081: throws IOException, BadLocationException {
0082: super (dObj, null);
0083: initComponents();
0084: createCompressionGroup(compressionLevelCombo,
0085: compressionQualitySpinner);
0086:
0087: m_startTime = createTimeGroup(startTimeSpinner,
0088: startTimeSlider, true);
0089: m_stopTime = createTimeGroup(stopTimeSpinner, stopTimeSlider,
0090: false);
0091:
0092: radioExportAll.setEnabled(isInProject());
0093: m_ratio = m_dim.getHeight() / m_dim.getWidth();
0094: spinnerHeight.setModel(new SpinnerNumberModel((int) m_dim
0095: .getHeight(), 1, 2048, 1));
0096: spinnerWidth.setModel(new SpinnerNumberModel((int) m_dim
0097: .getWidth(), 1, 2048, 1));
0098:
0099: framesPerSecSpinner.setModel(new SpinnerNumberModel(2, 0.1, 30,
0100: 1));
0101: previewFrameSpinner
0102: .setModel(m_previewSpinnerModel = new SpinnerNumberModel(
0103: 1, 1, 10, 1));
0104:
0105: spinnerWidth.getModel().addChangeListener(new ChangeListener() {
0106: public void stateChanged(ChangeEvent e) {
0107: if (keepRatio.isSelected()) {
0108: spinnerHeight.setValue(new Integer(
0109: (int) (((Integer) spinnerWidth.getValue())
0110: .doubleValue() * m_ratio)));
0111: }
0112: updateImage(spinnerWidth, true);
0113: }
0114: });
0115:
0116: m_previewSpinnerModel.addChangeListener(new ChangeListener() {
0117: public void stateChanged(ChangeEvent e) {
0118: updateImage(previewFrameSpinner, false);
0119: }
0120: });
0121:
0122: framesPerSecSpinner.getModel().addChangeListener(
0123: new ChangeListener() {
0124: public void stateChanged(ChangeEvent e) {
0125: updateImage(framesPerSecSpinner, true);
0126: }
0127: });
0128:
0129: updateImage(null, true);
0130: }
0131:
0132: /** This method is called from within the constructor to
0133: * initialize the form.
0134: * WARNING: Do NOT modify this code. The content of this method is
0135: * always regenerated by the Form Editor.
0136: */
0137: // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
0138: private void initComponents() {
0139:
0140: buttonGroup1 = new javax.swing.ButtonGroup();
0141: sizePanel = new javax.swing.JPanel();
0142: javax.swing.JLabel jLabel11 = new javax.swing.JLabel();
0143: spinnerWidth = new javax.swing.JSpinner();
0144: javax.swing.JLabel jLabel12 = new javax.swing.JLabel();
0145: spinnerHeight = new javax.swing.JSpinner();
0146: keepRatio = new javax.swing.JCheckBox();
0147: optionsPanel = new javax.swing.JPanel();
0148: javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
0149: formatComboBox = new javax.swing.JComboBox();
0150: jPanel1 = new javax.swing.JPanel();
0151: progressiveCheckBox = new javax.swing.JCheckBox();
0152: compressionLabel = new javax.swing.JLabel();
0153: compressionLevelCombo = new JComboBox(
0154: AnimationRasterizer.CompressionLevel.values());
0155: compressionQualityLabel = new javax.swing.JLabel();
0156: compressionQualitySpinner = new javax.swing.JSpinner();
0157: reductionLabel = new javax.swing.JLabel();
0158: reductionCombo = new JComboBox(
0159: AnimationRasterizer.ColorReductionMethod.values());
0160: transparentCheckBox = new javax.swing.JCheckBox();
0161: timeLinePanel = new javax.swing.JPanel();
0162: startTimeSpinner = new JSpinner(new SpinnerNumberModel(0.0,
0163: 0.0, 30.0, 1.0));
0164: javax.swing.JLabel startTimeLabel = new javax.swing.JLabel();
0165: javax.swing.JLabel stopTimeLabel = new javax.swing.JLabel();
0166: stopTimeSpinner = new javax.swing.JSpinner();
0167: startTimeSlider = new javax.swing.JSlider();
0168: stopTimeSlider = new javax.swing.JSlider();
0169: javax.swing.JLabel framesPerSecLabel = new javax.swing.JLabel();
0170: framesPerSecSpinner = new javax.swing.JSpinner();
0171: exportPanel = new javax.swing.JPanel();
0172: radioExportCurrent = new javax.swing.JRadioButton();
0173: radioExportAll = new javax.swing.JRadioButton();
0174: allFramesCheckBox = new javax.swing.JCheckBox();
0175: jPanel3 = new javax.swing.JPanel();
0176: jPanel4 = new javax.swing.JPanel();
0177: jLabel3 = new javax.swing.JLabel();
0178: jLabel1 = new javax.swing.JLabel();
0179: jLabel4 = new javax.swing.JLabel();
0180: previewFormatText = new javax.swing.JTextField();
0181: previewFrameSizeText = new javax.swing.JTextField();
0182: previewFileText = new javax.swing.JTextField();
0183: jLabel5 = new javax.swing.JLabel();
0184: previewAnimationSizeText = new javax.swing.JTextField();
0185: imageHolder = new javax.swing.JScrollPane();
0186: javax.swing.JLabel previewLabel = new javax.swing.JLabel();
0187: previewFrameSpinner = new javax.swing.JSpinner();
0188: previewMaxFrameText = new javax.swing.JTextField();
0189: jLabel7 = new javax.swing.JLabel();
0190: previewCurrentTimeText = new javax.swing.JTextField();
0191: javax.swing.JLabel jLabel8 = new javax.swing.JLabel();
0192: javax.swing.JLabel jLabel9 = new javax.swing.JLabel();
0193: previewEndTimeText = new javax.swing.JTextField();
0194: javax.swing.JLabel jLabel10 = new javax.swing.JLabel();
0195:
0196: setOpaque(false);
0197:
0198: sizePanel.setBorder(javax.swing.BorderFactory
0199: .createTitledBorder(org.openide.util.NbBundle
0200: .getMessage(SVGAnimationRasterizerPanel.class,
0201: "LBL_ImageSize"))); // NOI18N
0202:
0203: jLabel11.setLabelFor(spinnerWidth);
0204: org.openide.awt.Mnemonics.setLocalizedText(jLabel11,
0205: org.openide.util.NbBundle.getBundle(
0206: SVGAnimationRasterizerPanel.class).getString(
0207: "LBL_AnimationImageWidth")); // NOI18N
0208:
0209: jLabel12.setLabelFor(spinnerHeight);
0210: org.openide.awt.Mnemonics.setLocalizedText(jLabel12,
0211: org.openide.util.NbBundle.getBundle(
0212: SVGAnimationRasterizerPanel.class).getString(
0213: "LBL_AnimationImageHeight")); // NOI18N
0214:
0215: spinnerHeight.setEnabled(false);
0216:
0217: keepRatio.setSelected(true);
0218: org.openide.awt.Mnemonics.setLocalizedText(keepRatio,
0219: org.openide.util.NbBundle.getBundle(
0220: SVGAnimationRasterizerPanel.class).getString(
0221: "LBL_AnimationKeepRatio")); // NOI18N
0222: keepRatio
0223: .setToolTipText(org.openide.util.NbBundle.getMessage(
0224: SVGAnimationRasterizerPanel.class,
0225: "TOOLTIP_keepRatio")); // NOI18N
0226: keepRatio.setMargin(new java.awt.Insets(0, 0, 0, 0));
0227: keepRatio
0228: .addActionListener(new java.awt.event.ActionListener() {
0229: public void actionPerformed(
0230: java.awt.event.ActionEvent evt) {
0231: keepRatioActionPerformed(evt);
0232: }
0233: });
0234:
0235: org.jdesktop.layout.GroupLayout sizePanelLayout = new org.jdesktop.layout.GroupLayout(
0236: sizePanel);
0237: sizePanel.setLayout(sizePanelLayout);
0238: sizePanelLayout
0239: .setHorizontalGroup(sizePanelLayout
0240: .createParallelGroup(
0241: org.jdesktop.layout.GroupLayout.LEADING)
0242: .add(
0243: sizePanelLayout
0244: .createSequentialGroup()
0245: .add(
0246: sizePanelLayout
0247: .createParallelGroup(
0248: org.jdesktop.layout.GroupLayout.LEADING)
0249: .add(
0250: sizePanelLayout
0251: .createSequentialGroup()
0252: .addContainerGap()
0253: .add(
0254: sizePanelLayout
0255: .createParallelGroup(
0256: org.jdesktop.layout.GroupLayout.LEADING)
0257: .add(
0258: jLabel11)
0259: .add(
0260: jLabel12))
0261: .addPreferredGap(
0262: org.jdesktop.layout.LayoutStyle.RELATED)
0263: .add(
0264: sizePanelLayout
0265: .createParallelGroup(
0266: org.jdesktop.layout.GroupLayout.LEADING)
0267: .add(
0268: spinnerHeight,
0269: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0270: 56,
0271: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0272: .add(
0273: spinnerWidth,
0274: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0275: 56,
0276: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
0277: .add(
0278: sizePanelLayout
0279: .createSequentialGroup()
0280: .add(
0281: 12,
0282: 12,
0283: 12)
0284: .add(
0285: keepRatio)))
0286: .addContainerGap(106,
0287: Short.MAX_VALUE)));
0288: sizePanelLayout
0289: .setVerticalGroup(sizePanelLayout
0290: .createParallelGroup(
0291: org.jdesktop.layout.GroupLayout.LEADING)
0292: .add(
0293: sizePanelLayout
0294: .createSequentialGroup()
0295: .add(
0296: sizePanelLayout
0297: .createParallelGroup(
0298: org.jdesktop.layout.GroupLayout.BASELINE)
0299: .add(jLabel11)
0300: .add(
0301: spinnerWidth,
0302: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0303: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0304: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0305: .addPreferredGap(
0306: org.jdesktop.layout.LayoutStyle.RELATED)
0307: .add(
0308: sizePanelLayout
0309: .createParallelGroup(
0310: org.jdesktop.layout.GroupLayout.BASELINE)
0311: .add(jLabel12)
0312: .add(
0313: spinnerHeight,
0314: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0315: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0316: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0317: .addPreferredGap(
0318: org.jdesktop.layout.LayoutStyle.RELATED)
0319: .add(keepRatio)
0320: .addContainerGap(
0321: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0322: Short.MAX_VALUE)));
0323:
0324: jLabel11.getAccessibleContext().setAccessibleName(
0325: org.openide.util.NbBundle.getMessage(
0326: SVGAnimationRasterizerPanel.class,
0327: "ACCESSIBLE_NAME_jLabel11")); // NOI18N
0328: jLabel11.getAccessibleContext().setAccessibleDescription(
0329: org.openide.util.NbBundle.getMessage(
0330: SVGAnimationRasterizerPanel.class,
0331: "ACCESSIBLE_DESCRIPTION_jLabel11")); // NOI18N
0332: spinnerWidth.getAccessibleContext().setAccessibleName(
0333: org.openide.util.NbBundle.getMessage(
0334: SVGAnimationRasterizerPanel.class,
0335: "ACCESSIBLE_NAME_spinnerWidth")); // NOI18N
0336: spinnerWidth.getAccessibleContext().setAccessibleDescription(
0337: org.openide.util.NbBundle.getMessage(
0338: SVGAnimationRasterizerPanel.class,
0339: "ACCESSIBLE_DESCRIPTION_spinnerWidth")); // NOI18N
0340: jLabel12.getAccessibleContext().setAccessibleName(
0341: org.openide.util.NbBundle.getMessage(
0342: SVGAnimationRasterizerPanel.class,
0343: "ACCESSIBLE_NAME_jLabel12")); // NOI18N
0344: jLabel12.getAccessibleContext().setAccessibleDescription(
0345: org.openide.util.NbBundle.getMessage(
0346: SVGAnimationRasterizerPanel.class,
0347: "ACCESSIBLE_DESCRIPTION_jLabel12")); // NOI18N
0348: spinnerHeight.getAccessibleContext().setAccessibleName(
0349: org.openide.util.NbBundle.getMessage(
0350: SVGAnimationRasterizerPanel.class,
0351: "ACCESSIBLE_NAME_spinnerHeight")); // NOI18N
0352: spinnerHeight.getAccessibleContext().setAccessibleDescription(
0353: org.openide.util.NbBundle.getMessage(
0354: SVGAnimationRasterizerPanel.class,
0355: "ACCESSIBLE_DESCRIPTION_spinnerHeight")); // NOI18N
0356: keepRatio.getAccessibleContext().setAccessibleName(
0357: org.openide.util.NbBundle.getMessage(
0358: SVGAnimationRasterizerPanel.class,
0359: "ACCESSIBLE_NAME_keepRatio")); // NOI18N
0360: keepRatio.getAccessibleContext().setAccessibleDescription(
0361: org.openide.util.NbBundle.getMessage(
0362: SVGAnimationRasterizerPanel.class,
0363: "ACCESSIBLE_DESCRIPTION_keepRatio")); // NOI18N
0364:
0365: optionsPanel.setBorder(javax.swing.BorderFactory
0366: .createTitledBorder(org.openide.util.NbBundle
0367: .getMessage(SVGAnimationRasterizerPanel.class,
0368: "LBL_ImageOptions"))); // NOI18N
0369:
0370: jLabel2.setLabelFor(formatComboBox);
0371: org.openide.awt.Mnemonics.setLocalizedText(jLabel2,
0372: org.openide.util.NbBundle.getMessage(
0373: SVGAnimationRasterizerPanel.class,
0374: "LBL_OptionsFormat")); // NOI18N
0375:
0376: formatComboBox.setModel(createImageTypeComboBoxModel());
0377: formatComboBox
0378: .addActionListener(new java.awt.event.ActionListener() {
0379: public void actionPerformed(
0380: java.awt.event.ActionEvent evt) {
0381: formatComboBoxActionPerformed(evt);
0382: }
0383: });
0384:
0385: jPanel1.setLayout(new java.awt.GridBagLayout());
0386:
0387: org.openide.awt.Mnemonics.setLocalizedText(progressiveCheckBox,
0388: org.openide.util.NbBundle.getMessage(
0389: SVGAnimationRasterizerPanel.class,
0390: "LBL_OptionsProgressive")); // NOI18N
0391: progressiveCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
0392:
0393: compressionLabel.setLabelFor(compressionLevelCombo);
0394: org.openide.awt.Mnemonics.setLocalizedText(compressionLabel,
0395: org.openide.util.NbBundle.getMessage(
0396: SVGAnimationRasterizerPanel.class,
0397: "LBL_OptionsQuality")); // NOI18N
0398:
0399: compressionQualityLabel.setLabelFor(compressionQualitySpinner);
0400: org.openide.awt.Mnemonics.setLocalizedText(
0401: compressionQualityLabel, org.openide.util.NbBundle
0402: .getMessage(SVGAnimationRasterizerPanel.class,
0403: "LBL_OptionsRate")); // NOI18N
0404:
0405: reductionLabel.setLabelFor(reductionCombo);
0406: org.openide.awt.Mnemonics.setLocalizedText(reductionLabel,
0407: org.openide.util.NbBundle.getMessage(
0408: SVGAnimationRasterizerPanel.class,
0409: "LBL_OptionsColorReduction")); // NOI18N
0410:
0411: reductionCombo
0412: .addActionListener(new java.awt.event.ActionListener() {
0413: public void actionPerformed(
0414: java.awt.event.ActionEvent evt) {
0415: colorReductionChanged(evt);
0416: }
0417: });
0418:
0419: org.openide.awt.Mnemonics.setLocalizedText(transparentCheckBox,
0420: org.openide.util.NbBundle.getMessage(
0421: SVGAnimationRasterizerPanel.class,
0422: "LBL_OptionsTransparent")); // NOI18N
0423: transparentCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
0424: transparentCheckBox
0425: .addActionListener(new java.awt.event.ActionListener() {
0426: public void actionPerformed(
0427: java.awt.event.ActionEvent evt) {
0428: transparentCheckBoxActionPerformed(evt);
0429: }
0430: });
0431:
0432: org.jdesktop.layout.GroupLayout optionsPanelLayout = new org.jdesktop.layout.GroupLayout(
0433: optionsPanel);
0434: optionsPanel.setLayout(optionsPanelLayout);
0435: optionsPanelLayout
0436: .setHorizontalGroup(optionsPanelLayout
0437: .createParallelGroup(
0438: org.jdesktop.layout.GroupLayout.LEADING)
0439: .add(
0440: optionsPanelLayout
0441: .createSequentialGroup()
0442: .addContainerGap()
0443: .add(
0444: optionsPanelLayout
0445: .createParallelGroup(
0446: org.jdesktop.layout.GroupLayout.LEADING)
0447: .add(
0448: optionsPanelLayout
0449: .createSequentialGroup()
0450: .add(
0451: 84,
0452: 84,
0453: 84)
0454: .add(
0455: jPanel1,
0456: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0457: 141,
0458: Short.MAX_VALUE))
0459: .add(
0460: optionsPanelLayout
0461: .createSequentialGroup()
0462: .add(
0463: jLabel2)
0464: .addPreferredGap(
0465: org.jdesktop.layout.LayoutStyle.UNRELATED)
0466: .add(
0467: formatComboBox,
0468: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0469: 93,
0470: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0471: .addContainerGap())
0472: .add(
0473: optionsPanelLayout
0474: .createSequentialGroup()
0475: .add(
0476: progressiveCheckBox)
0477: .addContainerGap(
0478: 124,
0479: Short.MAX_VALUE))
0480: .add(
0481: optionsPanelLayout
0482: .createSequentialGroup()
0483: .add(
0484: optionsPanelLayout
0485: .createParallelGroup(
0486: org.jdesktop.layout.GroupLayout.LEADING)
0487: .add(
0488: compressionLabel)
0489: .add(
0490: optionsPanelLayout
0491: .createSequentialGroup()
0492: .add(
0493: compressionLevelCombo,
0494: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0495: 94,
0496: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0497: .addPreferredGap(
0498: org.jdesktop.layout.LayoutStyle.UNRELATED)
0499: .add(
0500: compressionQualityLabel)
0501: .add(
0502: 5,
0503: 5,
0504: 5)
0505: .add(
0506: compressionQualitySpinner,
0507: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0508: 48,
0509: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
0510: .add(
0511: 40,
0512: 40,
0513: 40))
0514: .add(
0515: optionsPanelLayout
0516: .createSequentialGroup()
0517: .add(
0518: transparentCheckBox)
0519: .addContainerGap(
0520: 121,
0521: Short.MAX_VALUE))
0522: .add(
0523: optionsPanelLayout
0524: .createSequentialGroup()
0525: .add(
0526: optionsPanelLayout
0527: .createParallelGroup(
0528: org.jdesktop.layout.GroupLayout.TRAILING,
0529: false)
0530: .add(
0531: org.jdesktop.layout.GroupLayout.LEADING,
0532: reductionCombo,
0533: 0,
0534: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0535: Short.MAX_VALUE)
0536: .add(
0537: org.jdesktop.layout.GroupLayout.LEADING,
0538: reductionLabel,
0539: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0540: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0541: Short.MAX_VALUE))
0542: .addContainerGap(
0543: 64,
0544: Short.MAX_VALUE)))));
0545: optionsPanelLayout
0546: .setVerticalGroup(optionsPanelLayout
0547: .createParallelGroup(
0548: org.jdesktop.layout.GroupLayout.LEADING)
0549: .add(
0550: optionsPanelLayout
0551: .createSequentialGroup()
0552: .add(
0553: optionsPanelLayout
0554: .createParallelGroup(
0555: org.jdesktop.layout.GroupLayout.BASELINE)
0556: .add(jLabel2)
0557: .add(
0558: formatComboBox,
0559: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0560: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0561: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0562: .addPreferredGap(
0563: org.jdesktop.layout.LayoutStyle.RELATED)
0564: .add(progressiveCheckBox)
0565: .addPreferredGap(
0566: org.jdesktop.layout.LayoutStyle.RELATED)
0567: .add(transparentCheckBox)
0568: .add(14, 14, 14)
0569: .add(
0570: optionsPanelLayout
0571: .createParallelGroup(
0572: org.jdesktop.layout.GroupLayout.LEADING)
0573: .add(
0574: jPanel1,
0575: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0576: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0577: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0578: .add(
0579: reductionLabel))
0580: .addPreferredGap(
0581: org.jdesktop.layout.LayoutStyle.RELATED)
0582: .add(
0583: reductionCombo,
0584: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0585: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0586: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0587: .addPreferredGap(
0588: org.jdesktop.layout.LayoutStyle.RELATED,
0589: 15, Short.MAX_VALUE)
0590: .add(compressionLabel)
0591: .addPreferredGap(
0592: org.jdesktop.layout.LayoutStyle.RELATED)
0593: .add(
0594: optionsPanelLayout
0595: .createParallelGroup(
0596: org.jdesktop.layout.GroupLayout.CENTER)
0597: .add(
0598: compressionLevelCombo,
0599: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0600: 25,
0601: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0602: .add(
0603: compressionQualityLabel)
0604: .add(
0605: compressionQualitySpinner,
0606: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0607: 25,
0608: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0609: .addContainerGap()));
0610:
0611: jLabel2.getAccessibleContext().setAccessibleName(
0612: org.openide.util.NbBundle.getMessage(
0613: SVGAnimationRasterizerPanel.class,
0614: "ACCESSIBLE_NAME_jLabel2")); // NOI18N
0615: jLabel2.getAccessibleContext().setAccessibleDescription(
0616: org.openide.util.NbBundle.getMessage(
0617: SVGAnimationRasterizerPanel.class,
0618: "ACCESSIBLE_DESCRIPTION_jLabel2")); // NOI18N
0619: formatComboBox.getAccessibleContext().setAccessibleName(
0620: org.openide.util.NbBundle.getMessage(
0621: SVGAnimationRasterizerPanel.class,
0622: "ACCESSIBLE_NAME_formatComboBox")); // NOI18N
0623: formatComboBox.getAccessibleContext().setAccessibleDescription(
0624: org.openide.util.NbBundle.getMessage(
0625: SVGAnimationRasterizerPanel.class,
0626: "ACCESSIBLE_DESCRIPTION_formatComboBox")); // NOI18N
0627: progressiveCheckBox.getAccessibleContext().setAccessibleName(
0628: org.openide.util.NbBundle.getMessage(
0629: SVGAnimationRasterizerPanel.class,
0630: "ACCESSIBLE_NAME_progressiveCheckBox")); // NOI18N
0631: progressiveCheckBox
0632: .getAccessibleContext()
0633: .setAccessibleDescription(
0634: org.openide.util.NbBundle
0635: .getMessage(
0636: SVGAnimationRasterizerPanel.class,
0637: "ACCESSIBLE_DESCRIPTION_progressiveCheckBox")); // NOI18N
0638: compressionLabel.getAccessibleContext().setAccessibleName(
0639: org.openide.util.NbBundle.getMessage(
0640: SVGAnimationRasterizerPanel.class,
0641: "ACCESSIBLE_NAME_compressionLabel")); // NOI18N
0642: compressionLabel
0643: .getAccessibleContext()
0644: .setAccessibleDescription(
0645: org.openide.util.NbBundle
0646: .getMessage(
0647: SVGAnimationRasterizerPanel.class,
0648: "ACCESSIBLE_DESCRIPTION_compressionLabel")); // NOI18N
0649: compressionLevelCombo.getAccessibleContext().setAccessibleName(
0650: org.openide.util.NbBundle.getMessage(
0651: SVGAnimationRasterizerPanel.class,
0652: "ACCESSIBLE_NAME_compressionLevelCombo")); // NOI18N
0653: compressionLevelCombo
0654: .getAccessibleContext()
0655: .setAccessibleDescription(
0656: org.openide.util.NbBundle
0657: .getMessage(
0658: SVGAnimationRasterizerPanel.class,
0659: "ACCESSIBLE_DESCRIOTION_compressionLevelCombo")); // NOI18N
0660: compressionQualityLabel
0661: .getAccessibleContext()
0662: .setAccessibleName(
0663: org.openide.util.NbBundle
0664: .getMessage(
0665: SVGAnimationRasterizerPanel.class,
0666: "ACCESSIBLE_NAME_compressionQualityLabel")); // NOI18N
0667: compressionQualityLabel
0668: .getAccessibleContext()
0669: .setAccessibleDescription(
0670: org.openide.util.NbBundle
0671: .getMessage(
0672: SVGAnimationRasterizerPanel.class,
0673: "ACCESSIBLE_DESCRIPTION_compressionQualityLabel")); // NOI18N
0674: compressionQualitySpinner
0675: .getAccessibleContext()
0676: .setAccessibleName(
0677: org.openide.util.NbBundle
0678: .getMessage(
0679: SVGAnimationRasterizerPanel.class,
0680: "ACCESSIBLE_NAME_compressionQualitySpinner")); // NOI18N
0681: compressionQualitySpinner
0682: .getAccessibleContext()
0683: .setAccessibleDescription(
0684: org.openide.util.NbBundle
0685: .getMessage(
0686: SVGAnimationRasterizerPanel.class,
0687: "ACCESSIBLE_DESCRIPTION_compressionQualitySpinner")); // NOI18N
0688: reductionLabel.getAccessibleContext().setAccessibleName(
0689: org.openide.util.NbBundle.getMessage(
0690: SVGAnimationRasterizerPanel.class,
0691: "ACCESSIBLE_NAME_reductionLabel")); // NOI18N
0692: reductionLabel.getAccessibleContext().setAccessibleDescription(
0693: org.openide.util.NbBundle.getMessage(
0694: SVGAnimationRasterizerPanel.class,
0695: "ACCESSIBLE_DESCRIPTION_reductionLabel")); // NOI18N
0696: reductionCombo.getAccessibleContext().setAccessibleName(
0697: org.openide.util.NbBundle.getMessage(
0698: SVGAnimationRasterizerPanel.class,
0699: "ACCESSIBLE_NAME_reductionCombo")); // NOI18N
0700: reductionCombo.getAccessibleContext().setAccessibleDescription(
0701: org.openide.util.NbBundle.getMessage(
0702: SVGAnimationRasterizerPanel.class,
0703: "ACCESSIBLE_DESCRIPTION_reductionCombo")); // NOI18N
0704: transparentCheckBox.getAccessibleContext().setAccessibleName(
0705: org.openide.util.NbBundle.getMessage(
0706: SVGAnimationRasterizerPanel.class,
0707: "ACCESSIBLE_NAME_transparentCheckBox")); // NOI18N
0708: transparentCheckBox
0709: .getAccessibleContext()
0710: .setAccessibleDescription(
0711: org.openide.util.NbBundle
0712: .getMessage(
0713: SVGAnimationRasterizerPanel.class,
0714: "ACCESSIBLE_DESCRIPTION_transparentCheckBox")); // NOI18N
0715:
0716: timeLinePanel.setBorder(javax.swing.BorderFactory
0717: .createTitledBorder(org.openide.util.NbBundle
0718: .getMessage(SVGAnimationRasterizerPanel.class,
0719: "LBL_AnimationFrameTime"))); // NOI18N
0720:
0721: startTimeLabel.setLabelFor(startTimeSpinner);
0722: org.openide.awt.Mnemonics.setLocalizedText(startTimeLabel,
0723: org.openide.util.NbBundle.getBundle(
0724: SVGAnimationRasterizerPanel.class).getString(
0725: "LBL_AnimationTime")); // NOI18N
0726:
0727: stopTimeLabel.setLabelFor(stopTimeSpinner);
0728: org.openide.awt.Mnemonics.setLocalizedText(stopTimeLabel,
0729: org.openide.util.NbBundle.getMessage(
0730: SVGAnimationRasterizerPanel.class,
0731: "LBL_AnimationEndTime")); // NOI18N
0732:
0733: framesPerSecLabel.setLabelFor(framesPerSecSpinner);
0734: org.openide.awt.Mnemonics.setLocalizedText(framesPerSecLabel,
0735: org.openide.util.NbBundle.getMessage(
0736: SVGAnimationRasterizerPanel.class,
0737: "LBL_AnimationFramePerSec")); // NOI18N
0738:
0739: org.jdesktop.layout.GroupLayout timeLinePanelLayout = new org.jdesktop.layout.GroupLayout(
0740: timeLinePanel);
0741: timeLinePanel.setLayout(timeLinePanelLayout);
0742: timeLinePanelLayout
0743: .setHorizontalGroup(timeLinePanelLayout
0744: .createParallelGroup(
0745: org.jdesktop.layout.GroupLayout.LEADING)
0746: .add(
0747: timeLinePanelLayout
0748: .createSequentialGroup()
0749: .add(
0750: timeLinePanelLayout
0751: .createParallelGroup(
0752: org.jdesktop.layout.GroupLayout.LEADING)
0753: .add(
0754: timeLinePanelLayout
0755: .createSequentialGroup()
0756: .add(
0757: 12,
0758: 12,
0759: 12)
0760: .add(
0761: framesPerSecLabel)
0762: .addPreferredGap(
0763: org.jdesktop.layout.LayoutStyle.RELATED,
0764: 42,
0765: Short.MAX_VALUE)
0766: .add(
0767: framesPerSecSpinner,
0768: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0769: 46,
0770: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0771: .add(
0772: startTimeSlider,
0773: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0774: 218,
0775: Short.MAX_VALUE)
0776: .add(
0777: org.jdesktop.layout.GroupLayout.TRAILING,
0778: stopTimeSlider,
0779: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0780: 218,
0781: Short.MAX_VALUE)
0782: .add(
0783: timeLinePanelLayout
0784: .createSequentialGroup()
0785: .addContainerGap()
0786: .add(
0787: timeLinePanelLayout
0788: .createParallelGroup(
0789: org.jdesktop.layout.GroupLayout.LEADING)
0790: .add(
0791: timeLinePanelLayout
0792: .createSequentialGroup()
0793: .add(
0794: stopTimeLabel)
0795: .addPreferredGap(
0796: org.jdesktop.layout.LayoutStyle.RELATED,
0797: 52,
0798: Short.MAX_VALUE)
0799: .add(
0800: stopTimeSpinner,
0801: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0802: 84,
0803: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0804: .add(
0805: timeLinePanelLayout
0806: .createSequentialGroup()
0807: .add(
0808: startTimeLabel)
0809: .addPreferredGap(
0810: org.jdesktop.layout.LayoutStyle.RELATED,
0811: 51,
0812: Short.MAX_VALUE)
0813: .add(
0814: startTimeSpinner,
0815: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0816: 83,
0817: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
0818: .addContainerGap()));
0819: timeLinePanelLayout
0820: .setVerticalGroup(timeLinePanelLayout
0821: .createParallelGroup(
0822: org.jdesktop.layout.GroupLayout.LEADING)
0823: .add(
0824: timeLinePanelLayout
0825: .createSequentialGroup()
0826: .add(
0827: timeLinePanelLayout
0828: .createParallelGroup(
0829: org.jdesktop.layout.GroupLayout.BASELINE)
0830: .add(
0831: startTimeLabel)
0832: .add(
0833: startTimeSpinner,
0834: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0835: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0836: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0837: .addPreferredGap(
0838: org.jdesktop.layout.LayoutStyle.RELATED,
0839: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0840: Short.MAX_VALUE)
0841: .add(
0842: startTimeSlider,
0843: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0844: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0845: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0846: .addPreferredGap(
0847: org.jdesktop.layout.LayoutStyle.RELATED)
0848: .add(
0849: timeLinePanelLayout
0850: .createParallelGroup(
0851: org.jdesktop.layout.GroupLayout.BASELINE)
0852: .add(
0853: stopTimeLabel)
0854: .add(
0855: stopTimeSpinner,
0856: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0857: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0858: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0859: .addPreferredGap(
0860: org.jdesktop.layout.LayoutStyle.RELATED)
0861: .add(
0862: stopTimeSlider,
0863: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0864: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0865: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
0866: .addPreferredGap(
0867: org.jdesktop.layout.LayoutStyle.RELATED)
0868: .add(
0869: timeLinePanelLayout
0870: .createParallelGroup(
0871: org.jdesktop.layout.GroupLayout.BASELINE)
0872: .add(
0873: framesPerSecLabel)
0874: .add(
0875: framesPerSecSpinner,
0876: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
0877: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
0878: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
0879: .add(24, 24, 24)));
0880:
0881: startTimeSpinner.getAccessibleContext().setAccessibleName(
0882: org.openide.util.NbBundle.getMessage(
0883: SVGAnimationRasterizerPanel.class,
0884: "ACCESSIBLE_NAME_startTimeSpinner")); // NOI18N
0885: startTimeSpinner
0886: .getAccessibleContext()
0887: .setAccessibleDescription(
0888: org.openide.util.NbBundle
0889: .getMessage(
0890: SVGAnimationRasterizerPanel.class,
0891: "ACCESSIBLE_DESCRIPTION_startTimeSpinner")); // NOI18N
0892: startTimeLabel.getAccessibleContext().setAccessibleName(
0893: org.openide.util.NbBundle.getMessage(
0894: SVGAnimationRasterizerPanel.class,
0895: "ACCESSIBLE_NAME_startTimeLabel")); // NOI18N
0896: startTimeLabel.getAccessibleContext().setAccessibleDescription(
0897: org.openide.util.NbBundle.getMessage(
0898: SVGAnimationRasterizerPanel.class,
0899: "ACCESSIBLE_DESCRIPTION_startTimeLabel")); // NOI18N
0900: stopTimeLabel.getAccessibleContext().setAccessibleName(
0901: org.openide.util.NbBundle.getMessage(
0902: SVGAnimationRasterizerPanel.class,
0903: "ACCESSIBLE_NAME_stopTimeLabel")); // NOI18N
0904: stopTimeLabel.getAccessibleContext().setAccessibleDescription(
0905: org.openide.util.NbBundle.getMessage(
0906: SVGAnimationRasterizerPanel.class,
0907: "ACCESSIBLE_DESCRIPTION_stopTimeLabel")); // NOI18N
0908: stopTimeSpinner.getAccessibleContext().setAccessibleName(
0909: org.openide.util.NbBundle.getMessage(
0910: SVGAnimationRasterizerPanel.class,
0911: "ACCESSIBLE_NAME_stopTimeSpinner")); // NOI18N
0912: stopTimeSpinner
0913: .getAccessibleContext()
0914: .setAccessibleDescription(
0915: org.openide.util.NbBundle
0916: .getMessage(
0917: SVGAnimationRasterizerPanel.class,
0918: "ACCESSIBLE_DESCRIPTION_stopTimeSpinner")); // NOI18N
0919: startTimeSlider.getAccessibleContext().setAccessibleName(
0920: org.openide.util.NbBundle.getMessage(
0921: SVGAnimationRasterizerPanel.class,
0922: "ACCESSIBLE_NAME_startTimeSlider")); // NOI18N
0923: startTimeSlider
0924: .getAccessibleContext()
0925: .setAccessibleDescription(
0926: org.openide.util.NbBundle
0927: .getMessage(
0928: SVGAnimationRasterizerPanel.class,
0929: "ACCESSIBLE_DESCRIPTION_startTimeSlider")); // NOI18N
0930: stopTimeSlider.getAccessibleContext().setAccessibleName(
0931: org.openide.util.NbBundle.getMessage(
0932: SVGAnimationRasterizerPanel.class,
0933: "ACCESSIBLE_NAME_stopTimeSlider")); // NOI18N
0934: stopTimeSlider.getAccessibleContext().setAccessibleDescription(
0935: org.openide.util.NbBundle.getMessage(
0936: SVGAnimationRasterizerPanel.class,
0937: "ACCESSIBLE_DESCRIPTION_stopTimeSlider")); // NOI18N
0938: framesPerSecLabel.getAccessibleContext().setAccessibleName(
0939: org.openide.util.NbBundle.getMessage(
0940: SVGAnimationRasterizerPanel.class,
0941: "ACCESSIBLE_NAME_framePerSecLabel")); // NOI18N
0942: framesPerSecLabel
0943: .getAccessibleContext()
0944: .setAccessibleDescription(
0945: org.openide.util.NbBundle
0946: .getMessage(
0947: SVGAnimationRasterizerPanel.class,
0948: "ACCESSIBLE_DESCRIPTION_framePerSecLabel")); // NOI18N
0949: framesPerSecSpinner.getAccessibleContext().setAccessibleName(
0950: org.openide.util.NbBundle.getMessage(
0951: SVGAnimationRasterizerPanel.class,
0952: "ACCESSIBLE_NAME_framePerSecSpinner")); // NOI18N
0953: framesPerSecSpinner
0954: .getAccessibleContext()
0955: .setAccessibleDescription(
0956: org.openide.util.NbBundle
0957: .getMessage(
0958: SVGAnimationRasterizerPanel.class,
0959: "ACCESSIBLE_DESCRIPTION_framePerSecSpinner")); // NOI18N
0960:
0961: exportPanel.setBorder(javax.swing.BorderFactory
0962: .createTitledBorder(org.openide.util.NbBundle
0963: .getMessage(SVGAnimationRasterizerPanel.class,
0964: "LBL_ExportLabel"))); // NOI18N
0965:
0966: buttonGroup1.add(radioExportCurrent);
0967: radioExportCurrent.setSelected(true);
0968: org.openide.awt.Mnemonics.setLocalizedText(radioExportCurrent,
0969: org.openide.util.NbBundle.getBundle(
0970: SVGAnimationRasterizerPanel.class).getString(
0971: "LBL_AnimationOnlyActiveConfiguration")); // NOI18N
0972: radioExportCurrent.setMargin(new java.awt.Insets(0, 0, 0, 0));
0973:
0974: buttonGroup1.add(radioExportAll);
0975: org.openide.awt.Mnemonics.setLocalizedText(radioExportAll,
0976: org.openide.util.NbBundle.getBundle(
0977: SVGAnimationRasterizerPanel.class).getString(
0978: "LBL_AnimationAllConfigurations")); // NOI18N
0979: radioExportAll.setMargin(new java.awt.Insets(0, 0, 0, 0));
0980:
0981: allFramesCheckBox.setSelected(true);
0982: org.openide.awt.Mnemonics.setLocalizedText(allFramesCheckBox,
0983: org.openide.util.NbBundle.getMessage(
0984: SVGAnimationRasterizerPanel.class,
0985: "LBL_AnimationInSingleFile")); // NOI18N
0986: allFramesCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
0987: allFramesCheckBox
0988: .addActionListener(new java.awt.event.ActionListener() {
0989: public void actionPerformed(
0990: java.awt.event.ActionEvent evt) {
0991: allFramesInSingleFileChanged(evt);
0992: }
0993: });
0994:
0995: org.jdesktop.layout.GroupLayout exportPanelLayout = new org.jdesktop.layout.GroupLayout(
0996: exportPanel);
0997: exportPanel.setLayout(exportPanelLayout);
0998: exportPanelLayout
0999: .setHorizontalGroup(exportPanelLayout
1000: .createParallelGroup(
1001: org.jdesktop.layout.GroupLayout.LEADING)
1002: .add(
1003: exportPanelLayout
1004: .createSequentialGroup()
1005: .addContainerGap()
1006: .add(
1007: exportPanelLayout
1008: .createParallelGroup(
1009: org.jdesktop.layout.GroupLayout.LEADING)
1010: .add(
1011: radioExportAll)
1012: .add(
1013: allFramesCheckBox)
1014: .add(
1015: radioExportCurrent))
1016: .addContainerGap(18,
1017: Short.MAX_VALUE)));
1018: exportPanelLayout
1019: .setVerticalGroup(exportPanelLayout
1020: .createParallelGroup(
1021: org.jdesktop.layout.GroupLayout.LEADING)
1022: .add(
1023: exportPanelLayout
1024: .createSequentialGroup()
1025: .add(radioExportCurrent)
1026: .addPreferredGap(
1027: org.jdesktop.layout.LayoutStyle.RELATED)
1028: .add(radioExportAll)
1029: .addPreferredGap(
1030: org.jdesktop.layout.LayoutStyle.RELATED,
1031: 13, Short.MAX_VALUE)
1032: .add(allFramesCheckBox)));
1033:
1034: radioExportCurrent.getAccessibleContext().setAccessibleName(
1035: org.openide.util.NbBundle.getMessage(
1036: SVGAnimationRasterizerPanel.class,
1037: "ACCESSIBLE_NAME_radioExportCurrent")); // NOI18N
1038: radioExportCurrent
1039: .getAccessibleContext()
1040: .setAccessibleDescription(
1041: org.openide.util.NbBundle
1042: .getMessage(
1043: SVGAnimationRasterizerPanel.class,
1044: "ACCESSIBLE_DESCRIPTION_radioExportCurrent")); // NOI18N
1045: radioExportAll.getAccessibleContext().setAccessibleName(
1046: org.openide.util.NbBundle.getMessage(
1047: SVGAnimationRasterizerPanel.class,
1048: "ACCESSIBLE_NAME_radioExportAll")); // NOI18N
1049: radioExportAll.getAccessibleContext().setAccessibleDescription(
1050: org.openide.util.NbBundle.getMessage(
1051: SVGAnimationRasterizerPanel.class,
1052: "ACCESSIBLE_DESCRIPTION_radioExportAll")); // NOI18N
1053: allFramesCheckBox.getAccessibleContext().setAccessibleName(
1054: org.openide.util.NbBundle.getMessage(
1055: SVGAnimationRasterizerPanel.class,
1056: "ACCESSIBLE_NAME_allFramesCheckBox")); // NOI18N
1057: allFramesCheckBox
1058: .getAccessibleContext()
1059: .setAccessibleDescription(
1060: org.openide.util.NbBundle
1061: .getMessage(
1062: SVGAnimationRasterizerPanel.class,
1063: "ACCESSIBLE_DESCRIPTION_allFramesCheckBox")); // NOI18N
1064:
1065: jPanel3.setBorder(javax.swing.BorderFactory
1066: .createTitledBorder(org.openide.util.NbBundle
1067: .getMessage(SVGAnimationRasterizerPanel.class,
1068: "LBL_PreviewTitle"))); // NOI18N
1069:
1070: jPanel4.setBorder(javax.swing.BorderFactory
1071: .createEtchedBorder());
1072:
1073: jLabel3.setLabelFor(previewFormatText);
1074: jLabel3
1075: .setText(org.openide.util.NbBundle.getMessage(
1076: SVGAnimationRasterizerPanel.class,
1077: "LBL_PreviewFormat")); // NOI18N
1078:
1079: jLabel1.setLabelFor(previewFrameSizeText);
1080: jLabel1.setText(org.openide.util.NbBundle.getMessage(
1081: SVGAnimationRasterizerPanel.class, "LBL_PreviewSize")); // NOI18N
1082:
1083: jLabel4.setLabelFor(previewFileText);
1084: jLabel4.setText(org.openide.util.NbBundle.getMessage(
1085: SVGAnimationRasterizerPanel.class, "LBL_PreviewFile")); // NOI18N
1086:
1087: previewFormatText.setEditable(false);
1088: previewFormatText.setText("JPEG");
1089: previewFormatText.setToolTipText(org.openide.util.NbBundle
1090: .getMessage(SVGAnimationRasterizerPanel.class,
1091: "TOOL_TIP_previewFormatText")); // NOI18N
1092:
1093: previewFrameSizeText.setEditable(false);
1094: previewFrameSizeText
1095: .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
1096: previewFrameSizeText.setText("5.6KBytes");
1097: previewFrameSizeText.setToolTipText(org.openide.util.NbBundle
1098: .getMessage(SVGAnimationRasterizerPanel.class,
1099: "TOOL_TIP_previewFormSizeText")); // NOI18N
1100:
1101: previewFileText.setEditable(false);
1102: previewFileText.setText("C:\\Program Files\\about.svg");
1103: previewFileText.setToolTipText(org.openide.util.NbBundle
1104: .getMessage(SVGAnimationRasterizerPanel.class,
1105: "TOOL_TIP_previewFileText")); // NOI18N
1106:
1107: jLabel5.setText("/");
1108:
1109: previewAnimationSizeText.setEditable(false);
1110: previewAnimationSizeText.setText("132.5 KBytes");
1111: previewAnimationSizeText
1112: .setToolTipText(org.openide.util.NbBundle.getMessage(
1113: SVGAnimationRasterizerPanel.class,
1114: "TOOL_TIP_previewAnimationSizeText")); // NOI18N
1115:
1116: org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(
1117: jPanel4);
1118: jPanel4.setLayout(jPanel4Layout);
1119: jPanel4Layout
1120: .setHorizontalGroup(jPanel4Layout
1121: .createParallelGroup(
1122: org.jdesktop.layout.GroupLayout.LEADING)
1123: .add(
1124: jPanel4Layout
1125: .createSequentialGroup()
1126: .addContainerGap()
1127: .add(
1128: jPanel4Layout
1129: .createParallelGroup(
1130: org.jdesktop.layout.GroupLayout.LEADING)
1131: .add(jLabel3)
1132: .add(
1133: jPanel4Layout
1134: .createSequentialGroup()
1135: .addPreferredGap(
1136: org.jdesktop.layout.LayoutStyle.RELATED)
1137: .add(
1138: jLabel1))
1139: .add(jLabel4))
1140: .add(13, 13, 13)
1141: .add(
1142: jPanel4Layout
1143: .createParallelGroup(
1144: org.jdesktop.layout.GroupLayout.LEADING)
1145: .add(
1146: jPanel4Layout
1147: .createSequentialGroup()
1148: .add(
1149: previewFrameSizeText,
1150: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1151: 79,
1152: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1153: .addPreferredGap(
1154: org.jdesktop.layout.LayoutStyle.RELATED)
1155: .add(
1156: jLabel5)
1157: .addPreferredGap(
1158: org.jdesktop.layout.LayoutStyle.RELATED)
1159: .add(
1160: previewAnimationSizeText,
1161: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1162: 126,
1163: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
1164: .add(
1165: previewFileText,
1166: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1167: 332,
1168: Short.MAX_VALUE)
1169: .add(
1170: previewFormatText,
1171: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1172: 55,
1173: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
1174: .addContainerGap()));
1175: jPanel4Layout
1176: .setVerticalGroup(jPanel4Layout
1177: .createParallelGroup(
1178: org.jdesktop.layout.GroupLayout.LEADING)
1179: .add(
1180: jPanel4Layout
1181: .createSequentialGroup()
1182: .addContainerGap()
1183: .add(
1184: jPanel4Layout
1185: .createParallelGroup(
1186: org.jdesktop.layout.GroupLayout.BASELINE)
1187: .add(jLabel3)
1188: .add(
1189: previewFormatText,
1190: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1191: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1192: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
1193: .addPreferredGap(
1194: org.jdesktop.layout.LayoutStyle.RELATED)
1195: .add(
1196: jPanel4Layout
1197: .createParallelGroup(
1198: org.jdesktop.layout.GroupLayout.BASELINE)
1199: .add(jLabel1)
1200: .add(jLabel5)
1201: .add(
1202: previewFrameSizeText,
1203: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1204: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1205: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1206: .add(
1207: previewAnimationSizeText,
1208: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1209: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1210: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
1211: .addPreferredGap(
1212: org.jdesktop.layout.LayoutStyle.RELATED)
1213: .add(
1214: jPanel4Layout
1215: .createParallelGroup(
1216: org.jdesktop.layout.GroupLayout.BASELINE)
1217: .add(jLabel4)
1218: .add(
1219: previewFileText,
1220: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1221: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1222: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
1223: .addContainerGap()));
1224:
1225: jLabel3.getAccessibleContext().setAccessibleName(
1226: org.openide.util.NbBundle.getMessage(
1227: SVGAnimationRasterizerPanel.class,
1228: "ACCESSIBLE_NAME_jLabel3")); // NOI18N
1229: jLabel3.getAccessibleContext().setAccessibleDescription(
1230: org.openide.util.NbBundle.getMessage(
1231: SVGAnimationRasterizerPanel.class,
1232: "ACCESSIBLE_DESCRIPTION_jLabel3")); // NOI18N
1233: jLabel1.getAccessibleContext().setAccessibleName(
1234: org.openide.util.NbBundle.getMessage(
1235: SVGAnimationRasterizerPanel.class,
1236: "ACCESSIBLE_NAME_jLabel1")); // NOI18N
1237: jLabel1.getAccessibleContext().setAccessibleDescription(
1238: org.openide.util.NbBundle.getMessage(
1239: SVGAnimationRasterizerPanel.class,
1240: "ACCESSIBLE_DESCRIPTION_jLabel1")); // NOI18N
1241: jLabel4.getAccessibleContext().setAccessibleName(
1242: org.openide.util.NbBundle.getMessage(
1243: SVGAnimationRasterizerPanel.class,
1244: "ACCESSIBLE_NAME_jLabel4")); // NOI18N
1245: jLabel4.getAccessibleContext().setAccessibleDescription(
1246: org.openide.util.NbBundle.getMessage(
1247: SVGAnimationRasterizerPanel.class,
1248: "ACCESSIBLE_DESCRIPTION_jLabel4")); // NOI18N
1249: previewFormatText.getAccessibleContext().setAccessibleName(
1250: org.openide.util.NbBundle.getMessage(
1251: SVGAnimationRasterizerPanel.class,
1252: "ACCESSIBLE_NAME_previewFormatText")); // NOI18N
1253: previewFormatText
1254: .getAccessibleContext()
1255: .setAccessibleDescription(
1256: org.openide.util.NbBundle
1257: .getMessage(
1258: SVGAnimationRasterizerPanel.class,
1259: "ACCESSIBLE_DESCRIPTION_previewFormatText")); // NOI18N
1260: previewFrameSizeText.getAccessibleContext().setAccessibleName(
1261: org.openide.util.NbBundle.getMessage(
1262: SVGAnimationRasterizerPanel.class,
1263: "ACCESSIBLE_NAME_previewFormatSizeText")); // NOI18N
1264: previewFrameSizeText
1265: .getAccessibleContext()
1266: .setAccessibleDescription(
1267: org.openide.util.NbBundle
1268: .getMessage(
1269: SVGAnimationRasterizerPanel.class,
1270: "ACCESSIBLE_DESCRIPTION_previewFormatSizeText")); // NOI18N
1271: previewFileText.getAccessibleContext().setAccessibleName(
1272: org.openide.util.NbBundle.getMessage(
1273: SVGAnimationRasterizerPanel.class,
1274: "ACCESSIBLE_NAME_previewFileText")); // NOI18N
1275: previewFileText
1276: .getAccessibleContext()
1277: .setAccessibleDescription(
1278: org.openide.util.NbBundle
1279: .getMessage(
1280: SVGAnimationRasterizerPanel.class,
1281: "ACCESSIBLE_DESCRIPTION_previewFileText")); // NOI18N
1282: jLabel5.getAccessibleContext().setAccessibleName(
1283: org.openide.util.NbBundle.getMessage(
1284: SVGAnimationRasterizerPanel.class,
1285: "ACCESSIBLE_NAME_jLabel5")); // NOI18N
1286: jLabel5.getAccessibleContext().setAccessibleDescription(
1287: org.openide.util.NbBundle.getMessage(
1288: SVGAnimationRasterizerPanel.class,
1289: "ACCESSIBLE_DESCRIPTION_jLabel5")); // NOI18N
1290: previewAnimationSizeText
1291: .getAccessibleContext()
1292: .setAccessibleName(
1293: org.openide.util.NbBundle
1294: .getMessage(
1295: SVGAnimationRasterizerPanel.class,
1296: "ACCESSIBLE_NAME_previewAnimationSizeText")); // NOI18N
1297: previewAnimationSizeText
1298: .getAccessibleContext()
1299: .setAccessibleDescription(
1300: org.openide.util.NbBundle
1301: .getMessage(
1302: SVGAnimationRasterizerPanel.class,
1303: "ACCESSIBLE_DESCRIPTION_previewAnimationSizeText")); // NOI18N
1304:
1305: imageHolder.setBorder(javax.swing.BorderFactory
1306: .createEtchedBorder());
1307: imageHolder.setPreferredSize(new java.awt.Dimension(300, 300));
1308:
1309: previewLabel.setLabelFor(previewFrameSpinner);
1310: previewLabel.setText(org.openide.util.NbBundle.getMessage(
1311: SVGAnimationRasterizerPanel.class,
1312: "LBL_AnimationPreviewFrame")); // NOI18N
1313:
1314: previewMaxFrameText.setEditable(false);
1315: previewMaxFrameText.setText("30");
1316: previewMaxFrameText.setToolTipText(org.openide.util.NbBundle
1317: .getMessage(SVGAnimationRasterizerPanel.class,
1318: "TOOL_TIP_previewMaxFrameText")); // NOI18N
1319:
1320: jLabel7
1321: .setDisplayedMnemonic(java.util.ResourceBundle
1322: .getBundle(
1323: "org/netbeans/modules/mobility/svgcore/export/Bundle")
1324: .getString("LBL_AnimationPreviewTime")
1325: .charAt(0));
1326: jLabel7.setLabelFor(previewCurrentTimeText);
1327: jLabel7.setText(org.openide.util.NbBundle.getMessage(
1328: SVGAnimationRasterizerPanel.class,
1329: "LBL_AnimationPreviewTime")); // NOI18N
1330:
1331: previewCurrentTimeText.setEditable(false);
1332: previewCurrentTimeText
1333: .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
1334: previewCurrentTimeText.setText("0");
1335: previewCurrentTimeText.setToolTipText(org.openide.util.NbBundle
1336: .getMessage(SVGAnimationRasterizerPanel.class,
1337: "TOOL_TIP_previewCurrentTimeText")); // NOI18N
1338:
1339: jLabel8.setText("/");
1340:
1341: jLabel9.setText("/");
1342:
1343: previewEndTimeText.setEditable(false);
1344: previewEndTimeText.setText("60");
1345: previewEndTimeText.setToolTipText(org.openide.util.NbBundle
1346: .getMessage(SVGAnimationRasterizerPanel.class,
1347: "TOOL_TIP_previewEndTimeText")); // NOI18N
1348:
1349: jLabel10.setText("[s]");
1350:
1351: org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(
1352: jPanel3);
1353: jPanel3.setLayout(jPanel3Layout);
1354: jPanel3Layout
1355: .setHorizontalGroup(jPanel3Layout
1356: .createParallelGroup(
1357: org.jdesktop.layout.GroupLayout.LEADING)
1358: .add(
1359: org.jdesktop.layout.GroupLayout.TRAILING,
1360: jPanel3Layout
1361: .createSequentialGroup()
1362: .addContainerGap()
1363: .add(
1364: jPanel3Layout
1365: .createParallelGroup(
1366: org.jdesktop.layout.GroupLayout.TRAILING)
1367: .add(
1368: org.jdesktop.layout.GroupLayout.LEADING,
1369: imageHolder,
1370: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1371: 442,
1372: Short.MAX_VALUE)
1373: .add(
1374: org.jdesktop.layout.GroupLayout.LEADING,
1375: jPanel4,
1376: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1377: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1378: Short.MAX_VALUE)
1379: .add(
1380: org.jdesktop.layout.GroupLayout.LEADING,
1381: jPanel3Layout
1382: .createSequentialGroup()
1383: .add(
1384: previewLabel)
1385: .addPreferredGap(
1386: org.jdesktop.layout.LayoutStyle.RELATED)
1387: .add(
1388: previewFrameSpinner,
1389: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1390: 49,
1391: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1392: .addPreferredGap(
1393: org.jdesktop.layout.LayoutStyle.RELATED)
1394: .add(
1395: jLabel9)
1396: .addPreferredGap(
1397: org.jdesktop.layout.LayoutStyle.RELATED)
1398: .add(
1399: previewMaxFrameText,
1400: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1401: 35,
1402: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1403: .addPreferredGap(
1404: org.jdesktop.layout.LayoutStyle.RELATED,
1405: 62,
1406: Short.MAX_VALUE)
1407: .add(
1408: jLabel7)
1409: .addPreferredGap(
1410: org.jdesktop.layout.LayoutStyle.RELATED)
1411: .add(
1412: previewCurrentTimeText,
1413: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1414: 56,
1415: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1416: .addPreferredGap(
1417: org.jdesktop.layout.LayoutStyle.RELATED)
1418: .add(
1419: jLabel8)
1420: .addPreferredGap(
1421: org.jdesktop.layout.LayoutStyle.RELATED)
1422: .add(
1423: previewEndTimeText,
1424: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1425: 54,
1426: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1427: .addPreferredGap(
1428: org.jdesktop.layout.LayoutStyle.RELATED)
1429: .add(
1430: jLabel10)))
1431: .addContainerGap()));
1432: jPanel3Layout
1433: .setVerticalGroup(jPanel3Layout
1434: .createParallelGroup(
1435: org.jdesktop.layout.GroupLayout.LEADING)
1436: .add(
1437: org.jdesktop.layout.GroupLayout.TRAILING,
1438: jPanel3Layout
1439: .createSequentialGroup()
1440: .add(
1441: jPanel3Layout
1442: .createParallelGroup(
1443: org.jdesktop.layout.GroupLayout.BASELINE)
1444: .add(
1445: previewLabel)
1446: .add(
1447: previewFrameSpinner,
1448: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1449: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1450: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1451: .add(jLabel9)
1452: .add(jLabel8)
1453: .add(jLabel10)
1454: .add(jLabel7)
1455: .add(
1456: previewMaxFrameText,
1457: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1458: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1459: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1460: .add(
1461: previewCurrentTimeText,
1462: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1463: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1464: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1465: .add(
1466: previewEndTimeText,
1467: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1468: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1469: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
1470: .addPreferredGap(
1471: org.jdesktop.layout.LayoutStyle.RELATED)
1472: .add(
1473: imageHolder,
1474: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1475: 467, Short.MAX_VALUE)
1476: .addPreferredGap(
1477: org.jdesktop.layout.LayoutStyle.UNRELATED)
1478: .add(
1479: jPanel4,
1480: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1481: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1482: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1483: .addContainerGap()));
1484:
1485: imageHolder.getAccessibleContext().setAccessibleName(
1486: org.openide.util.NbBundle.getMessage(
1487: SVGAnimationRasterizerPanel.class,
1488: "ACCESSIBLE_NAME_imageHolder")); // NOI18N
1489: imageHolder.getAccessibleContext().setAccessibleDescription(
1490: org.openide.util.NbBundle.getMessage(
1491: SVGAnimationRasterizerPanel.class,
1492: "ACCESSIBLE_DESCRIPTION_imageHolder")); // NOI18N
1493: previewLabel.getAccessibleContext().setAccessibleName(
1494: org.openide.util.NbBundle.getMessage(
1495: SVGAnimationRasterizerPanel.class,
1496: "ACCESSIBLE_NAME_previewLabel")); // NOI18N
1497: previewLabel.getAccessibleContext().setAccessibleDescription(
1498: org.openide.util.NbBundle.getMessage(
1499: SVGAnimationRasterizerPanel.class,
1500: "ACCESSIBLE_DESCRIPTION_previewLabel")); // NOI18N
1501: previewFrameSpinner.getAccessibleContext().setAccessibleName(
1502: org.openide.util.NbBundle.getMessage(
1503: SVGAnimationRasterizerPanel.class,
1504: "ACCESSIBLE_NAME_previewFrameSpinner")); // NOI18N
1505: previewFrameSpinner
1506: .getAccessibleContext()
1507: .setAccessibleDescription(
1508: org.openide.util.NbBundle
1509: .getMessage(
1510: SVGAnimationRasterizerPanel.class,
1511: "ACCESSIBLE_DESCRIPTION_previewFrameSpinner")); // NOI18N
1512: previewMaxFrameText.getAccessibleContext().setAccessibleName(
1513: org.openide.util.NbBundle.getMessage(
1514: SVGAnimationRasterizerPanel.class,
1515: "ACCESSIBLE_NAME_previwMaxFrameSet")); // NOI18N
1516: previewMaxFrameText
1517: .getAccessibleContext()
1518: .setAccessibleDescription(
1519: org.openide.util.NbBundle
1520: .getMessage(
1521: SVGAnimationRasterizerPanel.class,
1522: "ACCESSIBLE_DESCRIPTION_previwMaxFrameSet")); // NOI18N
1523: jLabel7.getAccessibleContext().setAccessibleName(
1524: org.openide.util.NbBundle.getMessage(
1525: SVGAnimationRasterizerPanel.class,
1526: "ACCESSIBLE_NAME_jLabel7")); // NOI18N
1527: jLabel7.getAccessibleContext().setAccessibleDescription(
1528: org.openide.util.NbBundle.getMessage(
1529: SVGAnimationRasterizerPanel.class,
1530: "ACCESSIBLE_DESCRIPTION_jLabel7")); // NOI18N
1531: previewCurrentTimeText.getAccessibleContext()
1532: .setAccessibleName(
1533: org.openide.util.NbBundle.getMessage(
1534: SVGAnimationRasterizerPanel.class,
1535: "ACCESSIBLE_NAME_previewCurrentTime")); // NOI18N
1536: previewCurrentTimeText
1537: .getAccessibleContext()
1538: .setAccessibleDescription(
1539: org.openide.util.NbBundle
1540: .getMessage(
1541: SVGAnimationRasterizerPanel.class,
1542: "ACCESSIBLE_DESCRIPTION_previewCurrentTime")); // NOI18N
1543: jLabel8.getAccessibleContext().setAccessibleName(
1544: org.openide.util.NbBundle.getMessage(
1545: SVGAnimationRasterizerPanel.class,
1546: "ACCESSIBLE_NAME_jLabel8")); // NOI18N
1547: jLabel8.getAccessibleContext().setAccessibleDescription(
1548: org.openide.util.NbBundle.getMessage(
1549: SVGAnimationRasterizerPanel.class,
1550: "ACCESSIBLE_DESCRIPTION_jLabel8")); // NOI18N
1551: jLabel9.getAccessibleContext().setAccessibleName(
1552: org.openide.util.NbBundle.getMessage(
1553: SVGAnimationRasterizerPanel.class,
1554: "ACCESSIBLE_NAME_jLabel9")); // NOI18N
1555: jLabel9.getAccessibleContext().setAccessibleDescription(
1556: org.openide.util.NbBundle.getMessage(
1557: SVGAnimationRasterizerPanel.class,
1558: "ACCESSIBLE_DESCRIPTION_jLabel9")); // NOI18N
1559: previewEndTimeText.getAccessibleContext().setAccessibleName(
1560: org.openide.util.NbBundle.getMessage(
1561: SVGAnimationRasterizerPanel.class,
1562: "ACCESSIBLE_NAME_previewEndTimeText")); // NOI18N
1563: previewEndTimeText
1564: .getAccessibleContext()
1565: .setAccessibleDescription(
1566: org.openide.util.NbBundle
1567: .getMessage(
1568: SVGAnimationRasterizerPanel.class,
1569: "ACCESSIBLE_DESCRIPTION_previewEndTimeText")); // NOI18N
1570: jLabel10.getAccessibleContext().setAccessibleName(
1571: org.openide.util.NbBundle.getMessage(
1572: SVGAnimationRasterizerPanel.class,
1573: "ACCESSIBLE_NAME_jlabel10")); // NOI18N
1574: jLabel10.getAccessibleContext().setAccessibleDescription(
1575: org.openide.util.NbBundle.getMessage(
1576: SVGAnimationRasterizerPanel.class,
1577: "ACCESSIBLE_DESCRIPTION_jLabel10")); // NOI18N
1578:
1579: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
1580: this );
1581: this .setLayout(layout);
1582: layout
1583: .setHorizontalGroup(layout
1584: .createParallelGroup(
1585: org.jdesktop.layout.GroupLayout.LEADING)
1586: .add(
1587: org.jdesktop.layout.GroupLayout.TRAILING,
1588: layout
1589: .createSequentialGroup()
1590: .addContainerGap()
1591: .add(
1592: jPanel3,
1593: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1594: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1595: Short.MAX_VALUE)
1596: .addPreferredGap(
1597: org.jdesktop.layout.LayoutStyle.RELATED)
1598: .add(
1599: layout
1600: .createParallelGroup(
1601: org.jdesktop.layout.GroupLayout.LEADING,
1602: false)
1603: .add(
1604: timeLinePanel,
1605: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1606: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1607: Short.MAX_VALUE)
1608: .add(
1609: optionsPanel,
1610: 0,
1611: 250,
1612: Short.MAX_VALUE)
1613: .add(
1614: sizePanel,
1615: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1616: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1617: Short.MAX_VALUE)
1618: .add(
1619: exportPanel,
1620: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1621: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1622: Short.MAX_VALUE))
1623: .addContainerGap()));
1624: layout
1625: .setVerticalGroup(layout
1626: .createParallelGroup(
1627: org.jdesktop.layout.GroupLayout.LEADING)
1628: .add(
1629: org.jdesktop.layout.GroupLayout.TRAILING,
1630: layout
1631: .createSequentialGroup()
1632: .addContainerGap()
1633: .add(
1634: layout
1635: .createParallelGroup(
1636: org.jdesktop.layout.GroupLayout.TRAILING)
1637: .add(
1638: org.jdesktop.layout.GroupLayout.LEADING,
1639: jPanel3,
1640: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1641: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1642: Short.MAX_VALUE)
1643: .add(
1644: org.jdesktop.layout.GroupLayout.LEADING,
1645: layout
1646: .createSequentialGroup()
1647: .add(
1648: sizePanel,
1649: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1650: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1651: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1652: .addPreferredGap(
1653: org.jdesktop.layout.LayoutStyle.RELATED)
1654: .add(
1655: optionsPanel,
1656: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1657: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1658: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1659: .addPreferredGap(
1660: org.jdesktop.layout.LayoutStyle.RELATED)
1661: .add(
1662: timeLinePanel,
1663: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1664: 183,
1665: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
1666: .addPreferredGap(
1667: org.jdesktop.layout.LayoutStyle.RELATED)
1668: .add(
1669: exportPanel,
1670: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
1671: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
1672: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
1673: .addContainerGap()));
1674:
1675: sizePanel.getAccessibleContext().setAccessibleName(
1676: org.openide.util.NbBundle.getMessage(
1677: SVGAnimationRasterizerPanel.class,
1678: "ACCESSIBLE_NAME_sizePanel")); // NOI18N
1679: sizePanel.getAccessibleContext().setAccessibleDescription(
1680: org.openide.util.NbBundle.getMessage(
1681: SVGAnimationRasterizerPanel.class,
1682: "ACCESSIBLE_DESCRIPTION_sizePanel")); // NOI18N
1683: optionsPanel.getAccessibleContext().setAccessibleName(
1684: org.openide.util.NbBundle.getMessage(
1685: SVGAnimationRasterizerPanel.class,
1686: "ACCESSIBLE_NAME_optionsPanel")); // NOI18N
1687: optionsPanel.getAccessibleContext().setAccessibleDescription(
1688: org.openide.util.NbBundle.getMessage(
1689: SVGAnimationRasterizerPanel.class,
1690: "ACCESSIBLE_DESCRIPTION_optionsPanel")); // NOI18N
1691: timeLinePanel.getAccessibleContext().setAccessibleName(
1692: org.openide.util.NbBundle.getMessage(
1693: SVGAnimationRasterizerPanel.class,
1694: "ACCESSIBLE_NAME_timeLinePanel")); // NOI18N
1695: timeLinePanel.getAccessibleContext().setAccessibleDescription(
1696: org.openide.util.NbBundle.getMessage(
1697: SVGAnimationRasterizerPanel.class,
1698: "ACCESSIBLE_DESCRIPTION_timeLinePanel")); // NOI18N
1699: exportPanel.getAccessibleContext().setAccessibleName(
1700: org.openide.util.NbBundle.getMessage(
1701: SVGAnimationRasterizerPanel.class,
1702: "ACCESSIBLE_NAME_exportPanel")); // NOI18N
1703: exportPanel.getAccessibleContext().setAccessibleDescription(
1704: org.openide.util.NbBundle.getMessage(
1705: SVGAnimationRasterizerPanel.class,
1706: "ACCESSIBLE_DESCRIPTION_exportPanel")); // NOI18N
1707: jPanel3.getAccessibleContext().setAccessibleName(
1708: org.openide.util.NbBundle.getMessage(
1709: SVGAnimationRasterizerPanel.class,
1710: "ACCESSIBLE_NAME_jPanel3")); // NOI18N
1711: jPanel3.getAccessibleContext().setAccessibleDescription(
1712: org.openide.util.NbBundle.getMessage(
1713: SVGAnimationRasterizerPanel.class,
1714: "ACCESSIBLE_DESCRIPTION_previewFileText")); // NOI18N
1715: }// </editor-fold>//GEN-END:initComponents
1716:
1717: private void transparentCheckBoxActionPerformed(
1718: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_transparentCheckBoxActionPerformed
1719: updateImage((JComponent) evt.getSource(), true);
1720: }//GEN-LAST:event_transparentCheckBoxActionPerformed
1721:
1722: private void colorReductionChanged(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_colorReductionChanged
1723: updateImage((JComponent) evt.getSource(), true);
1724: }//GEN-LAST:event_colorReductionChanged
1725:
1726: private void allFramesInSingleFileChanged(
1727: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allFramesInSingleFileChanged
1728: updateImage((JComponent) evt.getSource(), true);
1729: }//GEN-LAST:event_allFramesInSingleFileChanged
1730:
1731: private void formatComboBoxActionPerformed(
1732: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_formatComboBoxActionPerformed
1733: updateImage((JComponent) evt.getSource(), true);
1734: }//GEN-LAST:event_formatComboBoxActionPerformed
1735:
1736: private void keepRatioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_keepRatioActionPerformed
1737: spinnerHeight.setEnabled(!keepRatio.isSelected());
1738: }//GEN-LAST:event_keepRatioActionPerformed
1739:
1740: // Variables declaration - do not modify//GEN-BEGIN:variables
1741: private javax.swing.JCheckBox allFramesCheckBox;
1742: private javax.swing.ButtonGroup buttonGroup1;
1743: private javax.swing.JLabel compressionLabel;
1744: private javax.swing.JComboBox compressionLevelCombo;
1745: private javax.swing.JLabel compressionQualityLabel;
1746: private javax.swing.JSpinner compressionQualitySpinner;
1747: private javax.swing.JPanel exportPanel;
1748: private javax.swing.JComboBox formatComboBox;
1749: private javax.swing.JSpinner framesPerSecSpinner;
1750: private javax.swing.JScrollPane imageHolder;
1751: private javax.swing.JLabel jLabel1;
1752: private javax.swing.JLabel jLabel3;
1753: private javax.swing.JLabel jLabel4;
1754: private javax.swing.JLabel jLabel5;
1755: private javax.swing.JLabel jLabel7;
1756: private javax.swing.JPanel jPanel1;
1757: private javax.swing.JPanel jPanel3;
1758: private javax.swing.JPanel jPanel4;
1759: private javax.swing.JCheckBox keepRatio;
1760: private javax.swing.JPanel optionsPanel;
1761: private javax.swing.JTextField previewAnimationSizeText;
1762: private javax.swing.JTextField previewCurrentTimeText;
1763: private javax.swing.JTextField previewEndTimeText;
1764: private javax.swing.JTextField previewFileText;
1765: private javax.swing.JTextField previewFormatText;
1766: private javax.swing.JTextField previewFrameSizeText;
1767: private javax.swing.JSpinner previewFrameSpinner;
1768: private javax.swing.JTextField previewMaxFrameText;
1769: private javax.swing.JCheckBox progressiveCheckBox;
1770: private javax.swing.JRadioButton radioExportAll;
1771: private javax.swing.JRadioButton radioExportCurrent;
1772: private javax.swing.JComboBox reductionCombo;
1773: private javax.swing.JLabel reductionLabel;
1774: private javax.swing.JPanel sizePanel;
1775: private javax.swing.JSpinner spinnerHeight;
1776: private javax.swing.JSpinner spinnerWidth;
1777: private javax.swing.JSlider startTimeSlider;
1778: private javax.swing.JSpinner startTimeSpinner;
1779: private javax.swing.JSlider stopTimeSlider;
1780: private javax.swing.JSpinner stopTimeSpinner;
1781: private javax.swing.JPanel timeLinePanel;
1782: private javax.swing.JCheckBox transparentCheckBox;
1783:
1784: // End of variables declaration//GEN-END:variables
1785:
1786: public int getImageWidth() {
1787: return m_overrideWidth != -1 ? m_overrideWidth
1788: : ((Integer) spinnerWidth.getValue()).intValue();
1789: }
1790:
1791: public int getImageHeight() {
1792: return m_overrideHeight != -1 ? m_overrideHeight
1793: : ((Integer) spinnerHeight.getValue()).intValue();
1794: }
1795:
1796: public float getStartTime() {
1797: return ((Double) startTimeSpinner.getValue()).floatValue();
1798: }
1799:
1800: public float getEndTime() {
1801: return ((Double) stopTimeSpinner.getValue()).floatValue();
1802: }
1803:
1804: public float getFramesPerSecond() {
1805: return ((Double) framesPerSecSpinner.getValue()).floatValue();
1806: }
1807:
1808: public boolean isForAllConfigurations() {
1809: return radioExportAll.isSelected();
1810: }
1811:
1812: public float getCompressionQuality() {
1813: int value = ((Integer) compressionQualitySpinner.getValue())
1814: .intValue();
1815: return ((float) value) / 100f;
1816: }
1817:
1818: public boolean isProgressive() {
1819: return progressiveCheckBox.isSelected();
1820: }
1821:
1822: public boolean isTransparent() {
1823: return transparentCheckBox.isSelected();
1824: }
1825:
1826: public boolean isInSingleImage() {
1827: return allFramesCheckBox.isSelected();
1828: }
1829:
1830: public int getNumberFrames() {
1831: float duration = getEndTime() - getStartTime();
1832: return 1 + (duration <= 0 ? 0
1833: : (int) ((duration) * getFramesPerSecond()));
1834: }
1835:
1836: public AnimationRasterizer.ImageType getImageType() {
1837: return (AnimationRasterizer.ImageType) formatComboBox
1838: .getSelectedItem();
1839: }
1840:
1841: public ColorReductionMethod getColorReductionMethod() {
1842: return (ColorReductionMethod) reductionCombo.getSelectedItem();
1843: }
1844:
1845: protected void updateImage(JComponent source,
1846: boolean isOutputChanged) {
1847: if (!m_updateInProgress) {
1848: m_updateInProgress = true;
1849: //System.out.println("Updating model " + source);
1850: final JLabel label = new JLabel("Updating image...");
1851: label.setHorizontalAlignment(SwingConstants.CENTER);
1852: label.setVerticalAlignment(SwingConstants.CENTER);
1853: label.setMinimumSize(new Dimension(100, 100));
1854: imageHolder.setViewportView(label);
1855:
1856: updateTimelineBounds(source);
1857:
1858: ImageType imgType = getImageType();
1859: boolean supportsCompression = imgType.supportsCompression();
1860:
1861: compressionQualitySpinner.setEnabled(supportsCompression);
1862: compressionLevelCombo.setEnabled(supportsCompression);
1863: compressionLabel.setEnabled(supportsCompression);
1864: compressionQualityLabel.setEnabled(supportsCompression);
1865:
1866: boolean needsColorReduction = imgType.needsColorReduction();
1867: reductionCombo.setEnabled(needsColorReduction);
1868: reductionLabel.setEnabled(needsColorReduction);
1869:
1870: if (imgType.supportsTransparency()) {
1871: transparentCheckBox.setEnabled(true);
1872: } else {
1873: transparentCheckBox.setEnabled(false);
1874: transparentCheckBox.setSelected(false);
1875: }
1876:
1877: float startTime = getStartTime(), endTime = getEndTime(), framesPerSec = getFramesPerSecond();
1878:
1879: final float duration = endTime - startTime;
1880: final int totalFrameNum = getNumberFrames();
1881:
1882: m_previewSpinnerModel.setMaximum(totalFrameNum);
1883: if (m_startTime.findWrapper(source) != null) {
1884: previewFrameSpinner.setValue(new Integer(1));
1885: } else if (m_stopTime.findWrapper(source) != null) {
1886: previewFrameSpinner
1887: .setValue(new Integer(totalFrameNum));
1888: }
1889: final int currentFrame = ((Integer) previewFrameSpinner
1890: .getValue()).intValue() - 1;
1891: assert currentFrame >= 0;
1892: final float frameTime = startTime + currentFrame
1893: / framesPerSec;
1894:
1895: String filenameRoot = AnimationRasterizer
1896: .createFileNameRoot(m_dObj, this , null, true);
1897: final String fileName = AnimationRasterizer.createFileName(
1898: filenameRoot, this , currentFrame, totalFrameNum);
1899:
1900: if (isOutputChanged) {
1901: previewAnimationSizeText
1902: .setText("Calculating animation size ...");
1903:
1904: if (m_sizeCalculationThread != null) {
1905: m_sizeCalculationThread.interrupt();
1906: }
1907: m_sizeCalculationThread = new Thread() {
1908: public void run() {
1909: try {
1910: AnimationRasterizer
1911: .calculateAnimationSize(
1912: getSVGImage(),
1913: SVGAnimationRasterizerPanel.this ,
1914: new AnimationRasterizer.ProgressUpdater() {
1915: public void updateProgress(
1916: final String text) {
1917: SwingUtilities
1918: .invokeLater(new Runnable() {
1919: public void run() {
1920: previewAnimationSizeText
1921: .setText(text);
1922: }
1923: });
1924: }
1925: });
1926: } catch (InterruptedException e) {
1927: } catch (Exception ex) {
1928: Exceptions.printStackTrace(ex);
1929: }
1930: }
1931: };
1932: m_sizeCalculationThread.setDaemon(true);
1933: m_sizeCalculationThread
1934: .setPriority(Thread.MIN_PRIORITY);
1935: m_sizeCalculationThread
1936: .setName("AnimationSizeCalculationThread");
1937: m_sizeCalculationThread.start();
1938: }
1939:
1940: RequestProcessor.getDefault().post(new Runnable() {
1941: public void run() {
1942: try {
1943: final AnimationRasterizer.PreviewInfo preview = AnimationRasterizer
1944: .previewFrame(
1945: getSVGImage(),
1946: SVGAnimationRasterizerPanel.this ,
1947: currentFrame, frameTime);
1948: SwingUtilities.invokeLater(new Runnable() {
1949: public void run() {
1950: previewFrameSizeText
1951: .setText(AnimationRasterizer
1952: .getSizeText(preview.m_imageSize));
1953: previewFormatText
1954: .setText(preview.m_imageFormat);
1955: previewFileText.setText(fileName);
1956: previewMaxFrameText.setText(String
1957: .valueOf(totalFrameNum));
1958: previewCurrentTimeText.setText(String
1959: .valueOf(roundTime(frameTime)));
1960: previewEndTimeText.setText(String
1961: .valueOf(roundTime(duration)));
1962: //TODO Handle images not saved yet
1963: label.setText(null);
1964: label.setIcon(new ImageIcon(
1965: preview.m_image));
1966: label.invalidate();
1967: imageHolder.validate();
1968: imageHolder.repaint();
1969: }
1970: });
1971: } catch (Exception ex) {
1972: Exceptions.printStackTrace(ex);
1973: } finally {
1974: m_updateInProgress = false;
1975: }
1976: }
1977: });
1978: }
1979: }
1980:
1981: private void updateTimelineBounds(JComponent source) {
1982: ComponentGroup.ComponentWrapper wrapper;
1983: if ((wrapper = m_startTime.findWrapper(source)) != null) {
1984: float value = wrapper.getValue();
1985: stopTimeSlider.setExtent(Math.round(value * 100));
1986: ((SpinnerNumberModel) stopTimeSpinner.getModel())
1987: .setMinimum(new Double(value));
1988: } else if ((wrapper = m_stopTime.findWrapper(source)) != null) {
1989: float value = wrapper.getValue();
1990: startTimeSlider.setExtent(startTimeSlider.getMaximum()
1991: - Math.round(value * 100));
1992: ((SpinnerNumberModel) startTimeSpinner.getModel())
1993: .setMaximum(new Double(value));
1994: }
1995: }
1996: }
|