Ticket #8488: 8488_proto.patch

File 8488_proto.patch, 4.3 KB (added by Don-vip, 11 years ago)

Prototype

  • core/src/org/openstreetmap/josm/actions/AboutAction.java

     
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    66import java.awt.Dimension;
     7import java.awt.Font;
    78import java.awt.GridBagLayout;
    89import java.awt.event.ActionEvent;
    910import java.awt.event.KeyEvent;
     
    7273        license.setCaretPosition(0);
    7374
    7475        JPanel info = new JPanel(new GridBagLayout());
    75         JLabel caption = new JLabel("JOSM – " + tr("Java OpenStreetMap Editor"));
    76         caption.setFont(GuiHelper.getTitleFont());
     76        String title = "JOSM – " + tr("Java OpenStreetMap Editor");
     77       
     78        JLabel caption; Font font;
     79
     80        info.add(new JLabel("No Font: "));
     81        caption = new JLabel(title);
     82        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     83
     84        info.add(new JLabel("Bold 12: "));
     85        caption = new JLabel(title);
     86        caption.setFont(font = new Font(null, Font.BOLD, 12));
     87        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     88        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     89
     90        info.add(new JLabel("20: "));
     91        caption = new JLabel(title);
     92        caption.setFont(font = new Font(null, Font.PLAIN, 20));
    7793        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     94        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     95
     96        info.add(new JLabel("Bold 20: "));
     97        caption = new JLabel(title);
     98        caption.setFont(font = new Font(null, Font.BOLD, 20));
     99        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     100        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     101
     102        info.add(new JLabel("Nominal: "));
     103        caption = new JLabel(title);
     104        caption.setFont(font = GuiHelper.getTitleFont());
     105        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     106        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     107       
     108        info.add(new JLabel("Helvetica Bold 20: "));
     109        caption = new JLabel(title);
     110        caption.setFont(font = new Font("Helvetica", Font.BOLD, 20));
     111        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     112        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     113       
     114        info.add(new JLabel("Calibri Bold 20: "));
     115        caption = new JLabel(title);
     116        caption.setFont(font = new Font("Calibri", Font.BOLD, 20));
     117        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     118        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     119
     120        info.add(new JLabel("Arial Bold 20: "));
     121        caption = new JLabel(title);
     122        caption.setFont(font = new Font("Arial", Font.BOLD, 20));
     123        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     124        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     125
     126        info.add(new JLabel("SansSerif Bold 20: "));
     127        caption = new JLabel(title);
     128        caption.setFont(font = new Font("SansSerif", Font.BOLD, 20));
     129        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     130        info.add(new JLabel(font.toString()), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     131       
    78132        info.add(GBC.glue(0,10), GBC.eol());
    79133        info.add(new JLabel(tr("Version {0}", version.getVersionString())), GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
    80134        info.add(GBC.glue(0,5), GBC.eol());
     
    97151
    98152        // Intermediate panel to allow proper optionPane resizing
    99153        JPanel panel = new JPanel(new GridBagLayout());
    100         panel.setPreferredSize(new Dimension(600, 300));
     154        panel.setPreferredSize(new Dimension(600, 600));
    101155        panel.add(about, GBC.std().fill());
    102156       
    103157        GuiHelper.prepareResizeableOptionPane(panel, panel.getPreferredSize());