public interface Editor
Modifier and Type | Method and Description |
---|---|
void |
addEditorListener(EditorListener listener)
Installs a new editor listener.
|
boolean |
canProcess(AbstractDataSource content)
May the given data be processed by this editor?
|
java.awt.Component |
getComponent()
Provides the component visualizing the data source contents.
|
AbstractDataSource |
getContent()
Provides the displayed content.
|
boolean |
getContentValid()
Is the content of this editor OK?
|
SuffixFilter |
getDefaultSuffixFilter()
Provides the default extension filter to be presented on save/save as operations.
|
javax.swing.Icon |
getIcon()
Provides the graphical icon used for display.
|
java.io.InputStream |
getInputStream()
Provides the displayed content as binary stream e.g. to be stored.
|
boolean |
getModified()
Has the resource been edited by the user?
|
boolean |
getReadOnly()
May the resource be edited?
|
SuffixFilter[] |
getSuffixFilters()
Provides the extension filters to be presented on save/save as operations.
|
java.lang.String |
getTitle()
Provides the title used for display.
|
java.lang.String |
getToolTip()
Provides the tooltip used for display.
|
void |
refresh()
Let the editor setup its components properly.
|
void |
removeEditorListener(EditorListener listener)
Removes an editor listener.
|
void |
resetModified()
Resets the modified state.
|
CommonsSwingWorker |
saveContent()
Let the editor write pending data persistently e.g. on application exit.
|
CommonsSwingWorker |
setContent(AbstractDataSource content,
boolean load)
Sets the displayed content.
|
void |
setReadOnly(boolean enable)
Resets the read-only state.
|
void |
setStatusBar(StatusBar statusbar)
Equips the component with an external status bar to be shared.
|
void |
setSuffixFilters(SuffixFilter[] filters,
SuffixFilter defaultfilter)
Sets the extension filters to be presented on save/save as operations.
|
CommonsSwingWorker setContent(AbstractDataSource content, boolean load)
getContentValid
.
content
- The data sourceload
- Load via input stream?null
java.lang.NullPointerException
- If parameter is null
java.lang.IllegalArgumentException
- If parameter is invalidboolean getContentValid()
AbstractDataSource getContent()
null
java.io.InputStream getInputStream()
null
java.awt.Component getComponent()
void setStatusBar(StatusBar statusbar)
statusbar
- The status barjava.lang.NullPointerException
- If a parameter is null
boolean getModified()
void resetModified()
boolean getReadOnly()
void setReadOnly(boolean enable)
enable
- Read-only?java.lang.String getTitle()
java.lang.String getToolTip()
javax.swing.Icon getIcon()
void setSuffixFilters(SuffixFilter[] filters, SuffixFilter defaultfilter)
filters
- The suffix filtersdefaultfilter
- The default filter (optional)SuffixFilter[] getSuffixFilters()
SuffixFilter getDefaultSuffixFilter()
void refresh()
CommonsSwingWorker saveContent()
getContentValid
.
null
boolean canProcess(AbstractDataSource content)
content
- The contentvoid addEditorListener(EditorListener listener)
listener
- The listenervoid removeEditorListener(EditorListener listener)
listener
- The listenerCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.