Package org.eclipse.team.ui.history
Class HistoryPage
- java.lang.Object
-
- org.eclipse.ui.part.Page
-
- org.eclipse.team.ui.history.HistoryPage
-
- All Implemented Interfaces:
IAdaptable,IHistoryPage,IPage,IPageBookViewPage
public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptable
Abstract HistoryPage class that keeps track of the history page site.Clients may subclass this class.
- Since:
- 3.2
- See Also:
IHistoryPage
-
-
Field Summary
-
Fields inherited from interface org.eclipse.team.ui.history.IHistoryPage
P_DESCRIPTION, P_NAME
-
-
Constructor Summary
Constructors Constructor Description HistoryPage()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(IPropertyChangeListener listener)Adds a listener for changes to properties of this page.protected voidfirePropertyChange(Object source, String property, Object oldValue, Object newValue)Notify all listeners that the given property has changed.IHistoryPageSitegetHistoryPageSite()Returns theIHistoryPageSiteset for this page.IHistoryViewgetHistoryView()Returns theIHistoryViewinstance that contains this history page or null if the history view instance cannot be determined.ObjectgetInput()Returns the object whose history is currently being displayed in the history page.abstract booleaninputSet()Called by HistoryPage aftersetInput(Object).voidremovePropertyChangeListener(IPropertyChangeListener listener)Removes the given property listener from this page.voidsetHistoryView(IHistoryView historyView)booleansetInput(Object object)Fetches and populates the history page for the given Object.voidsetSite(IHistoryPageSite site)Set the site for the page - this needs to be replaced with a properIHistoryPageSitein order to allow history pages to be displayed in both views and dialogs.-
Methods inherited from class org.eclipse.ui.part.Page
createControl, dispose, getControl, getSite, init, makeContributions, setActionBars, setFocus
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Methods inherited from interface org.eclipse.team.ui.history.IHistoryPage
dispose, getDescription, getName, isValidInput, refresh
-
-
-
-
Method Detail
-
setSite
public void setSite(IHistoryPageSite site)
Description copied from interface:IHistoryPageSet the site for the page - this needs to be replaced with a properIHistoryPageSitein order to allow history pages to be displayed in both views and dialogs.- Specified by:
setSitein interfaceIHistoryPage- Parameters:
site- the history page site
-
getHistoryPageSite
public IHistoryPageSite getHistoryPageSite()
Description copied from interface:IHistoryPageReturns theIHistoryPageSiteset for this page.- Specified by:
getHistoryPageSitein interfaceIHistoryPage- Returns:
- the history page site for this page
-
getInput
public Object getInput()
Description copied from interface:IHistoryPageReturns the object whose history is currently being displayed in the history page.- Specified by:
getInputin interfaceIHistoryPage- Returns:
- object the object being displayed in the history page or
nullif no input has been set;
-
setInput
public boolean setInput(Object object)
Description copied from interface:IHistoryPageFetches and populates the history page for the given Object. Clients should provide an implementation for their individual pages.- Specified by:
setInputin interfaceIHistoryPage- Parameters:
object- the object for which history is being requested for- Returns:
- true if the page was able to display the history for the object, false otherwise
-
inputSet
public abstract boolean inputSet()
Called by HistoryPage aftersetInput(Object). Clients can gain access to the input by usinggetInput().- Returns:
trueif the page was able to display the contents,falseotherwise
-
setHistoryView
public void setHistoryView(IHistoryView historyView)
-
getHistoryView
public IHistoryView getHistoryView()
Description copied from interface:IHistoryPageReturns theIHistoryViewinstance that contains this history page or null if the history view instance cannot be determined.- Specified by:
getHistoryViewin interfaceIHistoryPage- Returns:
- IHistoryView the history view that contains this history page or null if the history view instance cannot be determined.
-
addPropertyChangeListener
public void addPropertyChangeListener(IPropertyChangeListener listener)
Description copied from interface:IHistoryPageAdds a listener for changes to properties of this page. Has no effect if an identical listener is already registered.The changes supported by the page are as follows:
P_NAME- indicates the name of the page has changedP_DESCRIPTION- indicates the description of the page has changed
Clients may define additional properties as required.
- Specified by:
addPropertyChangeListenerin interfaceIHistoryPage- Parameters:
listener- a property change listener
-
removePropertyChangeListener
public void removePropertyChangeListener(IPropertyChangeListener listener)
Description copied from interface:IHistoryPageRemoves the given property listener from this page. Has no effect if an identical listener is not already registered.- Specified by:
removePropertyChangeListenerin interfaceIHistoryPage- Parameters:
listener- a property listener
-
firePropertyChange
protected void firePropertyChange(Object source, String property, Object oldValue, Object newValue)
Notify all listeners that the given property has changed.- Parameters:
source- the object on which a property has changedproperty- identifier of the property that has changedoldValue- the old value of the property, ornullnewValue- the new value of the property, ornull- Since:
- 3.3
-
-