|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.document.DocumentComponent com.jidesoft.editor.CodeEditorDocumentComponent
public class CodeEditorDocumentComponent
CodeEditorDocumentComponent
is a DocumentComponent
for CodeEditor
.
There is setLanguageName
method that you can use to set the language of the CodeEditor
as long as
the language name is registered in LanguageSpecManager
.
Field Summary |
---|
Fields inherited from class com.jidesoft.document.DocumentComponent |
---|
PROPERTY_BACKGROUND, PROPERTY_CLOSABLE, PROPERTY_COMPONENT, PROPERTY_ENABLED, PROPERTY_FOREGROUND, PROPERTY_ICON, PROPERTY_TITLE, PROPERTY_TOOLTIP |
Constructor Summary | |
---|---|
CodeEditorDocumentComponent(JComponent component,
String name,
String title,
Icon icon)
|
|
CodeEditorDocumentComponent(String name)
|
|
CodeEditorDocumentComponent(String name,
String title)
|
|
CodeEditorDocumentComponent(String name,
String title,
Icon icon)
|
Method Summary | |
---|---|
Object |
clone()
|
protected CodeEditorDocumentComponent |
cloneDocumentComponent()
Clones the DocumentComponent. |
protected CodeEditor |
createCodeEditor()
Creates the code editor. |
protected MarkerArea |
createMarkerArea(CodeEditor editor)
Creates the marker area. |
protected StatusBar |
createStatusBar(CodeEditor editor)
Creates status bar for this CodeEditorDocumentComponent . |
CodeEditor |
getCodeEditor()
|
String |
getLanguageName()
|
protected void |
initComponents()
|
void |
open(ClassLoader classLoader,
String resourceName)
|
void |
open(InputStream in)
Opens an input stream. |
void |
open(InputStream in,
String charsetName)
Opens an input stream using the specified charset. |
void |
open(String fileName)
Opens a file in the code editor. |
void |
open(String fileName,
String charsetName)
Opens a file in the code editor using the specified charset. |
void |
open(SyntaxDocument document)
Opens a SyntaxDocument and sets it to the code editor. |
void |
save(OutputStream out)
Saves the content of an output stream. |
void |
save(OutputStream out,
String charsetName)
Saves the content of an output stream. |
void |
save(String fileName)
Saves the content of the code editor to a file. |
void |
save(String fileName,
String charsetName)
Saves the content of the code editor to a file. |
void |
setCodeEditor(CodeEditor codeEditor)
|
void |
setLanguageName(String languageName)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CodeEditorDocumentComponent(String name)
public CodeEditorDocumentComponent(String name, String title)
public CodeEditorDocumentComponent(String name, String title, Icon icon)
public CodeEditorDocumentComponent(JComponent component, String name, String title, Icon icon)
Method Detail |
---|
protected void initComponents()
protected StatusBar createStatusBar(CodeEditor editor)
CodeEditorDocumentComponent
.
Subclass can override this method to create their own status bar or even null
if they prefer to put the status bar somewhere else.
editor
- the code editor.
protected MarkerArea createMarkerArea(CodeEditor editor)
editor
- the code editor.
public String getLanguageName()
public void setLanguageName(String languageName)
protected CodeEditor createCodeEditor()
public void setCodeEditor(CodeEditor codeEditor)
public CodeEditor getCodeEditor()
public void open(String fileName) throws IOException
fileName
-
IOException
public void open(String fileName, String charsetName) throws IOException
fileName
-
IOException
public void open(ClassLoader classLoader, String resourceName) throws IOException
IOException
public void open(SyntaxDocument document)
document
- public void open(InputStream in) throws IOException
in
-
IOException
public void open(InputStream in, String charsetName) throws IOException
in
- charsetName
-
IOException
public void save(String fileName) throws IOException
fileName
-
IOException
public void save(String fileName, String charsetName) throws IOException
fileName
- charsetName
-
IOException
public void save(OutputStream out) throws IOException
out
-
IOException
public void save(OutputStream out, String charsetName) throws IOException
out
-
IOException
public Object clone() throws CloneNotSupportedException
clone
in interface CloneableDocumentComponent
clone
in class Object
CloneNotSupportedException
protected CodeEditorDocumentComponent cloneDocumentComponent()
return new CodeEditorDocumentComponent(getName(), getTitle(), getIcon());
This method is called by clone()
.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |