1 18 package org.apache.batik.apps.svgbrowser; 19 20 import java.awt.Component ; 21 import java.awt.BorderLayout ; 22 23 import javax.swing.JLabel ; 24 import javax.swing.JCheckBox ; 25 26 32 public class SVGOptionPanel extends OptionPanel { 33 36 protected JCheckBox xmlbaseCB; 37 protected JCheckBox prettyPrintCB; 38 39 42 public SVGOptionPanel() { 43 super(new BorderLayout ()); 44 add(new JLabel (resources.getString("SVGOptionPanel.label")), 45 BorderLayout.NORTH); 46 47 xmlbaseCB = new JCheckBox 48 (resources.getString("SVGOptionPanel.UseXMLBase")); 49 xmlbaseCB.setSelected 50 (resources.getBoolean("SVGOptionPanel.UseXMLBaseDefault")); 51 add(xmlbaseCB, BorderLayout.CENTER); 52 53 prettyPrintCB = new JCheckBox 54 (resources.getString("SVGOptionPanel.PrettyPrint")); 55 prettyPrintCB.setSelected 56 (resources.getBoolean("SVGOptionPanel.PrettyPrintDefault")); 57 add(prettyPrintCB, BorderLayout.SOUTH); 58 } 59 60 63 public boolean getUseXMLBase() { 64 return xmlbaseCB.isSelected(); 65 } 66 67 70 public boolean getPrettyPrint() { 71 return prettyPrintCB.isSelected(); 72 } 73 74 78 public static SVGOptionPanel showDialog(Component parent) { 79 String title = resources.getString("SVGOptionPanel.dialog.title"); 80 SVGOptionPanel panel = new SVGOptionPanel(); 81 Dialog dialog = new Dialog(parent, title, panel); 82 dialog.pack(); 83 dialog.show(); 84 return panel; 85 } 86 } 87 | Popular Tags |