com.ibm.lpex.alef.contentassist
Class ContextInformation
java.lang.Object
|
+--com.ibm.lpex.alef.contentassist.ContextInformation
- All Implemented Interfaces:
- IContextInformation
- public final class ContextInformation
- extends java.lang.Object
- implements IContextInformation
A default implementation of the IContextInformation
interface.
Constructor Summary |
ContextInformation(org.eclipse.swt.graphics.Image image,
java.lang.String contextDisplayString,
java.lang.String informationDisplayString)
Creates a new context information with an image. |
ContextInformation(java.lang.String contextDisplayString,
java.lang.String informationDisplayString)
Creates a new context information without an image. |
Method Summary |
boolean |
equals(java.lang.Object object)
Compare the given object with this receiver. |
java.lang.String |
getContextDisplayString()
Return the string to be displayed in the list of contexts. |
org.eclipse.swt.graphics.Image |
getImage()
Return the image for this context information. |
java.lang.String |
getInformationDisplayString()
Return the string to be displayed in the tooltip like information popup. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextInformation
public ContextInformation(java.lang.String contextDisplayString,
java.lang.String informationDisplayString)
- Creates a new context information without an image.
- Parameters:
contextDisplayString
- the string to be used when presenting the contextinformationDisplayString
- the string to be displayed when presenting the context information
ContextInformation
public ContextInformation(org.eclipse.swt.graphics.Image image,
java.lang.String contextDisplayString,
java.lang.String informationDisplayString)
- Creates a new context information with an image.
- Parameters:
image
- the image to display when presenting the context informationcontextDisplayString
- the string to be used when presenting the contextinformationDisplayString
- the string to be displayed when presenting the context information,
may not be null
equals
public boolean equals(java.lang.Object object)
- Description copied from interface:
IContextInformation
- Compare the given object with this receiver. Two context informations are
equal if there information display strings and their context display strings
are equal.
- Specified by:
equals
in interface IContextInformation
- Overrides:
equals
in class java.lang.Object
- Following copied from interface:
com.ibm.lpex.alef.contentassist.IContextInformation
- See Also:
Object.equals(java.lang.Object)
getInformationDisplayString
public java.lang.String getInformationDisplayString()
- Description copied from interface:
IContextInformation
- Return the string to be displayed in the tooltip like information popup.
- Specified by:
getInformationDisplayString
in interface IContextInformation
- Following copied from interface:
com.ibm.lpex.alef.contentassist.IContextInformation
- Returns:
- the string to be displayed
getImage
public org.eclipse.swt.graphics.Image getImage()
- Description copied from interface:
IContextInformation
- Return the image for this context information.
The image will be shown to the left of the display string.
- Specified by:
getImage
in interface IContextInformation
- Following copied from interface:
com.ibm.lpex.alef.contentassist.IContextInformation
- Returns:
- the image to be shown or
null
if no image is desired
getContextDisplayString
public java.lang.String getContextDisplayString()
- Description copied from interface:
IContextInformation
- Return the string to be displayed in the list of contexts.
This method is used to supply a unique presentation for
situations where the context is ambiguous. These strings are
used to allow the user to select the specific context.
- Specified by:
getContextDisplayString
in interface IContextInformation
- Following copied from interface:
com.ibm.lpex.alef.contentassist.IContextInformation
- Returns:
- the string to be displayed for the context