public class TextEditorWithPreview extends UserDataHolderBase implements FileEditor
| Modifier and Type | Class and Description |
|---|---|
static class |
TextEditorWithPreview.Layout |
Disposable.Parent| Modifier and Type | Field and Description |
|---|---|
static Key<TextEditorWithPreview.Layout> |
DEFAULT_LAYOUT_FOR_FILE |
protected TextEditor |
myEditor |
protected FileEditor |
myPreview |
PROP_MODIFIED, PROP_VALID| Constructor and Description |
|---|
TextEditorWithPreview(TextEditor editor,
FileEditor preview) |
TextEditorWithPreview(TextEditor editor,
FileEditor preview,
java.lang.String editorName) |
TextEditorWithPreview(TextEditor editor,
FileEditor preview,
java.lang.String editorName,
TextEditorWithPreview.Layout defaultLayout) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes specified listener
|
protected ActionGroup |
createLeftToolbarActionGroup() |
protected ActionGroup |
createRightToolbarActionGroup() |
protected ActionToolbar |
createToolbar() |
protected ActionGroup |
createViewActionGroup() |
void |
deselectNotify()
This method is invoked each time when the editor is deselected.
|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
BackgroundEditorHighlighter |
getBackgroundHighlighter() |
javax.swing.JComponent |
getComponent() |
FileEditorLocation |
getCurrentLocation()
The method is optional.
|
TextEditorWithPreview.Layout |
getLayout() |
java.lang.String |
getName() |
javax.swing.JComponent |
getPreferredFocusedComponent()
Returns component to be focused when editor is opened.
|
protected ToggleAction |
getShowEditorAction() |
protected ToggleAction |
getShowEditorAndPreviewAction() |
protected ToggleAction |
getShowPreviewAction() |
protected java.lang.String |
getSplitterProportionKey() |
FileEditorState |
getState(FileEditorStateLevel level) |
StructureViewBuilder |
getStructureViewBuilder() |
TextEditor |
getTextEditor() |
boolean |
isModified() |
boolean |
isValid() |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds specified listener
|
void |
selectNotify()
This method is invoked each time when the editor is selected.
|
void |
setState(FileEditorState state)
Applies given state to the editor.
|
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFile, setStategetUserData, putUserDataprotected final TextEditor myEditor
protected final FileEditor myPreview
public static final Key<TextEditorWithPreview.Layout> DEFAULT_LAYOUT_FOR_FILE
public TextEditorWithPreview(TextEditor editor, FileEditor preview, java.lang.String editorName, TextEditorWithPreview.Layout defaultLayout)
public TextEditorWithPreview(TextEditor editor, FileEditor preview, java.lang.String editorName)
public TextEditorWithPreview(TextEditor editor, FileEditor preview)
public BackgroundEditorHighlighter getBackgroundHighlighter()
getBackgroundHighlighter in interface FileEditornull if no background highlighting activity necessary for this file editor.public FileEditorLocation getCurrentLocation()
FileEditorgetCurrentLocation in interface FileEditorpublic StructureViewBuilder getStructureViewBuilder()
getStructureViewBuilder in interface FileEditorpublic void dispose()
Disposabledispose in interface Disposablepublic void selectNotify()
FileEditorselectNotify in interface FileEditorpublic void deselectNotify()
FileEditordeselectNotify in interface FileEditorpublic javax.swing.JComponent getComponent()
getComponent in interface FileEditornull.public void setState(FileEditorState state)
FileEditorsetState in interface FileEditorstate - cannot be nullprotected java.lang.String getSplitterProportionKey()
public javax.swing.JComponent getPreferredFocusedComponent()
FileEditorgetPreferredFocusedComponent in interface FileEditorpublic java.lang.String getName()
getName in interface FileEditornull.public FileEditorState getState(FileEditorStateLevel level)
getState in interface FileEditornull.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
FileEditoraddPropertyChangeListener in interface FileEditorlistener - to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
FileEditorremovePropertyChangeListener in interface FileEditorlistener - to be removedpublic TextEditor getTextEditor()
public TextEditorWithPreview.Layout getLayout()
public boolean isModified()
isModified in interface FileEditorpublic boolean isValid()
isValid in interface FileEditorprotected ActionToolbar createToolbar()
protected ActionGroup createLeftToolbarActionGroup()
protected ActionGroup createViewActionGroup()
protected ActionGroup createRightToolbarActionGroup()
protected ToggleAction getShowEditorAction()
protected ToggleAction getShowPreviewAction()
protected ToggleAction getShowEditorAndPreviewAction()