home *** CD-ROM | disk | FTP | other *** search
- package programinfo;
-
- import devplugin.SettingsTab;
- import java.awt.BorderLayout;
- import java.awt.Font;
- import java.awt.GridLayout;
- import java.awt.Point;
- import java.util.Properties;
- import javax.swing.BorderFactory;
- import javax.swing.Icon;
- import javax.swing.JButton;
- import javax.swing.JPanel;
- import javax.swing.JScrollPane;
- import javax.swing.JTextArea;
- import util.ui.Localizer;
-
- public class ProgramInfoSettingsTab implements SettingsTab {
- private static final Localizer mLocalizer;
- private JTextArea mStyleSheetTa;
- private Properties mSettings;
- // $FF: synthetic field
- static Class class$programinfo$ProgramInfoSettingsTab;
-
- public ProgramInfoSettingsTab(Properties settings) {
- this.mSettings = settings;
- }
-
- public JPanel createSettingsPanel() {
- JPanel content = new JPanel(new BorderLayout(0, 4));
- content.setBorder(BorderFactory.createTitledBorder(mLocalizer.msg("stylesheet", "Stylesheet for program information window")));
- this.mStyleSheetTa = new JTextArea();
- String styleSheet = this.mSettings.getProperty("stylesheet_v1");
- if (styleSheet == null) {
- styleSheet = "#title {\n font-size:15px;\n font-family:Dialog;\n text-align:center;\n font-weight:bold;\n}\n\n#time {\n font-size:9px;\n font-family:Dialog;\n text-align:center;\n}\n\n#maininfo {\n font-size:9px;\n font-family:Dialog;\n text-align:right;\n font-weight:bold;\n}\n\n#info {\n font-size:9px;\n font-family:Dialog;\n}\n\n#text {\n font-size:11px;\n font-family:Dialog;\n}\n\n#small {\n font-size:9px;\n font-family:Dialog;\n}\n";
- }
-
- this.mStyleSheetTa.setText(styleSheet);
- this.mStyleSheetTa.setRows(10);
- this.mStyleSheetTa.setFont(new Font("Monospaced", 0, 12));
- JButton previewBtn = new JButton(mLocalizer.msg("preview", "Preview"));
- JButton defaultBtn = new JButton(mLocalizer.msg("default", "Default"));
- previewBtn.addActionListener(new 1(this));
- defaultBtn.addActionListener(new 2(this));
- JPanel eastPn = new JPanel(new BorderLayout());
- eastPn.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 0));
- JPanel btnPn = new JPanel(new GridLayout(2, 1, 3, 0));
- btnPn.add(previewBtn);
- btnPn.add(defaultBtn);
- eastPn.add(btnPn, "North");
- JScrollPane sp = new JScrollPane(this.mStyleSheetTa);
- sp.getViewport().setViewPosition(new Point(0, 0));
- content.add(sp, "Center");
- content.add(eastPn, "East");
- return content;
- }
-
- public void saveSettings() {
- this.mSettings.setProperty("stylesheet_v1", this.mStyleSheetTa.getText());
- }
-
- public Icon getIcon() {
- return null;
- }
-
- public String getTitle() {
- return null;
- }
-
- // $FF: synthetic method
- static Class class$(String x0) {
- try {
- return Class.forName(x0);
- } catch (ClassNotFoundException x1) {
- throw new NoClassDefFoundError(x1.getMessage());
- }
- }
-
- // $FF: synthetic method
- static JTextArea access$000(ProgramInfoSettingsTab x0) {
- return x0.mStyleSheetTa;
- }
-
- static {
- mLocalizer = Localizer.getLocalizerFor(class$programinfo$ProgramInfoSettingsTab == null ? (class$programinfo$ProgramInfoSettingsTab = class$("programinfo.ProgramInfoSettingsTab")) : class$programinfo$ProgramInfoSettingsTab);
- }
- }
-