|
Groovy Documentation | |||||||
| 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
com.blogofbug.swing.components.JCarouselMenu.CarouselListCellRenderer
protected class JCarouselMenu.CarouselListCellRenderer extends JLabel
ListCellRenderer for the Carousel uses an image border to draw a nice border around the menu item when it is selected
| Field Summary | |
|---|---|
ImageBorder |
imageBorder
|
| Fields inherited from class JLabel | |
|---|---|
| CENTER, TOP, LEFT, BOTTOM, RIGHT, NORTH, NORTH_EAST, EAST, SOUTH_EAST, SOUTH, SOUTH_WEST, WEST, NORTH_WEST, HORIZONTAL, VERTICAL, LEADING, TRAILING, NEXT, PREVIOUS, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
| Fields inherited from class JComponent | |
|---|---|
| WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
| Constructor Summary | |
JCarouselMenu.CarouselListCellRenderer(ImageBorder border)
Creates a new list cell renderer for the menu with the specified image border |
|
| Method Summary | |
|---|---|
Component
|
getListCellRendererComponent(JList jList, Object object, int i, boolean isSelected, boolean cellHasFocus)
Sets up the component for stamping |
Dimension
|
getPreferredSize()
I want it to be wider than it needs to be |
void
|
paintComponent(Graphics g)
Our image border can paint a center as well as a surround. |
void
|
setImageBorder(ImageBorder border)
Allows the setting of the image border |
| Field Detail |
|---|
ImageBorder imageBorder
| Constructor Detail |
|---|
public JCarouselMenu.CarouselListCellRenderer(ImageBorder border)
border - The border to use
| Method Detail |
|---|
public Component getListCellRendererComponent(JList jList, Object object, int i, boolean isSelected, boolean cellHasFocus)
jList - The listobject - The object being drawni - The index of the objectisSelected - If the object is selectedcellHasFocus - Does the cell have the focus
public Dimension getPreferredSize()
public void paintComponent(Graphics g)
g - The graphcis context
public void setImageBorder(ImageBorder border)
border - The border to use
Groovy Documentation