public class IlvToolTipManager extends Object implements SwingConstants
Each graphic object contained in the manager associated
with the view can have its own tooltip text, which
must be set using the method
IlvGraphic.setToolTipText(java.lang.String)
.
To enable tooltips in a view, call the static
method registerView(ilog.views.IlvManagerView)
. To disable tooltips,
call unregisterView(ilog.views.IlvManagerView)
.
IlvGraphic
,
IlvManagerView
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Modifier and Type | Method and Description |
---|---|
static String |
createMultiLineToolTipText(String[] lines,
int alignment)
Deprecated.
Beginning with Rogue Wave JViews 8.1, please use the method
IlvSwingUtil.createMultiLineToolTipText(java.lang.String[], int)
instead. |
static int |
getToolTipChangeDelay()
Returns the tooltip change delay.
|
static ToolTipManager |
getToolTipManager()
Returns the underlying Swing tooltip manager.
|
static boolean |
isAdvancedBidiOnForTooltips()
Returns whether advanced bidi in enabled for tooltips.
|
static void |
registerView(IlvManagerView view)
Enables the tooltips in a manager view.
|
static void |
setAdvancedBidiOnForTooltips(boolean enable)
Sets whether advanced bidi in enabled for tooltips.
|
static void |
setToolTipChangeDelay(int delay)
Sets the tooltip change delay.
|
static void |
unregisterView(IlvManagerView view)
Disables the tooltips in a manager view.
|
public static void registerView(IlvManagerView view)
view
- The manager view.IlvGraphic.setToolTipText(java.lang.String).
public static void unregisterView(IlvManagerView view)
view
- The manager view.@Deprecated public static String createMultiLineToolTipText(String[] lines, int alignment)
IlvSwingUtil.createMultiLineToolTipText(java.lang.String[], int)
instead.lines
- The array of text strings. Each string will be formatted as
a separate HTML paragraph. Each string should be valid HTML; if you want
to show a simple line of text, some characters need to be escaped, see
IlvSwingUtil.escapeForHTMLElement(java.lang.String, boolean)
.alignment
- The horizontal alignment of the text. It must be one of
the constants: LEFT
, RIGHT
, or
CENTER
defined in javax.swing.SwingConstants
.public static ToolTipManager getToolTipManager()
ToolTipManager.setInitialDelay(int)
,
ToolTipManager.setDismissDelay(int)
,
ToolTipManager.setReshowDelay(int)
public static void setToolTipChangeDelay(int delay)
If the tooltip change delay is 0, the tooltip is calculated immediately when the mouse pointer is moved. When the tooltip is already visible, it is updated immediately when the object under the mouse changes. This can slow down the mouse movements considerably, when a large number of nonzoomable objects are shown in a manager view.
If the tooltip change delay is larger than 0, the tooltips are not immediately calculated: When a tooltip appears and you move the mouse pointer, the tooltip manager will wait until the tooltip change delay elapsed before hiding the tooltip and calculating and displaying the new tooltip. This allows faster mouse movements and improves the overall performance of the system.
The tooltip change delay has an effect if the manager view is contained
in a IlvJScrollManagerView
or IlvJManagerViewPanel
.
Otherwise, the delay has no effect and the tooltips are always
calculated immediately.
The default delay is 20
milliseconds. Additional delays may
occur if IlvManager.getObject(IlvPoint, IlvManagerView, boolean)
takes a lot of time.
delay
- The delay in milliseconds.getToolTipChangeDelay()
public static int getToolTipChangeDelay()
setToolTipChangeDelay(int)
public static void setAdvancedBidiOnForTooltips(boolean enable)
IlvGraphic.getToolTipBaseTextDirection()
is ignored in this case.public static boolean isAdvancedBidiOnForTooltips()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.