Package org.fife.rsta.ac.java
Class JavaShorthandCompletion
java.lang.Object
org.fife.ui.autocomplete.AbstractCompletion
org.fife.ui.autocomplete.BasicCompletion
org.fife.ui.autocomplete.ShorthandCompletion
org.fife.rsta.ac.java.JavaShorthandCompletion
- All Implemented Interfaces:
Comparable<org.fife.ui.autocomplete.Completion>,JavaSourceCompletion,org.fife.ui.autocomplete.Completion
class JavaShorthandCompletion
extends org.fife.ui.autocomplete.ShorthandCompletion
implements JavaSourceCompletion
A completion for shorthand items that mimics the style seen in Eclipse.
- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaShorthandCompletion(org.fife.ui.autocomplete.CompletionProvider provider, String inputText, String replacementText) Constructor.JavaShorthandCompletion(org.fife.ui.autocomplete.CompletionProvider provider, String inputText, String replacementText, String shortDesc) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetIcon()voidrendererText(Graphics g, int x, int y, boolean selected) Used byJavaCellRendererto render this completion choice.static voidrenderText(Graphics g, String input, String shortDesc, int x, int y, boolean selected) Renders a completion in the style of a short-hand completion.Methods inherited from class org.fife.ui.autocomplete.ShorthandCompletion
getInputText, getSummary, getSummaryBodyMethods inherited from class org.fife.ui.autocomplete.BasicCompletion
getReplacementText, getShortDescription, setShortDescription, setSummary, toStringMethods inherited from class org.fife.ui.autocomplete.AbstractCompletion
compareTo, getAlreadyEntered, getProvider, getRelevance, getToolTipText, setIcon, setRelevanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.fife.ui.autocomplete.Completion
compareTo, getAlreadyEntered, getInputText, getProvider, getRelevance, getReplacementText, getSummary, getToolTipTextMethods inherited from interface org.fife.rsta.ac.java.JavaSourceCompletion
equals
-
Field Details
-
SHORTHAND_COLOR
-
-
Constructor Details
-
JavaShorthandCompletion
JavaShorthandCompletion(org.fife.ui.autocomplete.CompletionProvider provider, String inputText, String replacementText) Constructor.- Parameters:
provider- The completion provider.inputText- The input text.replacementText- The replacement text.
-
JavaShorthandCompletion
JavaShorthandCompletion(org.fife.ui.autocomplete.CompletionProvider provider, String inputText, String replacementText, String shortDesc) Constructor.- Parameters:
provider- The completion provider.inputText- The input text.replacementText- The replacement text.shortDesc- A short description of the completion.
-
-
Method Details
-
getIcon
- Specified by:
getIconin interfaceorg.fife.ui.autocomplete.Completion- Overrides:
getIconin classorg.fife.ui.autocomplete.AbstractCompletion
-
rendererText
Used byJavaCellRendererto render this completion choice.- Specified by:
rendererTextin interfaceJavaSourceCompletion- Parameters:
g- The graphics context to render to.x- The x-offset at which to render.y- The y-offset at which to render.selected- Whether this completion is currently selected/active.
-
renderText
public static void renderText(Graphics g, String input, String shortDesc, int x, int y, boolean selected) Renders a completion in the style of a short-hand completion.- Parameters:
g- The graphics context.input- The text the user enters to display this completion.shortDesc- An optional short description of the completion.x- The x-offset at which to paint.y- The y-offset at which to paint.selected- Whether this completion choice is selected.
-