Package com.iizix.prop.ui
Class KTooltip
java.lang.Object
com.iizix.prop.ui.KTooltip
- All Implemented Interfaces:
- Cloneable
KTooltip is the invariant data holder for a 
TooltipProp.- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final intThe location: ABOVE (=8).- static final intThe location: AFTER (=6).- static final intThe location: BEFORE (=4).- static final intThe location: ABOVE (=2).- final intThe message category if this applies, -1 for none, 0=informational, 1=warning, 2=error.- static final int[]The "none" locations.- final intThe locations as an integer that needs packing up using- getLocations(), zero for none.- final intThe show delay in milliseconds, 400 as default, values 0-9999 are allowed.
- Constructor SummaryConstructorsConstructorDescriptionCreates a tooltip with a default location, category "none" and showDelay 400 ms.Creates a tooltip for a message with a default location and showDelay 400 ms.Creates a tooltip with category "none".Creates a tooltip for a message.Creates a tooltip with specified text and settings from another tooltip instance.
- Method SummaryModifier and TypeMethodDescription- clone()Clones the tooltip.- void- dispose()Disposes of the tooltip when no longer needed.- booleanChecks if two tooltips are equal.- boolean- equalsOmitReferenceRefreshCheck- (KTooltip tooltip) Checks for pure equality between two KTooltip's, excluding KString reference refresh counter checking but including potential original source string.- protected void- finalize()Called when the tooltip is being garbage collected.- int[]Gets the locations.- getText()Gets the text.- toString()Creates a string representation for textual output.
- Field Details- ABOVEpublic static final int ABOVEThe location: ABOVE (=8).- See Also:
 
- BELOWpublic static final int BELOWThe location: ABOVE (=2).- See Also:
 
- BEFOREpublic static final int BEFOREThe location: BEFORE (=4).- See Also:
 
- AFTERpublic static final int AFTERThe location: AFTER (=6).- See Also:
 
- EMPTYpublic static final int[] EMPTYThe "none" locations.
- categorypublic final int categoryThe message category if this applies, -1 for none, 0=informational, 1=warning, 2=error.
- showDelaypublic final int showDelayThe show delay in milliseconds, 400 as default, values 0-9999 are allowed.
- locationspublic final int locationsThe locations as an integer that needs packing up using- getLocations(), zero for none.
 
- Constructor Details- KTooltipCreates a tooltip with a default location, category "none" and showDelay 400 ms.- Parameters:
- text- The KString text for the tooltip.
- Throws:
- NullPointerException- if text is- null.
 
- KTooltipCreates a tooltip with specified text and settings from another tooltip instance.- Parameters:
- text- The KString text for the tooltip.
- prev- The previous instance for settings.
- Throws:
- NullPointerException- if text is- null.
 
- KTooltipCreates a tooltip with category "none".- Parameters:
- text- The KString text for the tooltip.
- showDelay- The show delay in milliseconds (0-9999, -1 for default 400 ms).
- locations- List of locations in priority order, max 4.
- Throws:
- NullPointerException- if text is- null.
 
- KTooltipCreates a tooltip for a message with a default location and showDelay 400 ms.- Parameters:
- text- The KString text for the tooltip.
- category- The message category if this applies, -1 for none, 0=informational, 1=warning, 2=error.
- Throws:
- NullPointerException- if text is- null.
 
- KTooltipCreates a tooltip for a message.- Parameters:
- text- The KString text for the tooltip.
- showDelay- The show delay in milliseconds (0-9999).
- category- The message category if this applies, -1 for none, 0=informational, 1=warning, 2=error.
- locations- List of locations in priority order, max 4.
- Throws:
- NullPointerException- if text is- null.
 
 
- Method Details- getTextGets the text.- Returns:
- The KString text.
 
- cloneClones the tooltip.
- disposepublic void dispose()Disposes of the tooltip when no longer needed. This method is required for KString text.
- finalizeCalled when the tooltip is being garbage collected.- The KString will be disposed if not previously disposed of. 
- getLocationspublic int[] getLocations()Gets the locations.- Returns:
- A location list of integers, maximum 4 with values 2, 4, 6 or 8 in order of importance.
 
- equalsChecks if two tooltips are equal.
- equalsOmitReferenceRefreshCheckChecks for pure equality between two KTooltip's, excluding KString reference refresh counter checking but including potential original source string.- This method is used when comparing values for e.g. save file. - Parameters:
- tooltip- Another KTooltip, perhaps null.
- Returns:
- true if equal, false otherwise.
 
- toStringCreates a string representation for textual output.