Skip to content

Commit b825d5c

Browse files
committed
CodeMirror
1 parent 1a55d71 commit b825d5c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

forsrc-gwt-ui/src/main/java/com/forsrc/gwt/client/application/codemirror/MyCodeMirrorPanel.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import com.google.gwt.core.client.Scheduler;
99
import com.google.gwt.user.client.Command;
10-
10+
import com.google.gwt.user.client.ui.SimplePanel;
1111
import com.google.gwt.user.client.ui.TextArea;
1212

1313
@Api(allMethods = true)
@@ -21,7 +21,7 @@ public class MyCodeMirrorPanel extends CodeMirrorPanel {
2121
* Create an new codemirrorpanel with the default configuration.
2222
*/
2323
public MyCodeMirrorPanel() {
24-
super();
24+
this(Config.forXml());
2525
}
2626

2727
/**
@@ -31,7 +31,8 @@ public MyCodeMirrorPanel() {
3131
* the initial content.
3232
*/
3333
public MyCodeMirrorPanel(String initialData) {
34-
super(initialData);
34+
this(Config.forXml());
35+
setInitialData(initialData);
3536
}
3637

3738
/**
@@ -41,7 +42,12 @@ public MyCodeMirrorPanel(String initialData) {
4142
* the configuration.
4243
*/
4344
public MyCodeMirrorPanel(Config config) {
44-
super(config);
45+
super();
46+
this.config = config;
47+
setWidth("100%");
48+
setHeight("100%");
49+
textArea = new TextArea();
50+
setWidget(textArea);
4551
}
4652

4753
/**

0 commit comments

Comments
 (0)