|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.forms.DetailsPart
This managed form part handles the 'details' portion of the 'master/details' block. It has a page book that manages pages of details registered for the current selection.
By default, details part accepts any number of pages. If dynamic page provider is registered, this number may be excessive. To avoid running out of steam (by creating a large number of pages with widgets on each), maximum number of pages can be set to some reasonable value (e.g. 10). When this number is reached, old pages (those created first) will be removed and disposed as new ones are added. If the disposed pages are needed again after that, they will be created again.
Constructor Summary | |
---|---|
DetailsPart(IManagedForm mform,
Composite parent,
int style)
Creates a new details part in the provided form by creating the page book. |
|
DetailsPart(IManagedForm mform,
ScrolledPageBook pageBook)
Creates a details part by wrapping the provided page book. |
Method Summary | |
---|---|
void |
commit(boolean onSave)
Commits the part by committing the current page. |
void |
dispose()
Disposes the part allowing it to release allocated resources. |
IDetailsPage |
getCurrentPage()
Returns the current page visible in the part. |
int |
getPageLimit()
Returns the maximum number of pages that should be maintained in this part. |
void |
initialize(IManagedForm form)
Initializes the part. |
boolean |
isDirty()
Tests if the currently visible page is dirty. |
boolean |
isStale()
Tests if the currently visible page is stale and needs refreshing. |
void |
refresh()
Refreshes the current page. |
void |
registerPage(Object objectClass,
IDetailsPage page)
Registers the details page to be used for all the objects of the provided object class. |
void |
selectionChanged(IFormPart part,
ISelection selection)
Called when the provided part has changed selection state. |
void |
setFocus()
Sets the focus to the currently visible page. |
boolean |
setFormInput(Object input)
Notifies the part that an object has been set as overall form's input. |
void |
setPageLimit(int pageLimit)
Sets the page limit for this part. |
void |
setPageProvider(IDetailsPageProvider provider)
Sets the dynamic page provider. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DetailsPart(IManagedForm mform, ScrolledPageBook pageBook)
mform
- the parent formpageBook
- the page book to wrappublic DetailsPart(IManagedForm mform, Composite parent, int style)
mform
- the parent formparent
- the composite to create the page book instyle
- the style for the page bookMethod Detail |
public void registerPage(Object objectClass, IDetailsPage page)
objectClass
- an object of type 'java.lang.Class' to be used
as a key for the provided pagepage
- the page to show for objects of the provided object classpublic void setPageProvider(IDetailsPageProvider provider)
provider
- the provider to usepublic void commit(boolean onSave)
commit
in interface IFormPart
onSave
- true
if commit is requested as a result
of the 'save' action, false
otherwise.public IDetailsPage getCurrentPage()
public void dispose()
IFormPart
dispose
in interface IFormPart
public void initialize(IManagedForm form)
IFormPart
initialize
in interface IFormPart
form
- the managed form that manages the partpublic boolean isDirty()
isDirty
in interface IFormPart
true
if the page is dirty, false
otherwise.public boolean isStale()
isStale
in interface IFormPart
true
if the page is stale, false
otherwise.public void refresh()
refresh
in interface IFormPart
public void setFocus()
setFocus
in interface IFormPart
public boolean setFormInput(Object input)
IFormPart
setFormInput
in interface IFormPart
true
if the part has selected and revealed
the input object, false
otherwise.public void selectionChanged(IFormPart part, ISelection selection)
IPartSelectionListener
selectionChanged
in interface IPartSelectionListener
part
- the selection sourceselection
- the new selectionpublic int getPageLimit()
public void setPageLimit(int pageLimit)
pageLimit
- the maximum number of pages that
should be maintained in this part.getPageLimit()
|
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.