nl.cwi.sen1.gui.plugin
Class EditorPlugin
java.lang.Object
nl.cwi.sen1.gui.plugin.DefaultStudioPlugin
nl.cwi.sen1.gui.plugin.EditorPlugin
- All Implemented Interfaces:
- EditorPluginTif, nl.cwi.sen1.gui.plugin.StudioPlugin
public class EditorPlugin
- extends nl.cwi.sen1.gui.plugin.DefaultStudioPlugin
- implements EditorPluginTif
Method Summary |
void |
addActions(aterm.ATerm editorId,
aterm.ATerm menuList)
|
private void |
addEditorActions(aterm.ATerm editorId,
nl.cwi.sen1.gui.component.StudioComponent comp,
aterm.ATermList actionList,
Editor panel)
|
private void |
addEditorModifiedListener(aterm.ATerm editorId,
Editor panel)
|
private void |
addStudioComponentListener(aterm.ATerm editorId,
SwingEditor panel,
nl.cwi.sen1.gui.component.StudioComponent comp)
|
private void |
cleanupEditor(nl.cwi.sen1.gui.component.StudioComponent comp,
java.lang.String id)
|
void |
clearFocus(aterm.ATerm editorId)
|
private void |
closeEditor(nl.cwi.sen1.gui.component.StudioComponent comp,
java.lang.String id,
int optionType)
|
private void |
createEditMenu(Editor editor,
nl.cwi.sen1.gui.component.StudioComponent comp)
|
private void |
createFileMenu(aterm.ATerm editorId,
nl.cwi.sen1.gui.component.StudioComponent comp)
|
private Editor |
createPanel(aterm.ATerm editorId,
java.lang.String filename)
|
void |
displayMessage(aterm.ATerm editorId,
java.lang.String message)
|
void |
editFile(aterm.ATerm editorId,
java.lang.String filename)
|
private void |
editorDisconnected(aterm.ATerm editorId)
|
void |
editorToFront(aterm.ATerm editorId)
|
void |
getContents(aterm.ATerm editorId)
|
private Editor |
getEditorPanel(aterm.ATerm editorId)
|
java.lang.String |
getName()
|
void |
highlightSlices(aterm.ATerm editorId,
aterm.ATerm slices)
|
void |
initStudioPlugin(nl.cwi.sen1.gui.Studio studio)
|
void |
isModified(aterm.ATerm editorId)
|
void |
killEditor(aterm.ATerm editorId)
|
void |
recAckEvent(aterm.ATerm t0)
|
void |
recTerminate(aterm.ATerm t0)
|
void |
registerTextCategories(aterm.ATerm editorId,
aterm.ATerm categories)
|
void |
rereadContents(aterm.ATerm editorId)
|
void |
setContents(aterm.ATerm editorId,
java.lang.String contents)
|
void |
setCursorAtOffset(aterm.ATerm editorId,
int offset)
|
void |
setEditable(aterm.ATerm editorId,
aterm.ATerm editable)
|
void |
setFocus(aterm.ATerm editorId,
aterm.ATerm focus)
|
void |
setInfo(aterm.ATerm editorId,
java.lang.String info)
|
void |
setSelection(aterm.ATerm editorId,
aterm.ATerm selection)
|
void |
setTooltip(aterm.ATerm editorId,
java.lang.String tooltip)
|
void |
showErrorDialog(Editor panel,
int optionType,
java.lang.String error)
|
void |
showPopup(aterm.ATerm editorId,
aterm.ATerm menuList)
|
private void |
showSaveConfirmDialog(Editor panel,
int optionType)
|
void |
writeContents(aterm.ATerm editorId)
|
Methods inherited from class nl.cwi.sen1.gui.plugin.DefaultStudioPlugin |
addStudioPluginListener, fireStudioPluginClosed, removeStudioPluginListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TOOL_NAME
private static final java.lang.String TOOL_NAME
- See Also:
- Constant Field Values
configFactory
private nl.cwi.sen1.configapi.Factory configFactory
editors
private java.util.Map<java.lang.String,Editor> editors
componentsById
private java.util.Map<java.lang.String,nl.cwi.sen1.gui.component.StudioComponent> componentsById
statusbarsById
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,javax.swing.JComponent>> statusbarsById
studio
private nl.cwi.sen1.gui.Studio studio
bridge
private EditorPluginBridge bridge
popup
private nl.cwi.sen1.util.DefaultPopupImpl popup
EditorPlugin
public EditorPlugin()
isModified
public void isModified(aterm.ATerm editorId)
- Specified by:
isModified
in interface EditorPluginTif
getContents
public void getContents(aterm.ATerm editorId)
- Specified by:
getContents
in interface EditorPluginTif
setContents
public void setContents(aterm.ATerm editorId,
java.lang.String contents)
- Specified by:
setContents
in interface EditorPluginTif
writeContents
public void writeContents(aterm.ATerm editorId)
- Specified by:
writeContents
in interface EditorPluginTif
setFocus
public void setFocus(aterm.ATerm editorId,
aterm.ATerm focus)
- Specified by:
setFocus
in interface EditorPluginTif
setSelection
public void setSelection(aterm.ATerm editorId,
aterm.ATerm selection)
- Specified by:
setSelection
in interface EditorPluginTif
getEditorPanel
private Editor getEditorPanel(aterm.ATerm editorId)
clearFocus
public void clearFocus(aterm.ATerm editorId)
- Specified by:
clearFocus
in interface EditorPluginTif
registerTextCategories
public void registerTextCategories(aterm.ATerm editorId,
aterm.ATerm categories)
- Specified by:
registerTextCategories
in interface EditorPluginTif
addActions
public void addActions(aterm.ATerm editorId,
aterm.ATerm menuList)
- Specified by:
addActions
in interface EditorPluginTif
addEditorActions
private void addEditorActions(aterm.ATerm editorId,
nl.cwi.sen1.gui.component.StudioComponent comp,
aterm.ATermList actionList,
Editor panel)
createFileMenu
private void createFileMenu(aterm.ATerm editorId,
nl.cwi.sen1.gui.component.StudioComponent comp)
createEditMenu
private void createEditMenu(Editor editor,
nl.cwi.sen1.gui.component.StudioComponent comp)
displayMessage
public void displayMessage(aterm.ATerm editorId,
java.lang.String message)
- Specified by:
displayMessage
in interface EditorPluginTif
setEditable
public void setEditable(aterm.ATerm editorId,
aterm.ATerm editable)
- Specified by:
setEditable
in interface EditorPluginTif
killEditor
public void killEditor(aterm.ATerm editorId)
- Specified by:
killEditor
in interface EditorPluginTif
closeEditor
private void closeEditor(nl.cwi.sen1.gui.component.StudioComponent comp,
java.lang.String id,
int optionType)
cleanupEditor
private void cleanupEditor(nl.cwi.sen1.gui.component.StudioComponent comp,
java.lang.String id)
setCursorAtOffset
public void setCursorAtOffset(aterm.ATerm editorId,
int offset)
- Specified by:
setCursorAtOffset
in interface EditorPluginTif
editFile
public void editFile(aterm.ATerm editorId,
java.lang.String filename)
- Specified by:
editFile
in interface EditorPluginTif
setTooltip
public void setTooltip(aterm.ATerm editorId,
java.lang.String tooltip)
- Specified by:
setTooltip
in interface EditorPluginTif
setInfo
public void setInfo(aterm.ATerm editorId,
java.lang.String info)
- Specified by:
setInfo
in interface EditorPluginTif
highlightSlices
public void highlightSlices(aterm.ATerm editorId,
aterm.ATerm slices)
- Specified by:
highlightSlices
in interface EditorPluginTif
editorToFront
public void editorToFront(aterm.ATerm editorId)
- Specified by:
editorToFront
in interface EditorPluginTif
rereadContents
public void rereadContents(aterm.ATerm editorId)
- Specified by:
rereadContents
in interface EditorPluginTif
getName
public java.lang.String getName()
- Specified by:
getName
in interface nl.cwi.sen1.gui.plugin.StudioPlugin
initStudioPlugin
public void initStudioPlugin(nl.cwi.sen1.gui.Studio studio)
- Specified by:
initStudioPlugin
in interface nl.cwi.sen1.gui.plugin.StudioPlugin
createPanel
private Editor createPanel(aterm.ATerm editorId,
java.lang.String filename)
throws java.io.IOException,
FileToBigException
- Throws:
java.io.IOException
FileToBigException
addEditorModifiedListener
private void addEditorModifiedListener(aterm.ATerm editorId,
Editor panel)
editorDisconnected
private void editorDisconnected(aterm.ATerm editorId)
addStudioComponentListener
private void addStudioComponentListener(aterm.ATerm editorId,
SwingEditor panel,
nl.cwi.sen1.gui.component.StudioComponent comp)
showSaveConfirmDialog
private void showSaveConfirmDialog(Editor panel,
int optionType)
throws nl.cwi.sen1.gui.CloseAbortedException
- Throws:
nl.cwi.sen1.gui.CloseAbortedException
recAckEvent
public void recAckEvent(aterm.ATerm t0)
- Specified by:
recAckEvent
in interface EditorPluginTif
recTerminate
public void recTerminate(aterm.ATerm t0)
- Specified by:
recTerminate
in interface EditorPluginTif
showErrorDialog
public void showErrorDialog(Editor panel,
int optionType,
java.lang.String error)
throws nl.cwi.sen1.gui.CloseAbortedException
- Throws:
nl.cwi.sen1.gui.CloseAbortedException
showPopup
public void showPopup(aterm.ATerm editorId,
aterm.ATerm menuList)
- Specified by:
showPopup
in interface EditorPluginTif