public class DefaultToolTipManager extends Object implements ToolTipManager
A default implementation of the ToolTipManager interface.
This class provides fully functional implementations for all methods defined
by the ToolTipManager interface. An instance is initialized with a
reference to a ComponentBuilderData object. From this object the
WidgetHandler objects associated with the components to manipulate
are obtained. The instance also maintains data about the tool tips (both the
static and the dynamic ones) of all components managed by the associated
ComponentBuilderData object.
Implementation note: This class is not thread-safe. It must only be accessed
from the event dispatch thread. It can only be associated with a single
ComponentBuilderData object.
| Constructor and Description |
|---|
DefaultToolTipManager(ComponentBuilderData compData)
Creates a new instance of
DefaultToolTipManager and initializes
it with the given ComponentBuilderData object. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
combineTips(String stdTip,
String addTip)
Creates a combined tool tip from the standard tool tip and the additional
tool tip.
|
String |
getAdditionalTipSeparator()
Returns the separator between the standard and the additional tool tip.
|
String |
getAdditionalToolTip(Object component)
Queries the additional tool tip for the specified component.
|
String |
getAdditionalToolTip(String componentName)
Returns the additional tool tip for the component with the given name.
|
ComponentBuilderData |
getComponentBuilderData()
Returns the associated
ComponentBuilderData. |
String |
getToolTip(Object component)
Queries the standard tool tip for the specified component.
|
String |
getToolTip(String componentName)
Returns the standard tool tip for the component with the given name.
|
void |
setAdditionalTipSeparator(String additionalTipSeparator)
Sets the separator between the standard and the additional tool tip.
|
void |
setAdditionalToolTip(Object component,
String tip)
Sets the additional tool tip for the specified component.
|
void |
setAdditionalToolTip(String componentName,
String tip)
Sets the additional tool tip for the component with the given name.
|
void |
setToolTip(Object component,
String tip)
Sets the tool tip for the specified component.
|
void |
setToolTip(String componentName,
String tip)
Sets the standard tool tip for the component with the given name.
|
public DefaultToolTipManager(ComponentBuilderData compData)
DefaultToolTipManager and initializes
it with the given ComponentBuilderData object.compData - the ComponentBuilderData object (must not be
null)IllegalArgumentException - if the ComponentBuilderData
object is nullpublic String getAdditionalTipSeparator()
public void setAdditionalTipSeparator(String additionalTipSeparator)
additionalTipSeparator - the tool tip separatorpublic final ComponentBuilderData getComponentBuilderData()
ComponentBuilderData.ComponentBuilderDatapublic String getAdditionalToolTip(Object component)
getAdditionalToolTip in interface ToolTipManagercomponent - the component in questionpublic String getAdditionalToolTip(String componentName)
getAdditionalToolTip in interface ToolTipManagercomponentName - the name of the componentGUIRuntimeException - if the name cannot be resolvedpublic String getToolTip(Object component)
getToolTip in interface ToolTipManagercomponent - the component in questionpublic String getToolTip(String componentName)
getToolTip in interface ToolTipManagercomponentName - the name of the componentGUIRuntimeException - if the name cannot be resolvedpublic void setAdditionalToolTip(Object component, String tip)
setAdditionalToolTip in interface ToolTipManagercomponent - the componenttip - the new additional tool tippublic void setAdditionalToolTip(String componentName, String tip)
setAdditionalToolTip in interface ToolTipManagercomponentName - the name of the componenttip - the new additional tool tipGUIRuntimeException - if the component name cannot be resolvedpublic void setToolTip(Object component, String tip)
setToolTip in interface ToolTipManagercomponent - the componenttip - the new tool tippublic void setToolTip(String componentName, String tip)
setToolTip in interface ToolTipManagercomponentName - the name of the componenttip - the new standard tool tipGUIRuntimeException - if the component name cannot be resolvedprotected String combineTips(String stdTip, String addTip)
setAdditionalTipSeparator(String)
method.stdTip - the standard tool tipaddTip - the additional tool tipCopyright © 2016 The JGUIraffe Team. All rights reserved.