public class EclipseDisplayerFactory extends Object implements DisplayerFactory
EclipseThemeConnector
to decide which
kind of DockableDisplayer
to create. To be more exact: the displayer
depends on the EclipseThemeConnector.TitleBar
-value returned by EclipseThemeConnector.getTitleBarKind(DockStation, Dockable)
.DISPLAYER_EXTENSION, DISPLAYER_EXTENSION_ID
Constructor and Description |
---|
EclipseDisplayerFactory(EclipseTheme theme)
Creates a new displayer factory.
|
Modifier and Type | Method and Description |
---|---|
protected DockableDisplayer |
create(DockStation station,
Dockable dockable,
DockTitle title)
Creates a new
DockableDisplayer for dockable . |
protected BasicDockableDisplayer |
create(DockStation station,
Dockable dockable,
DockTitle title,
boolean border,
EclipseThemeConnector.TitleBar bar)
Creates a new displayer.
|
void |
request(DisplayerRequest request)
Creates a new
DockableDisplayer , this method needs to call
DisplayerRequest.answer(DockableDisplayer) once the new displayer is created.The new displayer will be shown on DisplayerRequest.getParent() , its content
must be DisplayerRequest.getTarget() and DisplayerRequest.getTitle() .If this factory does not want to provide a DockableDisplayer for the given request,
it can just return and not call DisplayerRequest.answer(DockableDisplayer) . |
public EclipseDisplayerFactory(EclipseTheme theme)
theme
- the owner of this factory, not null
public void request(DisplayerRequest request)
DisplayerFactory
DockableDisplayer
, this method needs to call
DisplayerRequest.answer(DockableDisplayer)
once the new displayer is created.DisplayerRequest.getParent()
, its content
must be DisplayerRequest.getTarget()
and DisplayerRequest.getTitle()
.DockableDisplayer
for the given request,
it can just return
and not call DisplayerRequest.answer(DockableDisplayer)
.request
in interface DisplayerFactory
request
- detailed information about who is going to show the displayer, and callback to
set the new displayerprotected DockableDisplayer create(DockStation station, Dockable dockable, DockTitle title)
DockableDisplayer
for dockable
.station
- the station which will show the displayerdockable
- the element which will be shown in the displayertitle
- the title of dockable
null
protected BasicDockableDisplayer create(DockStation station, Dockable dockable, DockTitle title, boolean border, EclipseThemeConnector.TitleBar bar)
station
- the parent of the displayerdockable
- the content, may be null
title
- the title to show, may be null
border
- whether to show a borderbar
- what kind of titlebar the displayer should use