public abstract class EditorPage extends org.eclipse.ui.part.EditorPart implements IEditorPage
Subclasses should override method createPageContent(Composite) to fill the page with content. Note that the page itself can be loaded lazily (on first open); consequently, the call to createPageContent(Composite) can come after the editor has been opened for a while. (In fact, it is possible to open and close the editor and never create the page content. This is because no attempt has been made to show the page.)
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field
|
Constructor and Description |
---|
EditorPage()
Creates an editor page instance.
|
Modifier and Type | Method and Description |
---|---|
void | activate()
The activate method.
|
void | addDropSupport()
For drag-and-drop support.
|
boolean | canLeavePage()
By default, the editor will be allowed to flip the page.
|
protected org.eclipse.swt.widgets.Control | createPageContent(org.eclipse.swt.widgets.Composite parent)
Subclasses should override this method to create content in the form hosted in this page.
|
void | createPartControl(org.eclipse.swt.widgets.Composite parent)
This method creates the editor with scrollbar composite.
|
void | deactivate()
The deactivate method.
|
void | doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Method called when saving editor model.
|
void | doSaveAs()
Method called when performing a save as on editor model.
|
protected void | firePropertyChange(int propertyId)
Fires a property changed event.
|
TelesalesMultiPageEditor | getEditor()
Returns the TelesalesMultiPageEditor that owns this editor page.
|
boolean | getFocusInvalid()
Get the current setting of the focus invalid flag.
|
protected abstract java.lang.String | getHelpContextId()
Subclasses must override this abstract method to return the (F1) help context ID so that their EditorPart Page has infopops.
|
int | getHorizontalScrollIncrement()
Returns the horizontal scroll increment.
|
java.lang.String | getId()
Returns the editor page's ID.
|
int | getIndex()
Returns the index of this page on the multipage editor.
|
protected org.eclipse.swt.widgets.Control | getPageContent()
Returns the page content in the form hosted in this page.
|
org.eclipse.swt.widgets.Control | getPartControl()
Returns the part control for this editor page.
|
java.lang.String | getTitle()
Returns the title of this editor page.
|
org.eclipse.swt.graphics.Image | getTitleImage()
Returns the title image associated with this editor page.
|
int | getVerticalScrollIncrement()
Returns the vertical scroll increment.
|
void | init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
The init method.
|
void | initialize(TelesalesMultiPageEditor editor)
The initialize method that sets the parent multipage editor.
|
boolean | isActive()
Checks whether the page is active by asking the parent editor if this page is the currently active page.
|
boolean | isDirty()
Returns whether or not this pages marked dirty.
|
boolean | isEditor()
Editor pages are not editors.
|
boolean | isSaveAsAllowed()
Answers whether Save As is allowed.
|
void | propertyChanged(java.lang.Object source, int propertyId)
If the property Id is of type PROP_INPUT then refresh() is called on the editor page.
|
void | refresh()
The refresh method.
|
boolean | selectReveal(java.lang.Object object)
Select and reveal method.
|
void | setActive(boolean active)
Set whether this editor pages is active.
|
void | setDirty(boolean dirty)
Indicate if this page needs to be saved.
|
void | setFocus()
Method to set the focus.
|
void | setFocusInvalid(boolean focusInvalid)
Sets a flag to indicate that the focus should be recalculated.
|
void | setId(java.lang.String id)
Method to set the ID of the editor page.
|
void | setIndex(int index)
Method to set the index of the editor page in relation to the other pages of the multipage editor.
|
void | validateFocus()
Checks the focus invalidation and calls setFocus to recalculate the focus for this page.
|
public static final java.lang.String COPYRIGHT
public void addDropSupport()
public boolean canLeavePage()
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Control createPageContent(org.eclipse.swt.widgets.Composite parent)
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
protected abstract java.lang.String getHelpContextId()
public void doSaveAs()
protected void firePropertyChange(int propertyId)
public TelesalesMultiPageEditor getEditor()
public int getHorizontalScrollIncrement()
public java.lang.String getId()
public int getIndex()
public org.eclipse.swt.widgets.Control getPartControl()
protected org.eclipse.swt.widgets.Control getPageContent()
public java.lang.String getTitle()
public org.eclipse.swt.graphics.Image getTitleImage()
public int getVerticalScrollIncrement()
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
public void initialize(TelesalesMultiPageEditor editor)
public boolean isActive()
public boolean isDirty()
public void setDirty(boolean dirty)
public boolean isEditor()
public boolean isSaveAsAllowed()
public void propertyChanged(java.lang.Object source, int propertyId)
public void refresh()
public void activate()
public void deactivate()
public boolean selectReveal(java.lang.Object object)
public void setActive(boolean active)
public void setFocus()
public void setId(java.lang.String id)
public void setIndex(int index)
public void setFocusInvalid(boolean focusInvalid)
public boolean getFocusInvalid()
public void validateFocus()