 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.panel.objectchoicedisplay;
22 import java.awt.Color;
23 import java.awt.GridBagConstraints;
24 import java.awt.GridBagLayout;
25 import javax.swing.JLabel;
26 import javax.swing.JPanel;
30 import net.
sf.japi.swing.action.ActionBuilder;
31 import net.
sf.japi.swing.action.ActionBuilderFactory;
32 import org.jetbrains.annotations.NotNull;
33 import org.jetbrains.annotations.Nullable;
52 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
90 setLayout(
new GridBagLayout());
92 final GridBagConstraints gcl =
new GridBagConstraints();
93 final GridBagConstraints gcr =
new GridBagConstraints();
94 gcl.fill = GridBagConstraints.HORIZONTAL;
95 gcr.fill = GridBagConstraints.HORIZONTAL;
100 gcl.anchor = GridBagConstraints.WEST;
101 gcr.anchor = GridBagConstraints.WEST;
103 gcr.gridwidth = GridBagConstraints.REMAINDER;
126 if (gameObject ==
null) {
127 if (isPickmapActive) {
Defines types of GameObjects with corresponding attributes.
boolean isMulti()
Returns whether this Archetype is a multi-part object.
Base package of all Gridarta classes.
String getDisplayName(@NotNull final BaseObject<?, ?, ?, ?> baseObject)
Returns a description of this type.
static final ActionBuilder ACTION_BUILDER
The ActionBuilder.
int getSizeX()
Determines the horizontal extent in squares.
String getBestName()
Returns the name which is best appropriate to describe this GameObject.
static JLabel newLabel(@NotNull final ActionBuilder actionBuilder, @NotNull final String key)
Creates a new JLabel from a resource key.
Manages ArchetypeType instances, list, and bitmask definitions.
R getArchetype()
Returns the Archetype this GameObject is based on.
final JLabel gameObjectNameLabel
Displays the selected game object's name.
static String getString(@NotNull final ActionBuilder actionBuilder, @NotNull final String key, @NotNull final String defaultValue)
Returns the value of a key.
final JLabel gameObjectArchetypeNameLabel
Display the selected game object's archetype name.
final ArchetypeTypeSet archetypeTypeSet
The ArchetypeTypeSet for looking up game object types.
int getSizeY()
Determines the vertical extent in squares.
static final long serialVersionUID
The serial version UID.
T getHead()
Return the head part of a multi-part object.
void showObjectChooserQuickObject(@Nullable final BaseObject<?, ?, ?, ?> gameObject, final boolean isPickmapActive)
Displays information about the selected game object.
final JLabel gameObjectTypeLabel
Display the selected game object's type information.
Utility class for ActionBuilder related functions.
The object choice display shows information about the selected object in the object chooser.
int getMultiRefCount()
Returns the number of parts for multi-part heads.
ObjectChoiceDisplay(@NotNull final ArchetypeTypeSet archetypeTypeSet)
Creates a new instance.
final JLabel gameObjectExtentsLabel
Displays the selected game object's extents.