|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
javax.swing.DefaultListCellRenderer
org.fife.rsta.ac.java.JavaCellRenderer
public class JavaCellRenderer
Cell renderer for Java auto-completion. This renderer attempts to be
fast due to the possibility of many (100+) auto-completions dynamically
generated for large Java classes. Using Swing's HTML support is simply
too slow (see CompletionCellRenderer).
The color scheme for this renderer mimics that found in Eclipse.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.DefaultListCellRenderer |
|---|
DefaultListCellRenderer.UIResource |
| Nested classes/interfaces inherited from class javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.DefaultListCellRenderer |
|---|
noFocusBorder |
| Fields inherited from class javax.swing.JLabel |
|---|
labelFor |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JavaCellRenderer()
|
|
| Method Summary | |
|---|---|
static Color |
getAlternateBackground()
Returns the background color to use on alternating lines. |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean selected,
boolean hasFocus)
Returns the renderer. |
protected void |
paintComponent(Graphics g)
|
static void |
setAlternateBackground(Color altBG)
Sets the background color to use on alternating lines. |
void |
setSimpleText(boolean simple)
Sets whether to display "simple" text about the completion - just the name, no type information, etc. |
| Methods inherited from class javax.swing.DefaultListCellRenderer |
|---|
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, invalidate, isOpaque, repaint, repaint, repaint, revalidate, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JavaCellRenderer()
| Method Detail |
|---|
public static Color getAlternateBackground()
null,
alternating colors are not used.setAlternateBackground(Color)
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean selected,
boolean hasFocus)
getListCellRendererComponent in interface ListCellRenderergetListCellRendererComponent in class DefaultListCellRendererlist - The list of choices being rendered.value - The Completion being rendered.index - The index into list being rendered.selected - Whether the item is selected.hasFocus - Whether the item has focus.protected void paintComponent(Graphics g)
paintComponent in class JComponentpublic static void setAlternateBackground(Color altBG)
altBG - The new alternate background color. If this is
null, alternating lines will not use different
background colors.getAlternateBackground()public void setSimpleText(boolean simple)
false.
simple - Whether to display "simple" text about the completion.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||