public class DataListPresenter<T> extends PropertyChangeSource implements ListPresenter, AnnotationController
Modifier and Type | Class and Description |
---|---|
protected class |
DataListPresenter.Handler |
protected class |
DataListPresenter.PrototypeSearchJob |
AWTPresenter.ChartBasedPresenter, AWTPresenter.GraphBasedPresenter, AWTPresenter.ListBasedPresenter, AWTPresenter.TableBasedPresenter, AWTPresenter.TextBasedPresenter
Modifier and Type | Field and Description |
---|---|
protected AnnotationControl |
annotationControl |
protected AnnotationManager |
annotationManager |
protected ConsumerMenu |
consumerMenu |
protected javax.swing.JPanel |
contentPanel |
protected DataList<T> |
dataList |
protected DataListModel<T> |
dataListModel |
protected java.lang.String |
dummyEntry |
protected Filter |
filter |
protected javax.swing.JButton |
filterEditButton |
protected FilteredListModel<T> |
filteredModel |
protected java.util.Map<org.java.plugin.registry.Extension,Filter> |
filterInstances |
protected javax.swing.JComboBox<java.lang.Object> |
filterSelect |
protected DataListPresenter.Handler |
handler |
protected DynamicWidthList<T> |
list |
protected javax.swing.ListSelectionModel |
listSelectionModel |
protected NavigationControl |
navigationControl |
protected javax.swing.JToggleButton |
outlineToggleButton |
protected javax.swing.JPopupMenu |
popupMenu |
protected DataListPresenter.PrototypeSearchJob |
prototypeSearchJob |
protected javax.swing.JTextArea |
textArea |
protected java.lang.String |
title |
protected javax.swing.JToggleButton |
widthToggleButton |
changeSupport
ANNOTATION_MANAGER_PROPERTY
Constructor and Description |
---|
DataListPresenter() |
Modifier and Type | Method and Description |
---|---|
protected void |
cancelPrototypeComputation() |
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.
|
protected void |
computeListCellPrototype() |
protected AnnotationControl |
createAnnotationControl() |
protected ConsumerMenu |
createConsumerMenu() |
protected javax.swing.JPanel |
createContentPanel() |
protected DynamicWidthList<T> |
createList() |
protected DataListModel<T> |
createListModel() |
protected NavigationControl |
createNavigationControl() |
protected javax.swing.JPopupMenu |
createPopupMenu() |
protected DataListPresenter.PrototypeSearchJob |
createPrototypeSearchJob() |
protected void |
displayData(DataList<T> data,
Options options) |
AnnotationManager |
getAnnotationManager() |
ContentType |
getContentType()
Returns the content type encapsulating the elements
in the internal list or
null if this presenter
is unaware of that content type. |
DataListModel<T> |
getDataListModel() |
protected int |
getEstimatedWidth(java.awt.FontMetrics fm,
T item) |
Filter |
getFilter() |
protected Filter |
getFilter(org.java.plugin.registry.Extension extension) |
protected javax.swing.JButton |
getFilterEditButton() |
FilteredListModel<T> |
getFilteredListModel() |
protected javax.swing.JComboBox<java.lang.Object> |
getFilterSelect() |
protected DataListPresenter.Handler |
getHandler() |
javax.swing.ListModel<T> |
getListModel() |
protected javax.swing.JToggleButton |
getOutlineToggleButton() |
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. |
javax.swing.ListSelectionModel |
getSelectionModel() |
protected javax.swing.JToggleButton |
getWidthToggleButton() |
boolean |
isPresenting()
Returns
true if valid data has been set for presentation
and no call to Presenter.clear() has been performed since then. |
protected java.lang.Object |
leftNavigationContent() |
protected void |
listCellPrototypeComputationCompleted(T prototype) |
protected void |
preparePopupMenu() |
void |
present(java.lang.Object data,
Options options)
Presents the given data object using the
options parameter. |
protected void |
refresh() |
protected void |
refreshFilterOptions() |
protected void |
refreshTextOutline() |
protected void |
refreshUtilities() |
protected java.lang.Object |
rightNavigationContent() |
void |
setAnnotationManager(AnnotationManager annotationManager) |
protected void |
setFilter(Filter filter) |
protected void |
showPopup(java.awt.event.MouseEvent trigger) |
boolean |
supports(ContentType type)
Checks whether an implementation is capable of presenting
a certain
ContentType instance. |
boolean |
update() |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
protected DataListModel<T> dataListModel
protected AnnotationManager annotationManager
protected AnnotationControl annotationControl
protected DynamicWidthList<T> list
protected javax.swing.ListSelectionModel listSelectionModel
protected Filter filter
protected FilteredListModel<T> filteredModel
protected java.lang.String title
protected javax.swing.JPanel contentPanel
protected javax.swing.JComboBox<java.lang.Object> filterSelect
protected javax.swing.JButton filterEditButton
protected javax.swing.JToggleButton outlineToggleButton
protected javax.swing.JToggleButton widthToggleButton
protected java.util.Map<org.java.plugin.registry.Extension,Filter> filterInstances
protected NavigationControl navigationControl
protected ConsumerMenu consumerMenu
protected javax.swing.JPopupMenu popupMenu
protected javax.swing.JTextArea textArea
protected final java.lang.String dummyEntry
protected DataListPresenter.Handler handler
protected DataListPresenter.PrototypeSearchJob prototypeSearchJob
protected javax.swing.JPanel createContentPanel()
protected DynamicWidthList<T> createList()
protected AnnotationControl createAnnotationControl()
protected NavigationControl createNavigationControl()
protected java.lang.Object leftNavigationContent()
protected java.lang.Object rightNavigationContent()
protected javax.swing.JButton getFilterEditButton()
protected javax.swing.JToggleButton getOutlineToggleButton()
protected javax.swing.JToggleButton getWidthToggleButton()
protected javax.swing.JComboBox<java.lang.Object> getFilterSelect()
protected DataListPresenter.Handler getHandler()
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 boolean supports(ContentType type)
Presenter
ContentType
instance.supports
in interface Presenter
Presenter.supports(de.ims.icarus.util.data.ContentType)
protected void refresh()
protected void refreshUtilities()
protected DataListModel<T> createListModel()
public DataListModel<T> getDataListModel()
public FilteredListModel<T> getFilteredListModel()
protected void refreshFilterOptions()
protected void refreshTextOutline()
protected void setFilter(Filter filter)
public Filter getFilter()
protected DataListPresenter.PrototypeSearchJob createPrototypeSearchJob()
protected void computeListCellPrototype()
protected void cancelPrototypeComputation()
protected void listCellPrototypeComputationCompleted(T prototype)
public AnnotationManager getAnnotationManager()
getAnnotationManager
in interface AnnotationController
AnnotationController.getAnnotationManager()
public void setAnnotationManager(AnnotationManager annotationManager)
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)
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 javax.swing.ListModel<T> getListModel()
getListModel
in interface ListPresenter
ListPresenter.getListModel()
public javax.swing.ListSelectionModel getSelectionModel()
getSelectionModel
in interface ListPresenter
ListPresenter.getSelectionModel()
public ContentType getContentType()
ListPresenter
null
if this presenter
is unaware of that content type.getContentType
in interface ListPresenter
ListPresenter.getContentType()
public boolean update()
update
in interface Updatable
Updatable.update()
protected int getEstimatedWidth(java.awt.FontMetrics fm, T item)
protected Filter getFilter(org.java.plugin.registry.Extension extension)
protected javax.swing.JPopupMenu createPopupMenu()
protected ConsumerMenu createConsumerMenu()
protected void preparePopupMenu()
protected void showPopup(java.awt.event.MouseEvent trigger)