88 return null; 89 } 90 91 public int getIndexAtPoint(int x, int y) { 92 Thread.dumpStack(); 93 return 0; 94 } 95 96 97 /** 98 * Create a Text area. 99 */ 100 XTextAreaPeer(TextArea target) { 101 super( target ); 102 103 // some initializations require that target be set even 104 // though init(target) has not been called 105 this.target = target; 106 107 //ComponentAccessor.enableEvents(target,AWTEvent.MOUSE_WHEEL_EVENT_MASK); 108 target.enableInputMethods(true); 109 110 firstChangeSkipped = false; 111 String text = ((TextArea)target).getText(); 112 jtext = new AWTTextArea(text, this); 113 jtext.setWrapStyleWord(true); 114 jtext.getDocument().addDocumentListener(jtext); 115 XToolkit.specialPeerMap.put(jtext,this); 116 jtext.enableInputMethods(true); 117 textPane = new AWTTextPane(jtext,this, target.getParent()); 118 119 setBounds(x, y, width, height, SET_BOUNDS); 120 textPane.setVisible(true); 121 textPane.validate(); 122 123 AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor(); 124 foreground = compAccessor.getForeground(target); 125 if (foreground == null) { 126 foreground = SystemColor.textText; 127 } 128 setForeground(foreground); 129 130 background = compAccessor.getBackground(target); 131 if (background == null) { 132 if (target.isEditable()) background = SystemColor.text; 133 else background = SystemColor.control; 134 } 135 setBackground(background); 136 | 88 return null; 89 } 90 91 public int getIndexAtPoint(int x, int y) { 92 Thread.dumpStack(); 93 return 0; 94 } 95 96 97 /** 98 * Create a Text area. 99 */ 100 XTextAreaPeer(TextArea target) { 101 super( target ); 102 103 // some initializations require that target be set even 104 // though init(target) has not been called 105 this.target = target; 106 107 //ComponentAccessor.enableEvents(target,AWTEvent.MOUSE_WHEEL_EVENT_MASK); 108 109 firstChangeSkipped = false; 110 String text = ((TextArea)target).getText(); 111 jtext = new AWTTextArea(text, this); 112 jtext.setWrapStyleWord(true); 113 jtext.getDocument().addDocumentListener(jtext); 114 XToolkit.specialPeerMap.put(jtext,this); 115 textPane = new AWTTextPane(jtext,this, target.getParent()); 116 117 setBounds(x, y, width, height, SET_BOUNDS); 118 textPane.setVisible(true); 119 textPane.validate(); 120 121 AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor(); 122 foreground = compAccessor.getForeground(target); 123 if (foreground == null) { 124 foreground = SystemColor.textText; 125 } 126 setForeground(foreground); 127 128 background = compAccessor.getBackground(target); 129 if (background == null) { 130 if (target.isEditable()) background = SystemColor.text; 131 else background = SystemColor.control; 132 } 133 setBackground(background); 134 |