102 |
|
|
103 |
public void actionPerformed(ActionEvent event) |
public void actionPerformed(ActionEvent event) |
104 |
{ |
{ |
105 |
|
// first we filter the following events: |
106 |
|
// - control characters |
107 |
|
// - key events with the ALT modifier (FIXME: filter that too!) |
108 |
|
char c = event.getActionCommand().charAt(0); |
109 |
|
if (Character.isISOControl(c)) |
110 |
|
return; |
111 |
|
|
112 |
JTextComponent t = getTextComponent(event); |
JTextComponent t = getTextComponent(event); |
113 |
if (t != null) |
if (t != null) |
114 |
{ |
{ |
136 |
|
|
137 |
public void actionPerformed(ActionEvent event) |
public void actionPerformed(ActionEvent event) |
138 |
{ |
{ |
139 |
|
JTextComponent t = getTextComponent(event); |
140 |
|
t.replaceSelection("\n"); |
141 |
} |
} |
142 |
} |
} |
143 |
|
|