TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.hyades.ui.provisional.context
Interface IContextLabelFormatProvider

All Known Implementing Classes:
CompileUnitBaseTimeFormatter, CompileUnitFormatter, FunctionBaseTimeFormatter, MethodUnitFormatter, NameSpaceBaseTimeFormatter, NameSpaceFormatter, ObjectCollectedFormatter, ShowCompileUnitFormatter, ShowFunctionFormatter, ShowNameSpaceFormatter

public interface IContextLabelFormatProvider


Field Summary
static int MODE_COLUMN_CONTENT
          The mode associated with the column cell content in the statistical views.
static int MODE_COLUMN_HEADER
          The mode associated with the column header names in the statistical views.
static int MODE_VIEW_ACTION
          The mode associated with an action.
static int MODE_VIEW_FILTER
          The mode associated with view filter strings.
 
Method Summary
 java.lang.String convertDisplayStringToModelValue(java.lang.String text)
          Converts the given display text to be displayed/entered in the filter dialog to the model value in the context associated with this IContextLabelFormatProvider.
 java.lang.String convertModelValueToDisplayString(java.lang.String text)
          Converts the given model value text to the displayed text in the filter dialog in the context associated with this IContextLabelFormatProvider.
 java.lang.String getDisplayDescription()
          Returns the display description if a display description is shown for the attribute.
 org.eclipse.swt.graphics.Image getDisplayImageByElement(java.lang.Object value, java.lang.Object element, int mode)
          This returns the display image given the value to be displayed, the element this String is associated with, and the mode to determine which image to show.
 java.lang.String getDisplayStringFromElement(java.lang.Object value, java.lang.Object element, int mode)
          This returns the display string given the value to be displayed, the element this String is associated with, and the mode to determine which String to show.
 java.lang.String getDisplayToolTip()
          Returns the display tool tip if a tool tip is shown for the attribute.
 int[] getSupportModes()
          Returns the supported modes of this IContextLabelFormatProvider.
 

Field Detail

MODE_COLUMN_HEADER

public static final int MODE_COLUMN_HEADER
The mode associated with the column header names in the statistical views.

See Also:
Constant Field Values

MODE_COLUMN_CONTENT

public static final int MODE_COLUMN_CONTENT
The mode associated with the column cell content in the statistical views.

See Also:
Constant Field Values

MODE_VIEW_ACTION

public static final int MODE_VIEW_ACTION
The mode associated with an action.

See Also:
Constant Field Values

MODE_VIEW_FILTER

public static final int MODE_VIEW_FILTER
The mode associated with view filter strings.

See Also:
Constant Field Values
Method Detail

getDisplayStringFromElement

public java.lang.String getDisplayStringFromElement(java.lang.Object value,
                                                    java.lang.Object element,
                                                    int mode)
This returns the display string given the value to be displayed, the element this String is associated with, and the mode to determine which String to show.

Parameters:
value - the value to be displayed
element - the element associated with this String
mode - the mode to determine which String to display
Returns:
String the display String

getDisplayImageByElement

public org.eclipse.swt.graphics.Image getDisplayImageByElement(java.lang.Object value,
                                                               java.lang.Object element,
                                                               int mode)
This returns the display image given the value to be displayed, the element this String is associated with, and the mode to determine which image to show.

Parameters:
value - the value to be displayed
element - the element associated with this String
mode - the mode to determine which String to display
Returns:
Image the Image associated with this element

getDisplayDescription

public java.lang.String getDisplayDescription()
Returns the display description if a display description is shown for the attribute.


getDisplayToolTip

public java.lang.String getDisplayToolTip()
Returns the display tool tip if a tool tip is shown for the attribute.


convertModelValueToDisplayString

public java.lang.String convertModelValueToDisplayString(java.lang.String text)
Converts the given model value text to the displayed text in the filter dialog in the context associated with this IContextLabelFormatProvider. This does not apply to the Object Collected filter attribute.

Parameters:
text - String the text to be converted
Returns:
the converted text

convertDisplayStringToModelValue

public java.lang.String convertDisplayStringToModelValue(java.lang.String text)
Converts the given display text to be displayed/entered in the filter dialog to the model value in the context associated with this IContextLabelFormatProvider. This does not apply to the Object Collected filter attribute.

Parameters:
text - String the text to be converted
Returns:
the converted text

getSupportModes

public int[] getSupportModes()
Returns the supported modes of this IContextLabelFormatProvider. If a mode is requested that is not supported the base provider will be used.

Returns:
int[] an array of integers, the modes applicable.

TPTP 4.2.0 Platform Project
Public API Specification