public interface Presenter
presenting
other objects. The term present
is used in a rather general manner. This interface only describes
the absolute basic methods required. It is up to extending interfaces
or implementing classes to provide functionality to actually access
the rendering components like Component
or Graphics
instances.AWTPresenter
Modifier and Type | Method and Description |
---|---|
void |
clear()
Erases all previously set presentation data so that later calls
to
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. |
boolean |
isPresenting()
Returns
true if valid data has been set for presentation
and no call to clear() has been performed since then. |
void |
present(java.lang.Object data,
Options options)
Presents the given data object using the
options parameter. |
boolean |
supports(ContentType type)
Checks whether an implementation is capable of presenting
a certain
ContentType instance. |
boolean supports(ContentType type)
ContentType
instance.void present(java.lang.Object data, Options options) throws UnsupportedPresentationDataException
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
clear()
instead!
If this method returns without errors all subsequent calls
to isPresenting()
must return true
until
clear()
is performed.
void clear()
isPresenting()
return false
until new data
is being set.void close()
boolean isPresenting()
true
if valid data has been set for presentation
and no call to clear()
has been performed since then.java.lang.Object getPresentedData()
null
if no
data is being presented right now. In the later case a
previous call to isPresenting()
should have returned
false
.