 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.dialog.plugin.parameter;
22 import javax.swing.JComponent;
23 import javax.swing.JPanel;
24 import javax.swing.JTextField;
25 import javax.swing.event.DocumentEvent;
26 import javax.swing.event.DocumentListener;
27 import javax.swing.text.JTextComponent;
32 import org.jetbrains.annotations.NotNull;
43 private final JTextComponent
value =
new JTextField();
50 private final JComponent
config =
new JPanel();
57 value.getDocument().addDocumentListener(
new DocumentListener() {
60 public void changedUpdate(
final DocumentEvent e) {
61 parameter.setValue(
value.getText());
65 public void insertUpdate(
final DocumentEvent e) {
66 parameter.setValue(
value.getText());
70 public void removeUpdate(
final DocumentEvent e) {
71 parameter.setValue(
value.getText());
74 value.setText(parameter.getValue());
Base package of all Gridarta classes.
final JComponent config
The component for editing the parameter's configuration.
Reflects a game object (object on a map).
GameObjects are the objects based on Archetypes found on maps.
JComponent getConfigComponent()
Returns a JComponent for editing the parameter configuration.
StringParameterView(@NotNull final StringParameter< G, A, R > parameter)
Creates a new instance.
Interface for MapArchObjects.
final JTextComponent value
The component for editing the parameter's value.
JComponent getValueComponent()
Returns a JComponent for editing the parameter value.
A PluginParameterView for a StringParameter.
Interface for views that display plugin parameters.
A PluginParameter that holds a string value.