Package org.fife.ui.autocomplete
Class ParameterizedCompletionDescriptionToolTip
- java.lang.Object
-
- org.fife.ui.autocomplete.ParameterizedCompletionDescriptionToolTip
-
class ParameterizedCompletionDescriptionToolTip extends java.lang.ObjectA "tool tip" that displays information on the function or method currently being entered.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private AutoCompletionacThe backing AutoCompletion.private javax.swing.JLabeldescLabelThe label that holds the description.private booleanoverflowprivate ParameterizedCompletionpcThe completion being described.private javax.swing.JWindowtooltipThe actual tool tip.
-
Constructor Summary
Constructors Constructor Description ParameterizedCompletionDescriptionToolTip(java.awt.Window owner, ParameterizedCompletionContext context, AutoCompletion ac, ParameterizedCompletion pc)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisVisible()Returns whether this tool tip is visible.voidsetLocationRelativeTo(java.awt.Rectangle r)Sets the location of this tool tip relative to the given rectangle.voidsetVisible(boolean visible)Toggles the visibility of this tool tip.booleanupdateText(int selectedParam)Updates the text in the tool tip to have the current parameter displayed in bold.voidupdateUI()Updates theLookAndFeelof this window and the description window.
-
-
-
Field Detail
-
ac
private AutoCompletion ac
The backing AutoCompletion.
-
tooltip
private javax.swing.JWindow tooltip
The actual tool tip.
-
descLabel
private javax.swing.JLabel descLabel
The label that holds the description.
-
pc
private ParameterizedCompletion pc
The completion being described.
-
overflow
private boolean overflow
-
-
Constructor Detail
-
ParameterizedCompletionDescriptionToolTip
ParameterizedCompletionDescriptionToolTip(java.awt.Window owner, ParameterizedCompletionContext context, AutoCompletion ac, ParameterizedCompletion pc)Constructor.- Parameters:
owner- The parent window.ac- The parent auto-completion.pc- The completion being described.
-
-
Method Detail
-
isVisible
public boolean isVisible()
Returns whether this tool tip is visible.- Returns:
- Whether this tool tip is visible.
- See Also:
setVisible(boolean)
-
setLocationRelativeTo
public void setLocationRelativeTo(java.awt.Rectangle r)
Sets the location of this tool tip relative to the given rectangle.- Parameters:
r- The visual position of the caret (in screen coordinates).
-
setVisible
public void setVisible(boolean visible)
Toggles the visibility of this tool tip.- Parameters:
visible- Whether this tool tip should be visible.- See Also:
isVisible()
-
updateText
public boolean updateText(int selectedParam)
Updates the text in the tool tip to have the current parameter displayed in bold.- Parameters:
selectedParam- The index of the selected parameter.- Returns:
- Whether the text needed to be updated.
-
updateUI
public void updateUI()
Updates theLookAndFeelof this window and the description window.
-
-