public abstract class AbstractEditorPanePresenter<T> extends java.lang.Object implements AWTPresenter
AWTPresenter.ChartBasedPresenter, AWTPresenter.GraphBasedPresenter, AWTPresenter.ListBasedPresenter, AWTPresenter.TableBasedPresenter, AWTPresenter.TextBasedPresenter
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
BR |
protected javax.swing.JEditorPane |
contentPane |
protected static java.lang.String |
NONE |
protected Options |
options |
protected T |
presentedData |
protected javax.swing.JScrollPane |
scrollPane |
Modifier | Constructor and Description |
---|---|
protected |
AbstractEditorPanePresenter() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Erases all previously set presentation data so that later calls
to
Presenter.isPresenting() return false until new data
is being set. |
void |
close()
Per default we do not store resources that need to
be released (e.g.
|
protected abstract java.lang.String |
getDefaultText() |
java.lang.Object |
getPresentedData()
Returns the currently presented data or
null if no
data is being presented right now. |
java.awt.Component |
getPresentingComponent()
Returns the
Component this presenter is using to render
its data. |
boolean |
isPresenting()
Returns
true if valid data has been set for presentation
and no call to Presenter.clear() has been performed since then. |
protected static java.lang.String |
noneOrNonempty(java.lang.Object obj) |
protected abstract void |
refresh() |
protected javax.swing.JEditorPane contentPane
protected javax.swing.JScrollPane scrollPane
protected T presentedData
protected Options options
protected static final java.lang.String NONE
protected static final java.lang.String BR
protected abstract java.lang.String getDefaultText()
protected static java.lang.String noneOrNonempty(java.lang.Object obj)
public void clear()
Presenter
Presenter.isPresenting()
return false
until new data
is being set.clear
in interface Presenter
Presenter.clear()
public boolean isPresenting()
Presenter
true
if valid data has been set for presentation
and no call to Presenter.clear()
has been performed since then.isPresenting
in interface Presenter
Presenter.isPresenting()
public java.lang.Object getPresentedData()
Presenter
null
if no
data is being presented right now. In the later case a
previous call to Presenter.isPresenting()
should have returned
false
.getPresentedData
in interface Presenter
Presenter.getPresentedData()
protected abstract void refresh()
public java.awt.Component getPresentingComponent()
AWTPresenter
Component
this presenter is using to render
its data. This method should never return null
regardless
of valid presentation data being set or not. This state is rather
to be displayed by the visual content
of the returned component.getPresentingComponent
in interface AWTPresenter
AWTPresenter.getPresentingComponent()
public void close()
close
in interface Presenter
Presenter.close()