equal
deleted
inserted
replaced
777 */ |
777 */ |
778 public void installUI(JComponent c) { |
778 public void installUI(JComponent c) { |
779 if (c instanceof JTextComponent) { |
779 if (c instanceof JTextComponent) { |
780 editor = (JTextComponent) c; |
780 editor = (JTextComponent) c; |
781 |
781 |
|
782 // common case is background painted... this can |
|
783 // easily be changed by subclasses or from outside |
|
784 // of the component. |
|
785 LookAndFeel.installProperty(editor, "opaque", Boolean.TRUE); |
|
786 LookAndFeel.installProperty(editor, "autoscrolls", Boolean.TRUE); |
|
787 |
782 // install defaults |
788 // install defaults |
783 installDefaults(); |
789 installDefaults(); |
784 installDefaults2(); |
790 installDefaults2(); |
785 |
|
786 // This is a workaround as these should not override what synth has |
|
787 // set them to |
|
788 if (! (this instanceof SynthUI)) { |
|
789 // common case is background painted... this can |
|
790 // easily be changed by subclasses or from outside |
|
791 // of the component. |
|
792 LookAndFeel.installProperty(editor, "opaque", Boolean.TRUE); |
|
793 LookAndFeel.installProperty(editor, "autoscrolls", Boolean.TRUE); |
|
794 } |
|
795 |
791 |
796 // attach to the model and editor |
792 // attach to the model and editor |
797 editor.addPropertyChangeListener(updateHandler); |
793 editor.addPropertyChangeListener(updateHandler); |
798 Document doc = editor.getDocument(); |
794 Document doc = editor.getDocument(); |
799 if (doc == null) { |
795 if (doc == null) { |