litesoft
Diff Revisions
949
vs
950
for /trunk/Java/KeyHole/src/org/litesoft/aokeyhole/swing/namevaluecomponents/NamedStringLinesFieldComponent.java
|
@@ -1,35 +1,35 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.aokeyhole.swing.namevaluecomponents; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.aokeyhole.swing.simplecomponents.*; |
5 |
|
- |
import org.litesoft.aokeyhole.toolkit.*; |
6 |
|
- |
|
7 |
|
- |
import javax.swing.text.*; |
8 |
|
- |
|
9 |
|
- |
public class NamedStringLinesFieldComponent |
10 |
|
- |
extends AbstractNamedDocumentFieldComponent { |
11 |
|
- |
private boolean mWrapTextArea; |
12 |
|
- |
|
13 |
|
- |
public NamedStringLinesFieldComponent( NameValueComponentParams pParams ) { |
14 |
|
- |
super( pParams ); |
15 |
|
- |
mWrapTextArea = pParams.isWrapTextArea(); |
16 |
|
- |
} |
17 |
|
- |
|
18 |
|
- |
@Override |
19 |
|
- |
public boolean growsVertically() { |
20 |
|
- |
return true; |
21 |
|
- |
} |
22 |
|
- |
|
23 |
|
- |
@Override |
24 |
|
- |
protected void setCompText( String pText ) { |
25 |
|
- |
super.setCompText( (pText == null) ? "" : pText.replace( '|', '\n' ) ); |
26 |
|
- |
} |
27 |
|
- |
|
28 |
|
- |
@Override |
29 |
|
- |
protected JTextComponent createJTextComponent() { |
30 |
|
- |
JTextAreaPlus zTextAreaPlus = new JTextAreaPlus(); |
31 |
|
- |
zTextAreaPlus.setLineWrap( mWrapTextArea ); |
32 |
|
- |
zTextAreaPlus.setWrapStyleWord( true ); |
33 |
|
- |
return zTextAreaPlus; |
34 |
|
- |
} |
35 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.aokeyhole.swing.namevaluecomponents; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.aokeyhole.swing.simplecomponents.*; |
|
5 |
+ |
import org.litesoft.aokeyhole.toolkit.*; |
|
6 |
+ |
|
|
7 |
+ |
import javax.swing.text.*; |
|
8 |
+ |
|
|
9 |
+ |
public class NamedStringLinesFieldComponent |
|
10 |
+ |
extends AbstractNamedDocumentFieldComponent { |
|
11 |
+ |
private boolean mWrapTextArea; |
|
12 |
+ |
|
|
13 |
+ |
public NamedStringLinesFieldComponent( NameValueComponentParams pParams ) { |
|
14 |
+ |
super( pParams ); |
|
15 |
+ |
mWrapTextArea = pParams.isWrapTextArea(); |
|
16 |
+ |
} |
|
17 |
+ |
|
|
18 |
+ |
@Override |
|
19 |
+ |
public boolean growsVertically() { |
|
20 |
+ |
return true; |
|
21 |
+ |
} |
|
22 |
+ |
|
|
23 |
+ |
@Override |
|
24 |
+ |
protected void setCompText( String pText ) { |
|
25 |
+ |
super.setCompText( (pText == null) ? "" : pText.replace( '|', '\n' ) ); |
|
26 |
+ |
} |
|
27 |
+ |
|
|
28 |
+ |
@Override |
|
29 |
+ |
protected JTextComponent createJTextComponent() { |
|
30 |
+ |
JTextAreaPlus zTextAreaPlus = new JTextAreaPlus(); |
|
31 |
+ |
zTextAreaPlus.setLineWrap( mWrapTextArea ); |
|
32 |
+ |
zTextAreaPlus.setWrapStyleWord( true ); |
|
33 |
+ |
return zTextAreaPlus; |
|
34 |
+ |
} |
|
35 |
+ |
} |