equal
deleted
inserted
replaced
438 * Returns the title-font of the titled border. |
438 * Returns the title-font of the titled border. |
439 * |
439 * |
440 * @return the title-font of the titled border |
440 * @return the title-font of the titled border |
441 */ |
441 */ |
442 public Font getTitleFont() { |
442 public Font getTitleFont() { |
443 return titleFont; |
443 return titleFont == null ? UIManager.getFont("TitledBorder.font") : titleFont; |
444 } |
444 } |
445 |
445 |
446 /** |
446 /** |
447 * Returns the title-color of the titled border. |
447 * Returns the title-color of the titled border. |
448 * |
448 * |
449 * @return the title-color of the titled border |
449 * @return the title-color of the titled border |
450 */ |
450 */ |
451 public Color getTitleColor() { |
451 public Color getTitleColor() { |
452 return titleColor; |
452 return titleColor == null ? UIManager.getColor("TitledBorder.titleColor") : titleColor; |
453 } |
453 } |
454 |
454 |
455 |
455 |
456 // REMIND(aim): remove all or some of these set methods? |
456 // REMIND(aim): remove all or some of these set methods? |
457 |
457 |
679 protected Font getFont(Component c) { |
679 protected Font getFont(Component c) { |
680 Font font = getTitleFont(); |
680 Font font = getTitleFont(); |
681 if (font != null) { |
681 if (font != null) { |
682 return font; |
682 return font; |
683 } |
683 } |
684 font = UIManager.getFont("TitledBorder.font"); |
|
685 if (font != null) { |
|
686 return font; |
|
687 } |
|
688 if (c != null) { |
684 if (c != null) { |
689 font = c.getFont(); |
685 font = c.getFont(); |
690 if (font != null) { |
686 if (font != null) { |
691 return font; |
687 return font; |
692 } |
688 } |
694 return new Font(Font.DIALOG, Font.PLAIN, 12); |
690 return new Font(Font.DIALOG, Font.PLAIN, 12); |
695 } |
691 } |
696 |
692 |
697 private Color getColor(Component c) { |
693 private Color getColor(Component c) { |
698 Color color = getTitleColor(); |
694 Color color = getTitleColor(); |
699 if (color != null) { |
|
700 return color; |
|
701 } |
|
702 color = UIManager.getColor("TitledBorder.titleColor"); |
|
703 if (color != null) { |
695 if (color != null) { |
704 return color; |
696 return color; |
705 } |
697 } |
706 return (c != null) |
698 return (c != null) |
707 ? c.getForeground() |
699 ? c.getForeground() |