|
TPTP 4.6.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IHyadesEditorPart
Interface for the Hyades editor part. Each page may contain an arbitrary SWT control or an IEditorPart.
The Hyades editor part could be considered a "pseudo" editor. Basically it is a mechanism to allow the definition of one or more editors (or, more specifically, IEditorExtensions) for the same resource or for the same resource file extension. When this editor is opened it checks the content of the resource and calculates which would be the appropriate editor extension to be used.
This interface is not intended to be implemented by clients.
| Field Summary | |
|---|---|
static int |
PROP_DIRTY
The property id for isDirty. |
static int |
PROP_INPUT
The property id for getEditorInput. |
static int |
PROP_OBJECT
The property id for getEditorObject. |
static int |
PROP_TITLE
The property id for getTitle and getTitleImage. |
| Method Summary | |
|---|---|
int |
addPage(org.eclipse.swt.widgets.Control control)
Creates and adds the given control as new page to this HyadesEditorPart. |
int |
addPage(org.eclipse.ui.IEditorPart editor,
org.eclipse.ui.IEditorInput input)
Creates and adds a new page containing the given editor to this page container. |
void |
addPropertyListener(org.eclipse.ui.IPropertyListener listener)
Adds a listener for changes to properties of this workbench part. |
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
Adds a listener for selection changes in this selection provider. |
void |
firePropertyChange(int propertyId)
Fires a property changed event. |
int |
getActivePage()
Returns the index of the currently active page, or -1 if there is no active page. |
org.eclipse.swt.widgets.Composite |
getContainer()
Returns the composite control containing this editor part's pages. |
org.eclipse.swt.widgets.Control |
getControl(int pageIndex)
Returns the control for the given page index, or null
if no control has been set for the page. |
org.eclipse.ui.IEditorPart |
getEditor(int pageIndex)
Returns the editor for the given page index. |
IAssociationDescriptor |
getEditorDescriptor()
Returns the editor extension definition that is being used by this instance. |
java.lang.Object |
getEditorObject()
Returns the object that is edited by this editor. |
org.eclipse.ui.IEditorPart |
getEditorPart()
Gets the editor part associated with this instance. |
java.lang.String |
getFileExtension()
Returns the file extension. |
int |
getPageCount()
Returns the number of pages in this editor part. |
org.eclipse.swt.graphics.Image |
getPageImage(int pageIndex)
Returns the image for the page with the given index, or null if
no image has been set for the page. |
java.lang.String |
getPageText(int pageIndex)
Returns the text label for the page with the given index or an empty string if no text label has been set for the page. |
java.lang.String |
getTitle()
Returns the title of this Hyades editor part. |
org.eclipse.swt.graphics.Image |
getTitleImage()
Returns the title image of this workbench part. |
java.lang.String |
getTitleToolTip()
Returns the title tool tip text of this workbench part. |
boolean |
isDirty()
Returns whether the contents of this part have changed since the last save operation. |
boolean |
isReadOnly()
Returns whether the content of this editor is read only. |
void |
removePage(int pageIndex)
Removes the page with the given index from this editor part. |
void |
removePropertyListener(org.eclipse.ui.IPropertyListener listener)
Removes the given property listener from this workbench part. |
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
Removes the given selection change listener from this selection provider. |
void |
setActivePage(int pageIndex)
Sets the currently active page. |
void |
setControl(int pageIndex,
org.eclipse.swt.widgets.Control control)
Sets the control for the given page index. |
void |
setEditorObject(java.lang.Object editorObject)
Sets or clears the object edited by this Hyades editor part. |
void |
setPageImage(int pageIndex,
org.eclipse.swt.graphics.Image image)
Sets the image for the page with the given index, or null
to clear the image for the page. |
void |
setPageText(int pageIndex,
java.lang.String text)
Sets the text label for the page with the given index. |
void |
setTitle(java.lang.String title)
Deprecated. use IHyadesEditorPartExtended#setEditorTitle(String) instead. |
void |
setTitleImage(org.eclipse.swt.graphics.Image titleImage)
Sets or clears the title image of this part. |
void |
setTitleToolTip(java.lang.String text)
Sets or clears the title tool tip text of this part. |
| Methods inherited from interface org.eclipse.hyades.ui.util.IDisposable |
|---|
dispose |
| Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider |
|---|
getSelection, setSelection |
| Field Detail |
|---|
static final int PROP_TITLE
getTitle and getTitleImage.
static final int PROP_DIRTY
isDirty.
static final int PROP_INPUT
getEditorInput.
static final int PROP_OBJECT
getEditorObject.
| Method Detail |
|---|
void addPropertyListener(org.eclipse.ui.IPropertyListener listener)
The properties ids are as follows:
IHyadesEditorPart.PROP_TITLE IHyadesEditorPart.PROP_INPUT IHyadesEditorPart.PROP_DIRTY IHyadesEditorPart.PROP_OBJECT
listener - a property listenervoid removePropertyListener(org.eclipse.ui.IPropertyListener listener)
listener - a property listenervoid addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
addSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderlistener - a selection changed listenervoid removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
removeSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderlistener - a selection changed listenervoid firePropertyChange(int propertyId)
propertyId - the id of the property that changedboolean isDirty()
PROP_DIRTY.
true if the contents have been modified and need
saving, and false if they have not changed since the last
saveboolean isReadOnly()
java.lang.String getFileExtension()
java.lang.String getTitle()
PROP_TITLE.
The title is used to populate the title bar of this part's visual container.
void setTitle(java.lang.String title)
title - the title, or null to clearorg.eclipse.swt.graphics.Image getTitleImage()
PROP_TITLE.
The title image is usually used to populate the title bar of this part's visual container. Since this image is managed by the part itself, callers must not dispose the returned image.
void setTitleImage(org.eclipse.swt.graphics.Image titleImage)
titleImage - the title image, or null to clearjava.lang.String getTitleToolTip()
PROP_TITLE.
The tool tip text is used to populate the title bar of this part's visual container.
void setTitleToolTip(java.lang.String text)
text - the new tool tip textvoid setEditorObject(java.lang.Object editorObject)
editorObject - the object, or null to clearjava.lang.Object getEditorObject()
PROP_OBJECT.
org.eclipse.ui.IEditorPart getEditorPart()
org.eclipse.swt.widgets.Composite getContainer()
addPage(Object), the container
returned by this method should be the parent for any SWT control related to
the object.
Warning: Clients should not assume that the container is any particular subclass of Composite. The actual class used may change in order to improve the look and feel of the editor part. Any code making assumptions on the particular subclass would thus be broken.
null if createPartControl
has not been called yetint addPage(org.eclipse.swt.widgets.Control control)
null, allowing it to be created and set later
using setControl.
control - the control, or null
setControl(int, org.eclipse.swt.widgets.Control)
void setControl(int pageIndex,
org.eclipse.swt.widgets.Control control)
pageIndex - the index of the pagecontrol - the control for the specified page, or null to clear the controlorg.eclipse.swt.widgets.Control getControl(int pageIndex)
null
if no control has been set for the page. The page index must be valid.
pageIndex - the index of the page
null if none has been set
int addPage(org.eclipse.ui.IEditorPart editor,
org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
editor - the nested editorinput - the input for the nested editor
org.eclipse.ui.PartInitException - if a new page could not be createdthe handler for property change events from the nested editororg.eclipse.ui.IEditorPart getEditor(int pageIndex)
pageIndex - the index of the page
null if the
specified page was not created with
addPage(IEditorPart,IEditorInput)void removePage(int pageIndex)
pageIndex - the index of the pageaddPage(org.eclipse.swt.widgets.Control)int getPageCount()
void setActivePage(int pageIndex)
pageIndex - the index of the page to be activated; the index must be
validint getActivePage()
void setPageImage(int pageIndex,
org.eclipse.swt.graphics.Image image)
null
to clear the image for the page. The page index must be valid.
pageIndex - the index of the pageimage - the image, or nullorg.eclipse.swt.graphics.Image getPageImage(int pageIndex)
null if
no image has been set for the page. The page index must be valid.
pageIndex - the index of the page
null if none
void setPageText(int pageIndex,
java.lang.String text)
pageIndex - the index of the pagetext - the text labeljava.lang.String getPageText(int pageIndex)
pageIndex - the index of the page
IAssociationDescriptor getEditorDescriptor()
|
TPTP 4.6.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||