public class HintManagerImpl extends HintManager
Modifier and Type | Class and Description |
---|---|
static interface |
HintManagerImpl.ActionToIgnore |
HintManager.HideFlags, HintManager.PositionFlags
ABOVE, DEFAULT, DONT_CONSUME_ESCAPE, HIDE_BY_ANY_KEY, HIDE_BY_CARET_MOVE, HIDE_BY_ESCAPE, HIDE_BY_LOOKUP_ITEM_CHANGE, HIDE_BY_MOUSEOVER, HIDE_BY_OTHER_HINT, HIDE_BY_SCROLLING, HIDE_BY_TEXT_CHANGE, HIDE_IF_OUT_OF_EDITOR, LEFT, RIGHT, RIGHT_UNDER, UNDER, UPDATE_BY_SCROLLING
Constructor and Description |
---|
HintManagerImpl() |
Modifier and Type | Method and Description |
---|---|
static void |
adjustEditorHintPosition(LightweightHint hint,
Editor editor,
java.awt.Point p,
short constraint) |
boolean |
canShowQuestionAction(QuestionAction action) |
void |
cleanup() |
static HintHint |
createHintHint(Editor editor,
java.awt.Point p,
LightweightHint hint,
short constraint) |
static HintHint |
createHintHint(Editor editor,
java.awt.Point p,
LightweightHint hint,
short constraint,
boolean createInEditorComponent) |
static javax.swing.JComponent |
getExternalComponent(Editor editor) |
static java.awt.Point |
getHintPosition(LightweightHint hint,
Editor editor,
LogicalPosition pos,
short constraint) |
java.awt.Point |
getHintPosition(LightweightHint hint,
Editor editor,
short constraint) |
static java.awt.Point |
getHintPosition(LightweightHint hint,
Editor editor,
VisualPosition pos,
short constraint) |
static HintManagerImpl |
getInstanceImpl() |
boolean |
hasShownHintsThatWillHideByOtherHint(boolean willShowTooltip) |
void |
hideAllHints() |
boolean |
hideHints(int mask,
boolean onlyOne,
boolean editorChanged) |
boolean |
performCurrentQuestionAction() |
void |
setRequestFocusForNextHint(boolean requestFocus)
Sets whether the next
showXxx call will request the focus to the
newly shown tooltip. |
void |
showEditorHint(LightweightHint hint,
Editor editor,
java.awt.Point p,
int flags,
int timeout,
boolean reviveOnEditorChange) |
void |
showEditorHint(LightweightHint hint,
Editor editor,
java.awt.Point p,
int flags,
int timeout,
boolean reviveOnEditorChange,
HintHint hintInfo) |
void |
showEditorHint(LightweightHint hint,
Editor editor,
java.awt.Point p,
int flags,
int timeout,
boolean reviveOnEditorChange,
short position) |
void |
showEditorHint(LightweightHint hint,
Editor editor,
short constraint,
int flags,
int timeout,
boolean reviveOnEditorChange)
In this method the point to show hint depends on current caret position.
|
void |
showErrorHint(Editor editor,
java.lang.String text) |
void |
showErrorHint(Editor editor,
java.lang.String hintText,
int offset1,
int offset2,
short constraint,
int flags,
int timeout) |
void |
showErrorHint(Editor editor,
java.lang.String text,
short position) |
void |
showHint(javax.swing.JComponent component,
RelativePoint p,
int flags,
int timeout) |
void |
showInformationHint(Editor editor,
javax.swing.JComponent component) |
void |
showInformationHint(Editor editor,
javax.swing.JComponent component,
short position) |
void |
showInformationHint(Editor editor,
java.lang.String text,
javax.swing.event.HyperlinkListener listener) |
void |
showInformationHint(Editor editor,
java.lang.String text,
short position) |
void |
showQuestionHint(Editor editor,
int offset1,
int offset2,
LightweightHint hint,
QuestionAction action,
short constraint) |
void |
showQuestionHint(Editor editor,
java.awt.Point p,
int offset1,
int offset2,
LightweightHint hint,
QuestionAction action,
short constraint) |
void |
showQuestionHint(Editor editor,
java.lang.String hintText,
int offset1,
int offset2,
QuestionAction action) |
protected void |
updateLastEditor(Editor editor) |
static void |
updateLocation(LightweightHint hint,
Editor editor,
java.awt.Point p) |
getInstance, showInformationHint
public boolean canShowQuestionAction(QuestionAction action)
public static HintManagerImpl getInstanceImpl()
public void setRequestFocusForNextHint(boolean requestFocus)
showXxx
call will request the focus to the
newly shown tooltip. Note the flag applies only to the next call, i.e. is
reset to false
after any showXxx
is called.
Note: This method was created to avoid the code churn associated with
creating an overload to every showXxx
method with an additional
boolean requestFocus
parameter
setRequestFocusForNextHint
in class HintManager
public boolean performCurrentQuestionAction()
public boolean hasShownHintsThatWillHideByOtherHint(boolean willShowTooltip)
hasShownHintsThatWillHideByOtherHint
in class HintManager
public void showEditorHint(LightweightHint hint, Editor editor, short constraint, int flags, int timeout, boolean reviveOnEditorChange)
public void showEditorHint(LightweightHint hint, Editor editor, java.awt.Point p, int flags, int timeout, boolean reviveOnEditorChange)
p
- point in layered pane coordinate system.public void showEditorHint(LightweightHint hint, Editor editor, java.awt.Point p, int flags, int timeout, boolean reviveOnEditorChange, short position)
public void showEditorHint(LightweightHint hint, Editor editor, java.awt.Point p, int flags, int timeout, boolean reviveOnEditorChange, HintHint hintInfo)
public void showHint(javax.swing.JComponent component, RelativePoint p, int flags, int timeout)
showHint
in class HintManager
public static void updateLocation(LightweightHint hint, Editor editor, java.awt.Point p)
public static void adjustEditorHintPosition(LightweightHint hint, Editor editor, java.awt.Point p, short constraint)
public void hideAllHints()
hideAllHints
in class HintManager
public void cleanup()
public java.awt.Point getHintPosition(LightweightHint hint, Editor editor, short constraint)
public static java.awt.Point getHintPosition(LightweightHint hint, Editor editor, LogicalPosition pos, short constraint)
public static java.awt.Point getHintPosition(LightweightHint hint, Editor editor, VisualPosition pos, short constraint)
public static javax.swing.JComponent getExternalComponent(Editor editor)
public void showErrorHint(Editor editor, java.lang.String text)
showErrorHint
in class HintManager
public void showErrorHint(Editor editor, java.lang.String text, short position)
showErrorHint
in class HintManager
public void showInformationHint(Editor editor, java.lang.String text, short position)
showInformationHint
in class HintManager
public void showInformationHint(Editor editor, java.lang.String text, javax.swing.event.HyperlinkListener listener)
showInformationHint
in class HintManager
public void showInformationHint(Editor editor, javax.swing.JComponent component)
showInformationHint
in class HintManager
public void showInformationHint(Editor editor, javax.swing.JComponent component, short position)
public void showErrorHint(Editor editor, java.lang.String hintText, int offset1, int offset2, short constraint, int flags, int timeout)
showErrorHint
in class HintManager
public void showQuestionHint(Editor editor, java.lang.String hintText, int offset1, int offset2, QuestionAction action)
showQuestionHint
in class HintManager
public void showQuestionHint(Editor editor, int offset1, int offset2, LightweightHint hint, QuestionAction action, short constraint)
public void showQuestionHint(Editor editor, java.awt.Point p, int offset1, int offset2, LightweightHint hint, QuestionAction action, short constraint)
public static HintHint createHintHint(Editor editor, java.awt.Point p, LightweightHint hint, short constraint)
public static HintHint createHintHint(Editor editor, java.awt.Point p, LightweightHint hint, short constraint, boolean createInEditorComponent)
protected void updateLastEditor(Editor editor)
public boolean hideHints(int mask, boolean onlyOne, boolean editorChanged)
hideHints
in class HintManager