 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.panel.selectedsquare;
22 import java.awt.Component;
23 import javax.swing.BorderFactory;
24 import javax.swing.DefaultListCellRenderer;
25 import javax.swing.Icon;
26 import javax.swing.JList;
31 import org.jetbrains.annotations.NotNull;
74 super.getListCellRendererComponent(
list, value, index, isSelected, cellHasFocus);
87 setText(
arch.getBestName());
102 setBorder(BorderFactory.createEmptyBorder(0, indent *
INDENT_PIXELS, 0, 0));
Base package of all Gridarta classes.
Provider for faces of GameObjects and Archetypes.
Reflects a game object (object on a map).
static final int INDENT_PIXELS
The number of pixels to indent inventory items.
Component getListCellRendererComponent(final JList<?> list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus)
GameObjects are the objects based on Archetypes found on maps.
static final long serialVersionUID
Serial Version UID.
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders for looking up faces.
This document describes some hints and requirements for general development on the CrossfireEditor If you plan to make changes to the editor code or setup please read the following and keep it in derived from a basic editor application called Gridder by Pasi Ker�nen so please communicate with best through the cf devel mailing list
Interface for MapArchObjects.
public< G extends GameObject< G, A, R >, A extends MapArchObject< A >, R extends Archetype< G, A, R > > ImageIcon getFace(@NotNull final BaseObject< G, A, R, ?> baseObject)
Returns the face of a BaseObject as an ImageIcon.
final Icon unknownSquareIcon
The Icon for unknown squares.
CellRenderer for rendering ArchObjects on a certain map square in a list.
The face is the appearance of an object.
CellRenderer(@NotNull final FaceObjectProviders faceObjectProviders, @NotNull final Icon unknownSquareIcon)
Creates a new instance.