|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A cheat sheet viewer.
Clients call CheatSheetViewerFactory.createCheatSheetView()
to create
a cheat sheet viewer instance, and then call the viewer's
createPartControl
method to have it create the viewer's control
under the specified SWT composite. The viewer's control can then be retrieved
using getControl
to arrange layout. The setInput
methods are used to set (or clear) the cheat sheet shown in the viewer,
and can be called either before or after the viewer's controls have been
created and laid out.
The execution states of open cheat sheets are maintained and persisted globally using the cheat sheet id as the key.
This interface is not intended to be implemented by clients.
CheatSheetViewerFactory
Method Summary | |
---|---|
void |
createPartControl(Composite parent)
Creates the SWT controls for this cheat sheet viewer. |
String |
getCheatSheetID()
Returns the id of the cheat sheet showing in this view. |
Control |
getControl()
Returns the primary control associated with this viewer. |
void |
setFocus()
Asks this cheat sheet viewer to take focus. |
void |
setInput(String id)
Sets the cheat sheet viewer to show the cheat sheet with the given id. |
void |
setInput(String id,
String name,
URL url)
Sets the cheat sheet viewer to show the cheat sheet with the given cheat sheet content file. |
Method Detail |
public void createPartControl(Composite parent)
When the parent Composite is disposed, this will automatically dispose the controls added by this viewer (and release any other viewer-specific state).
parent
- the parent controlpublic Control getControl()
null
if this viewer's controls
have not yet been created.public String getCheatSheetID()
null
if the
view is not showing a cheat sheetpublic void setFocus()
public void setInput(String id)
org.eclipse.ui.cheatsheets.cheatSheetContent
extension point. The viewer shows an error message if there
is no cheat sheet with the given id.
The execution states of open cheat sheets are maintained and persisted globally using the cheat sheet id as the key.
id
- the cheat sheet id, or null
to show
no cheat sheet in this viewerpublic void setInput(String id, String name, URL url)
The execution states of open cheat sheets are maintained and persisted globally using the cheat sheet id as the key. This means that each cheat sheet must have a distinct id, including ones opened from URLs.
Use the other setInput
method to clear
the viewer; that is, call setInput(null)
.
id
- the id to give this cheat sheetname
- the name to give this cheat sheeturl
- URL of the cheat sheet content file
IllegalArgumentException
- if the parameters
are null
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.