public class DocumentPresenter extends java.lang.Object implements AWTPresenter
AWTPresenter.ChartBasedPresenter, AWTPresenter.GraphBasedPresenter, AWTPresenter.ListBasedPresenter, AWTPresenter.TableBasedPresenter, AWTPresenter.TextBasedPresenter
Constructor and Description |
---|
DocumentPresenter() |
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()
Releases all underlying resources.
|
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. |
void |
present(java.lang.Object data,
Options options)
Presents the given data object using the
options parameter. |
protected void |
refresh() |
boolean |
supports(ContentType type)
Checks whether an implementation is capable of presenting
a certain
ContentType instance. |
public boolean supports(ContentType type)
Presenter
ContentType
instance.supports
in interface Presenter
Presenter.supports(de.ims.icarus.util.data.ContentType)
public void present(java.lang.Object data, Options options) throws UnsupportedPresentationDataException
Presenter
Presents
the given data
object using the
options
parameter. As a general rule data
should never be null
. If a program wants to erase
the internal state of a Presenter
it should call
Presenter.clear()
instead!
If this method returns without errors all subsequent calls
to Presenter.isPresenting()
must return true
until
Presenter.clear()
is performed.
present
in interface Presenter
UnsupportedPresentationDataException
Presenter.present(java.lang.Object, de.ims.icarus.util.Options)
protected void refresh()
public void clear()
Presenter
Presenter.isPresenting()
return false
until new data
is being set.clear
in interface Presenter
Presenter.clear()
public void close()
Presenter
close
in interface Presenter
Presenter.close()
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()
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()