|
Holger's Java API |
|||||||||
| 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
com.antelmann.util.gui.ToolTipListRenderer
public class ToolTipListRenderer
allows to customize the tool tip based on the selected item and optionally some Format or PatternExtractor; even wrapping existing renderer is supported
| 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 | |
|---|---|
ToolTipListRenderer()
uses the toString() method of the value as a tooltip |
|
ToolTipListRenderer(Format format)
|
|
ToolTipListRenderer(Format format,
ListCellRenderer renderer)
|
|
ToolTipListRenderer(ListCellRenderer renderer)
|
|
ToolTipListRenderer(PatternExtractor<Object,String> pe)
|
|
ToolTipListRenderer(PatternExtractor<Object,String> pe,
ListCellRenderer renderer)
|
|
| Method Summary | |
|---|---|
static JComboBox |
enableToolTip(JComboBox box)
|
static JComboBox |
enableToolTip(JComboBox box,
Format format)
|
static JComboBox |
enableToolTip(JComboBox box,
PatternExtractor<Object,String> pe)
|
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
|
String |
getToolTip(Object value)
|
| 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 ToolTipListRenderer()
public ToolTipListRenderer(Format format)
public ToolTipListRenderer(ListCellRenderer renderer)
public ToolTipListRenderer(Format format,
ListCellRenderer renderer)
public ToolTipListRenderer(PatternExtractor<Object,String> pe)
public ToolTipListRenderer(PatternExtractor<Object,String> pe,
ListCellRenderer renderer)
| Method Detail |
|---|
public static JComboBox enableToolTip(JComboBox box)
public static JComboBox enableToolTip(JComboBox box,
Format format)
public static JComboBox enableToolTip(JComboBox box,
PatternExtractor<Object,String> pe)
public String getToolTip(Object value)
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
getListCellRendererComponent in interface ListCellRenderergetListCellRendererComponent in class DefaultListCellRenderer
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||