private final Map<String, GUIComponent> componentsUnmodifiable;
private final Map<String, GUIWire> wires;
private final Map<String, GUIComponent> componentsUnmodifiable;
private final Map<String, GUIWire> wires;
private final Map<String, GUIWire> wiresUnmodifiable;
private final List<Consumer<? super GUIComponent>> componentAddedListeners;
private final Map<String, GUIWire> wiresUnmodifiable;
private final List<Consumer<? super GUIComponent>> componentAddedListeners;
/**
* Adds the given component to the list of components and calls all componentAddedListeners. Don't call this method from application
* code as it is automatically called in {@link GUIComponent}'s constructor.
/**
* Adds the given component to the list of components and calls all componentAddedListeners. Don't call this method from application
* code as it is automatically called in {@link GUIComponent}'s constructor.
{
if (components.containsKey(component.name))
throw new IllegalStateException("Don't add the same component twice!");
components.put(component.name, component);
{
if (components.containsKey(component.name))
throw new IllegalStateException("Don't add the same component twice!");
components.put(component.name, component);
- * Removes the given component from the list of components and calls all componentRemovedListeners. Don't call this method from
- * application code as it is automatically called in {@link GUIComponent#destroy()}.
+ * Destroyes the given component, removes it from the list of components and calls all componentRemovedListeners.
+ *
+ * @author Daniel Kirschten
if (!components.containsKey(component.name))
throw new IllegalStateException("Don't remove the same component twice!");
components.remove(component.name);
if (!components.containsKey(component.name))
throw new IllegalStateException("Don't remove the same component twice!");
components.remove(component.name);
- * Adds the given wire to the list of wires and calls all wireAddedListeners. Don't call this method from application code as it is
- * automatically called in {@link GUIWire}'s constructor(s).
+ * Adds the given wire to the list of wires and calls all wireAddedListeners.
+ *
+ * @author Daniel Kirschten
{
if (wires.containsKey(wire.name))
throw new IllegalStateException("Don't add the same wire twice!");
wires.put(wire.name, wire);
{
if (wires.containsKey(wire.name))
throw new IllegalStateException("Don't add the same wire twice!");
wires.put(wire.name, wire);
- * Removes the given wire from the list of wires and calls all wireRemovedListeners. Don't call this method from application code as it
- * is automatically called in {@link GUIWire#destroy()}.
+ * Destroys the given wire, removes it from the list of wires and calls all wireRemovedListeners.
+ *
+ * @author Daniel Kirschten
if (!wires.containsKey(wire.name))
throw new IllegalStateException("Don't remove the same wire twice!");
wires.remove(wire.name);
if (!wires.containsKey(wire.name))
throw new IllegalStateException("Don't remove the same wire twice!");
wires.remove(wire.name);