Package com.iizigo.prop.tooltip
Class TooltipItem
java.lang.Object
com.iizigo.prop.tooltip.TooltipItem
Tooltip item class used to display a tooltip for a property container implementing the 
ITooltipPropList interface.Flags are composed as F_* bit flag or'ed with the type of:
- 0 = normal text
- 1 = property value (perhaps using formatter)
- 2 = property name getPropName()
- 3 = getCNText()
- 4 = getCNDescription()
- 5 = getCNDescriptionType()
- 14 = Vertical indent with "valueFlags" pixels
- 15 = Horizontal line
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final intFlag for bold font, cannot be combined with italic font.- static final intFlag for Image.- static final intFlag for bold font, cannot be combined with italic font.- static final intFlag for bold font, cannot be combined with italic font.- static final TooltipItemHeader line: BOLD + CNDescription + ':' + CNText.- static final TooltipItemHeader line: BOLD + CNDescription + ':'.- static final TooltipItemHeader line: BOLD + CNDescription + ':' + PropName.- static final TooltipItemThe horizontal separator line.- static final TooltipItemThe vertical indent of 4 pixels.- static final TooltipItemThe vertical indent of 8 pixels.- static final intType: string as getCNDescription().- static final intType: string as getCNDescriptionType().- static final intType: string as getCNText().- static final intType: string as getCNTypeDescriptionType() when available (only for IPropDesigner implementing properties).- static final intType: normal.- static final intType: property name.- static final intType: property value (perhaps using formatter).
- Method SummaryModifier and TypeMethodDescription- int- createLine- (org.eclipse.swt.widgets.Composite parent, PropCnr pc, int verticalIndent) Creates a line with the settings specified.- static TooltipItemConstructs a line with normal fonts of a text prompt and a property name "ID" (Atom).- static TooltipItem- newIntIndex- (String prompt, Atom atomName, String[] array) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- static TooltipItem- newIntIndex- (String prompt, Atom atomName, String[] array, String defaultValue) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- static TooltipItem- newIntIndex- (String prompt, String atomName, String[] array) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- static TooltipItem- newIntIndex- (String prompt, String atomName, String[] array, String defaultValue) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- static TooltipItem- newNormal- (String prompt, ITooltipStringFormatter formatter) Constructs a line with normal fonts of a text prompt and a formatter.- static TooltipItemConstructs a line with normal fonts of a text prompt and a property atom.- static TooltipItem- newNormal- (String prompt, Atom atom, ITooltipStringFormatter formatter) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- static TooltipItemConstructs a line with normal fonts of a text prompt and a property atom.- static TooltipItem- newNormal- (String prompt, String atomName, ITooltipStringFormatter formatter) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- static TooltipItem- newNormalItalicEmpty- (String prompt, Atom atom) Constructs a line with normal fonts of a text prompt and a property atom.- static TooltipItem- newNormalItalicEmpty- (String prompt, String atomName) Constructs a line with normal fonts of a text prompt and a property atom.- static TooltipItem- newNormalItalicEmpty- (String prompt, String atomName, ITooltipStringFormatter formatter) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.
- Field Details- F_IMAGEpublic static final int F_IMAGEFlag for Image.- See Also:
 
- F_BOLDpublic static final int F_BOLDFlag for bold font, cannot be combined with italic font.- See Also:
 
- F_ITALICpublic static final int F_ITALICFlag for bold font, cannot be combined with italic font.- See Also:
 
- F_ITALIC_NONEpublic static final int F_ITALIC_NONEFlag for bold font, cannot be combined with italic font.- See Also:
 
- T_NORMALpublic static final int T_NORMALType: normal.- See Also:
 
- T_PROP_VALUEpublic static final int T_PROP_VALUEType: property value (perhaps using formatter).- See Also:
 
- T_PROP_NAMEpublic static final int T_PROP_NAMEType: property name.- See Also:
 
- T_CN_TEXTpublic static final int T_CN_TEXTType: string as getCNText().- See Also:
 
- T_CN_DESCRIPTIONpublic static final int T_CN_DESCRIPTIONType: string as getCNDescription().- See Also:
 
