22 package com.realtime.crossfire.jxclient.skin.skin;
26 import java.util.Collection;
27 import java.util.HashSet;
28 import java.util.Iterator;
29 import org.jetbrains.annotations.NotNull;
30 import org.jetbrains.annotations.Nullable;
38 public class Dialogs implements Iterable<Gui> {
82 return dialogs.
lookup(name);
93 return dialogs.
lookup(name);
99 throw new AssertionError(ex);
101 dialogsToLoad.add(name);
113 final Iterator<String> it = dialogsToLoad.iterator();
118 final String result = it.next();
String getDialogToLoad()
Returns one dialog pending loading.
final GuiFactory guiFactory
The GuiFactory for creating new Gui instances.
Combines a list of GUIElements to for a gui.
Gui addDialog(@NotNull final String name)
Creates a new dialog instance.
final GuiManager guiManager
The GuiManager to add dialogs to.
Dialogs(@NotNull final GuiFactory guiFactory, @NotNull final GuiManager guiManager)
Creates a new instance.
void addDialog(@NotNull final String name, @NotNull final Gui dialog)
Adds a dialog for name based lookup.
Iterator< T > iterator()
Returns all stored values.
Gui lookup(@NotNull final String name)
Returns a dialog instance by dialog name.
final Collection< String > dialogsToLoad
Names of pending skin files.
Factory for creating Gui instances.
void insert(@NotNull final String name, @NotNull final T t)
Adds a new element to the cache.
Maintains the application's main GUI state.
Iterator< Gui > iterator()
Gui newGui()
Creates a new Gui instance.
final JXCSkinCache< Gui > dialogs
The existing dialogs.
Implements a cache for elements identified by name.
Exception thrown if a skin related problem occurs.
Maintains a set of Gui instances representing dialog windows.
T lookup(@NotNull final String name)
Looks up an element by name.