20 package net.sf.gridarta.gui.panel.archetypechooser;
22 import java.awt.Component;
23 import javax.swing.JList;
30 import org.jetbrains.annotations.NotNull;
59 public Component
getListCellRendererComponent(
final JList<?> list,
final Object value,
final int index,
final boolean isSelected,
final boolean cellHasFocus) {
60 super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
63 setIcon(faceObjectProviders.getFace(archetype));
75 return JList.HORIZONTAL_WRAP;
int getLayoutOrientation()
A DisplayMode showing archetypes as images only.
static final long serialVersionUID
Serial Version UID.
ArchetypeIconCellRenderer(@NotNull final FaceObjectProviders faceObjectProviders)
Creates a new instance.
String getArchetypeName()
Returns the name of this archetype.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
GameObjects are the objects based on Archetypes found on maps.
Abstract base class for classes implementing display modes of the archetype chooser.
int compare(final Archetype< G, A, R > o1, final Archetype< G, A, R > o2)
Provider for faces of GameObjects and Archetypes.
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders for looking up faces.
The face is the appearance of an object.
Component getListCellRendererComponent(final JList<?> list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus)
Interface for MapArchObjects.