- T_CN_DESCRIPTION_TYPEpublic static final int T_CN_DESCRIPTION_TYPEType: string as getCNDescriptionType().- See Also:
 
- T_CN_TYPE_DESCRIPTION_TYPEpublic static final int T_CN_TYPE_DESCRIPTION_TYPEType: string as getCNTypeDescriptionType() when available (only for IPropDesigner implementing properties).- See Also:
 
- HEADER_IMAGE_DESCR_TYPEHeader line: BOLD + CNDescription + ':'.
- HEADER_IMAGE_DESCR_TYPE_NAMEHeader line: BOLD + CNDescription + ':' + PropName.
- HEADER_DESCR_TEXTHeader line: BOLD + CNDescription + ':' + CNText.
- SEPARATORThe horizontal separator line.
- SPACER_4PXThe vertical indent of 4 pixels.
- SPACER_8PXThe vertical indent of 8 pixels.
 
- Method Details- newIDConstructs a line with normal fonts of a text prompt and a property name "ID" (Atom).- Parameters:
- prompt- The text prompt.
- Returns:
- A tooltip item.
 
- newNormalConstructs a line with normal fonts of a text prompt and a property atom.- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- Returns:
- A tooltip item.
 
- newNormalConstructs a line with normal fonts of a text prompt and a property atom.- Parameters:
- prompt- The text prompt.
- atom- The atom name.
- Returns:
- A tooltip item.
 
- newNormalConstructs a line with normal fonts of a text prompt and a property atom with a formatter.- Parameters:
- prompt- The text prompt.
- atom- The atom.
- formatter- The formatter of the item.
- Returns:
- A tooltip item.
 
- newNormalpublic static TooltipItem newNormal- (String prompt, String atomName, ITooltipStringFormatter formatter) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- formatter- The formatter of the item.
- Returns:
- A tooltip item.
 
- newIntIndexpublic static TooltipItem newIntIndex- (String prompt, String atomName, String[] array, String defaultValue) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- array- Array containing zero-based values
- defaultValue- String value to show if value is undefined or out of range.
- Returns:
- A tooltip item.
 
- newIntIndexConstructs a line with normal fonts of a text prompt and a property atom with a formatter.- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- array- Array containing zero-based values
- Returns:
- A tooltip item.
 
- newIntIndexpublic static TooltipItem newIntIndex- (String prompt, Atom atomName, String[] array, String defaultValue) Constructs a line with normal fonts of a text prompt and a property atom with a formatter.- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- array- Array containing zero-based values
- defaultValue- String value to show if value is undefined or out of range.
- Returns:
- A tooltip item.
 
- newIntIndexConstructs a line with normal fonts of a text prompt and a property atom with a formatter.- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- array- Array containing zero-based values
- Returns:
- A tooltip item.
 
- newNormalConstructs a line with normal fonts of a text prompt and a formatter. Italic is used for the value if the string is empty, replacing the empty value string with "empty".- Parameters:
- prompt- The text prompt.
- formatter- The formatter of the item.
- Returns:
- A tooltip item.
 
- newNormalItalicEmptyConstructs a line with normal fonts of a text prompt and a property atom. Italic is used for the value if the string is empty, replacing the empty value string with "empty".- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- Returns:
- A tooltip item.
 
- newNormalItalicEmptyConstructs a line with normal fonts of a text prompt and a property atom. Italic is used for the value if the string is empty, replacing the empty value string with "empty".- Parameters:
- prompt- The text prompt.
- atom- The atom name.
- Returns:
- A tooltip item.
 
- newNormalItalicEmptypublic static TooltipItem newNormalItalicEmpty- (String prompt, String atomName, ITooltipStringFormatter formatter) Constructs a line with normal fonts of a text prompt and a property atom with a formatter. Italic is used for the value if the string is empty, replacing the empty value string with "empty".- Parameters:
- prompt- The text prompt.
- atomName- The atom name.
- formatter- The formatter of the item.
- Returns:
- A tooltip item.
 
- createLineCreates a line with the settings specified.- Parameters:
- parent- The parent composite.
- pc- The property container.
- verticalIndent- The vertical indent, negative value indicates separator before.
- Returns:
- The vertical indent for next item, negative value indicates separator after.