This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 164247
Collapse All | Expand All

(-)a/o.n.core/src/org/netbeans/beaninfo/editors/Bundle.properties (+3 lines)
Lines 237-242 Link Here
237
JVM triggered when bitmap fonts are installed on the system.  In order to use \
237
JVM triggered when bitmap fonts are installed on the system.  In order to use \
238
the font editor, you will need to uninstall all bitmap fonts on your system.  \
238
the font editor, you will need to uninstall all bitmap fonts on your system.  \
239
See Apple BugReporter issue 3121780 for further details.
239
See Apple BugReporter issue 3121780 for further details.
240
# http://en.wikipedia.org/wiki/The_quick_brown_fox_jumps_over_the_lazy_dog
241
# translators @see http://en.wikipedia.org/wiki/List_of_pangrams
242
MSG_Preview=The quick brown fox jumps over the lazy dog
240
243
241
# will be same as CTL_OK in openide.explorer/src/org/openide/explorer/propertysheet/Bundle.properties
244
# will be same as CTL_OK in openide.explorer/src/org/openide/explorer/propertysheet/Bundle.properties
242
CTL_OK=OK
245
CTL_OK=OK
(-)a/o.n.core/src/org/netbeans/beaninfo/editors/FontEditor.java (-3 / +14 lines)
Lines 172-178 Link Here
172
            fm = g.getFontMetrics (paintFont);
172
            fm = g.getFontMetrics (paintFont);
173
        }
173
        }
174
        g.setFont (paintFont);
174
        g.setFont (paintFont);
175
        g.drawString (fontName == null ? "null" : fontName, // NOI18N
175
        g.drawString (NbBundle.getMessage(FontEditor.class, "MSG_Preview"), // NOI18N
176
                      rectangle.x,
176
                      rectangle.x,
177
                      rectangle.y + (rectangle.height - fm.getHeight ()) / 2 + fm.getAscent ());
177
                      rectangle.y + (rectangle.height - fm.getHeight ()) / 2 + fm.getAscent ());
178
        g.setFont (originalFont);
178
        g.setFont (originalFont);
Lines 367-372 Link Here
367
            JScrollPane sp = new JScrollPane (lFont);
367
            JScrollPane sp = new JScrollPane (lFont);
368
            sp.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
368
            sp.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
369
            la.setConstraints (sp, c);
369
            la.setConstraints (sp, c);
370
            positionScrollPaneOnSelected(sp, lFont);
370
            add (sp);
371
            add (sp);
371
372
372
            lStyle.setVisibleRowCount (5);
373
            lStyle.setVisibleRowCount (5);
Lines 385-390 Link Here
385
            sp.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
386
            sp.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
386
            c.insets = new Insets (5, 5, 0, 0);
387
            c.insets = new Insets (5, 5, 0, 0);
387
            la.setConstraints (sp, c);
388
            la.setConstraints (sp, c);
389
            positionScrollPaneOnSelected(sp, lStyle);
388
            add (sp);
390
            add (sp);
389
391
390
            c.gridwidth = GridBagConstraints.REMAINDER;
392
            c.gridwidth = GridBagConstraints.REMAINDER;
Lines 405-414 Link Here
405
            sp.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
407
            sp.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
406
            c.insets = new Insets (5, 5, 0, 0);
408
            c.insets = new Insets (5, 5, 0, 0);
407
            la.setConstraints (sp, c);
409
            la.setConstraints (sp, c);
410
            positionScrollPaneOnSelected(sp, lSize);
408
            add (sp);
411
            add (sp);
409
412
410
            c.gridwidth = GridBagConstraints.REMAINDER;
413
            c.gridwidth = GridBagConstraints.REMAINDER;
411
            c.weighty = 2.0;
414
            c.weighty = 0.0;
412
            JPanel p = new JPanel (new BorderLayout());
415
            JPanel p = new JPanel (new BorderLayout());
413
            p.setBorder (new TitledBorder (" " + NbBundle.getMessage(FontEditor.class, "CTL_Preview") + " "));
416
            p.setBorder (new TitledBorder (" " + NbBundle.getMessage(FontEditor.class, "CTL_Preview") + " "));
414
417
Lines 432-438 Link Here
432
435
433
        @Override
436
        @Override
434
        public Dimension getPreferredSize () {
437
        public Dimension getPreferredSize () {
435
            return new Dimension (400, 250);
438
            return new Dimension (400, 300);
436
        }
439
        }
437
440
438
        private void updateSizeList(int size) {
441
        private void updateSizeList(int size) {
Lines 477-482 Link Here
477
                p.validate();
480
                p.validate();
478
            } 
481
            } 
479
            repaint();
482
            repaint();
483
        }
484
485
        private void positionScrollPaneOnSelected(JScrollPane scroll, JList list) {
486
            if (list.getSelectedIndex() != -1) {
487
                int start = list.getSelectedIndex() - list.getVisibleRowCount() / 2;
488
                Rectangle selected = list.getCellBounds(start < 0 ? 0 : start, list.getSelectedIndex());
489
                scroll.getViewport().setViewPosition(new Point(selected.x, selected.y));
490
            }
480
        }
491
        }
481
    }
492
    }
482
493

Return to bug 164247