public abstract class DesignerEditor extends UserDataHolderBase implements FileEditor
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
protected DesignerEditorPanel |
myDesignerPanel |
PROP_MODIFIED, PROP_VALID
Constructor and Description |
---|
DesignerEditor(Project project,
VirtualFile file) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes specified listener
|
protected abstract DesignerEditorPanel |
createDesignerPanel(Project project,
Module module,
VirtualFile file) |
void |
deselectNotify()
This method is invoked each time when the editor is deselected.
|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
protected abstract Module |
findModule(Project project,
VirtualFile file) |
javax.swing.JComponent |
getComponent() |
FileEditorLocation |
getCurrentLocation()
The method is optional.
|
DesignerEditorPanel |
getDesignerPanel() |
java.lang.String |
getName() |
javax.swing.JComponent |
getPreferredFocusedComponent()
Returns component to be focused when editor is opened.
|
FileEditorState |
getState(FileEditorStateLevel level) |
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, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackgroundHighlighter, getFile, getStructureViewBuilder, setState
getUserData, putUserData
protected final DesignerEditorPanel myDesignerPanel
public DesignerEditor(Project project, VirtualFile file)
protected abstract Module findModule(Project project, VirtualFile file)
protected abstract DesignerEditorPanel createDesignerPanel(Project project, Module module, VirtualFile file)
public final DesignerEditorPanel getDesignerPanel()
public final javax.swing.JComponent getComponent()
getComponent
in interface FileEditor
null
.public final javax.swing.JComponent getPreferredFocusedComponent()
FileEditor
getPreferredFocusedComponent
in interface FileEditor
public java.lang.String getName()
getName
in interface FileEditor
null
.public void dispose()
Disposable
dispose
in interface Disposable
public void selectNotify()
FileEditor
selectNotify
in interface FileEditor
public void deselectNotify()
FileEditor
deselectNotify
in interface FileEditor
public boolean isValid()
isValid
in interface FileEditor
public boolean isModified()
isModified
in interface FileEditor
public FileEditorState getState(FileEditorStateLevel level)
getState
in interface FileEditor
null
.public void setState(FileEditorState state)
FileEditor
setState
in interface FileEditor
state
- cannot be nullpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
FileEditor
addPropertyChangeListener
in interface FileEditor
listener
- to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
FileEditor
removePropertyChangeListener
in interface FileEditor
listener
- to be removedpublic FileEditorLocation getCurrentLocation()
FileEditor
getCurrentLocation
in interface FileEditor