Revision 43155 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/creation/panel/AntScriptPanel.java
AntScriptPanel.java | ||
---|---|---|
29 | 29 |
package org.gvsig.installer.swing.impl.creation.panel; |
30 | 30 |
|
31 | 31 |
import java.awt.BorderLayout; |
32 |
import java.awt.Dimension; |
|
33 |
|
|
34 |
import javax.swing.JEditorPane; |
|
35 | 32 |
import javax.swing.JPanel; |
36 |
import javax.swing.JScrollPane; |
|
37 |
import javax.swing.ScrollPaneConstants; |
|
33 |
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; |
|
34 |
import org.fife.ui.rsyntaxtextarea.SyntaxConstants; |
|
35 |
import org.fife.ui.rtextarea.RTextScrollPane; |
|
38 | 36 |
|
39 |
import org.apache.batik.util.gui.xmleditor.XMLEditorKit; |
|
40 |
|
|
41 | 37 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
42 | 38 |
import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager; |
43 | 39 |
|
... | ... | |
48 | 44 |
|
49 | 45 |
private static final long serialVersionUID = 6279969036777585961L; |
50 | 46 |
protected DefaultSwingInstallerManager swingInstallerManager = null; |
51 |
private JEditorPane scriptEditorPane;
|
|
52 |
private JScrollPane scriptScrollPane; |
|
47 |
private RSyntaxTextArea scriptEditorPane;
|
|
48 |
// private JScrollPane scriptScrollPane;
|
|
53 | 49 |
|
54 | 50 |
public AntScriptPanel() { |
55 | 51 |
super(); |
... | ... | |
59 | 55 |
} |
60 | 56 |
|
61 | 57 |
private void initComponents() { |
62 |
|
|
63 |
scriptEditorPane = new javax.swing.JEditorPane(); |
|
64 |
scriptEditorPane.setEditorKitForContentType("text/xml", |
|
65 |
new XMLEditorKit()); |
|
66 |
scriptEditorPane.setContentType("text/xml"); |
|
67 |
|
|
68 |
scriptScrollPane = new javax.swing.JScrollPane(scriptEditorPane); |
|
69 |
scriptScrollPane |
|
70 |
.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); |
|
71 |
scriptScrollPane.setPreferredSize(new Dimension(250, 300)); |
|
72 |
scriptScrollPane.setMinimumSize(new Dimension(10, 10)); |
|
73 |
|
|
74 |
setLayout(new BorderLayout()); |
|
75 |
|
|
76 |
add(scriptScrollPane, BorderLayout.CENTER); |
|
58 |
scriptEditorPane = new RSyntaxTextArea(); |
|
59 |
scriptEditorPane.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML); |
|
60 |
scriptEditorPane.setCodeFoldingEnabled(true); |
|
61 |
RTextScrollPane scriptScrollPane = new RTextScrollPane(scriptEditorPane); |
|
62 |
add(scriptScrollPane, BorderLayout.CENTER); |
|
63 |
|
|
77 | 64 |
} |
78 | 65 |
|
79 | 66 |
public String getAntScript() { |
Also available in: Unified diff