Crossfire JXClient, Trunk
CommandParser.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff
19  * Copyright (C) 2006-2017,2019-2023 Andreas Kirschbaum
20  * Copyright (C) 2010-2012,2014-2018,2020-2023 Nicolas Weeger
21  */
22 
23 package com.realtime.crossfire.jxclient.skin.io;
24 
83 import java.awt.Component;
84 import java.io.IOException;
85 import java.io.LineNumberReader;
86 import org.jetbrains.annotations.NotNull;
87 import org.jetbrains.annotations.Nullable;
88 
94 public class CommandParser {
95 
99  @NotNull
100  private final Dialogs dialogs;
101 
105  @NotNull
106  private final FloorView floorView;
107 
111  @NotNull
113 
114  @NotNull
115  private final QuestsView questsView;
116 
120  @NotNull
122 
126  @NotNull
127  private final GuiFactory guiFactory;
128 
132  @NotNull
133  private final NewCharModel newCharModel;
134 
144  public CommandParser(@NotNull final Dialogs dialogs, @NotNull final FloorView floorView, @NotNull final InventoryView inventoryView, @NotNull final QuestsView questsView, @NotNull final JXCSkinCache<AbstractGUIElement> definedGUIElements, @NotNull final GuiFactory guiFactory, @NotNull final NewCharModel newCharModel) {
145  this.dialogs = dialogs;
146  this.floorView = floorView;
147  this.inventoryView = inventoryView;
148  this.questsView = questsView;
149  this.definedGUIElements = definedGUIElements;
150  this.guiFactory = guiFactory;
151  this.newCharModel = newCharModel;
152  }
153 
170  @NotNull
171  public GUICommand parseCommandArgs(@NotNull final Args args, @Nullable final AbstractGUIElement element, @NotNull final String command, @NotNull final GuiStateManager guiStateManager, @NotNull final CommandExecutor commandExecutor, @NotNull final LineNumberReader lnr, @NotNull final CommandQueue commandQueue, @NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final CommandCallback commandCallback, @NotNull final Macros macros) throws IOException, JXCSkinException {
172  if (command.equals("SHOW")) {
173  return parseShow(element);
174  }
175  if (command.equals("HIDE")) {
176  return parseHide(element);
177  }
178  if (command.equals("TOGGLE")) {
179  return parseToggle(element);
180  }
181  if (command.equals("PRINT")) {
182  return parsePrint(element);
183  }
184  if (command.equals("QUIT")) {
185  return parseQuit(element, commandCallback);
186  }
187  if (command.equals("CONNECT")) {
188  return parseConnect(element, guiStateManager);
189  }
190  if (command.equals("DISCONNECT")) {
191  return parseDisconnect(element, guiStateManager);
192  }
193  if (command.equals("GUI_META")) {
194  return parseGuiMeta(element, guiStateManager);
195  }
196  if (command.equals("GUI_START")) {
197  return parseGuiStart(element, guiStateManager);
198  }
199  if (command.equals("GUI_EXECUTE_ELEMENT")) {
200  return parseGuiExecuteElement(element);
201  }
202  if (command.equals("DIALOG_OPEN")) {
203  return parseDialogOpen(args, element, commandCallback);
204  }
205  if (command.equals("DIALOG_TOGGLE")) {
206  return parseDialogToggle(args, element, commandCallback);
207  }
208  if (command.equals("DIALOG_CLOSE")) {
209  return parseDialogClose(args, element, commandCallback);
210  }
211  if (command.equals("GUI_EXECUTE_COMMAND")) {
212  return parseGuiExecuteCommand(args, element, commandExecutor, lnr, macros);
213  }
214  if (command.equals("EXEC_SELECTION")) {
215  return parseExecSelection(args, element, commandQueue, crossfireServerConnection);
216  }
217  if (command.equals("MOVE_SELECTION")) {
218  return parseMoveSelection(args, element);
219  }
220  if (command.equals("SCROLL_LIST")) {
221  return parseScrollList(args, element);
222  }
223  if (command.equals("SCROLL") || command.equals("SCROLL_NEVER")) {
224  return parseScroll(args, element, command.equals("SCROLL"));
225  }
226  if (command.equals("SCROLL_RESET")) {
227  return parseScrollReset(element);
228  }
229  if (command.equals("MOVE_FOCUS")) {
230  return parseMoveFocus(args, element);
231  }
232  if (command.equals("ACCOUNT_LOGIN")) {
233  return parseAccountLogin(element, commandCallback);
234  }
235  if (command.equals("ACCOUNT_CREATE")) {
236  return parseAccountCreate(element, commandCallback);
237  }
238  if (command.equals("ACCOUNT_PLAY")) {
239  return parseAccountPlay(element, commandCallback);
240  }
241  if (command.equals("ACCOUNT_LINK")) {
242  return parseAccountLink(element, commandCallback);
243  }
244  if (command.equals("ACCOUNT_CREATE_CHARACTER")) {
245  return parseAccountCreateCharacter(element, commandCallback);
246  }
247  if (command.equals("ACCOUNT_PASSWORD")) {
248  return parseAccountPassword(element, commandCallback);
249  }
250  if (command.equals("SELECT")) {
251  return parseSelect(args, element);
252  }
253  if (command.equals("INVENTORY_OPTION")) {
254  return parseInventoryOption(args, element);
255  }
256  if (command.equals("QUESTS_FILTER")) {
257  return parseQuestsFilter(args, element);
258  }
259  throw new JXCSkinException("unknown command '"+command+"'");
260  }
261 
268  @NotNull
269  private static GUICommand parseShow(@Nullable final Component element) throws IOException {
270  if (element == null) {
271  throw new IOException("<element> is required");
272  }
273 
274  return new ShowCommand(element);
275  }
276 
283  @NotNull
284  private static GUICommand parseHide(@Nullable final Component element) throws IOException {
285  if (element == null) {
286  throw new IOException("<element> is required");
287  }
288 
289  return new HideCommand(element);
290  }
291 
298  @NotNull
299  private static GUICommand parseToggle(@Nullable final Component element) throws IOException {
300  if (element == null) {
301  throw new IOException("<element> is required");
302  }
303 
304  return new ToggleCommand(element);
305  }
306 
313  @NotNull
314  private static GUICommand parsePrint(@Nullable final GUIElement element) throws IOException {
315  //noinspection VariableNotUsedInsideIf
316  if (element != null) {
317  throw new IOException("<element> is not allowed");
318  }
319 
320  return new PrintCommand();
321  }
322 
330  @NotNull
331  private static GUICommand parseQuit(@Nullable final GUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
332  //noinspection VariableNotUsedInsideIf
333  if (element != null) {
334  throw new IOException("<element> is not allowed");
335  }
336 
337  return new QuitCommand(commandCallback);
338  }
339 
347  @NotNull
348  private static GUICommand parseConnect(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager) throws IOException {
349  if (element == null) {
350  throw new IOException("<element> is required");
351  }
352 
353  if (!(element instanceof GUIText)) {
354  throw new IOException("'"+element+"' must be an input field");
355  }
356 
357  return new ConnectCommand(guiStateManager, (GUIText)element);
358  }
359 
367  @NotNull
368  private static GUICommand parseDisconnect(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager) throws IOException {
369  //noinspection VariableNotUsedInsideIf
370  if (element != null) {
371  throw new IOException("<element> is not allowed");
372  }
373 
374  return new DisconnectCommand(guiStateManager);
375  }
376 
384  @NotNull
385  private static GUICommand parseGuiMeta(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager) throws IOException {
386  //noinspection VariableNotUsedInsideIf
387  if (element != null) {
388  throw new IOException("<element> is not allowed");
389  }
390 
391  return new MetaCommand(guiStateManager);
392  }
393 
401  @NotNull
402  private static GUICommand parseGuiStart(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager) throws IOException {
403  //noinspection VariableNotUsedInsideIf
404  if (element != null) {
405  throw new IOException("<element> is not allowed");
406  }
407 
408  return new StartCommand(guiStateManager);
409  }
410 
417  @NotNull
418  private static GUICommand parseGuiExecuteElement(@Nullable final GUIElement element) throws IOException {
419  if (element == null) {
420  throw new IOException("<element> is required");
421  }
422 
423  if (!(element instanceof GUIItem)) {
424  throw new IOException("'"+element+"' must be an item element");
425  }
426 
427  return new ExecuteElementCommand((GUIItem)element);
428  }
429 
438  @NotNull
439  private GUICommand parseDialogOpen(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
440  //noinspection VariableNotUsedInsideIf
441  if (element != null) {
442  throw new IOException("<element> is not allowed");
443  }
444 
445  final String name = args.get();
446  dialogs.addDialog(name);
447  return new DialogOpenCommand(commandCallback, name);
448  }
449 
458  @NotNull
459  private GUICommand parseDialogToggle(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
460  //noinspection VariableNotUsedInsideIf
461  if (element != null) {
462  throw new IOException("<element> is not allowed");
463  }
464 
465  final String name = args.get();
466  dialogs.addDialog(name);
467  return new DialogToggleCommand(commandCallback, name);
468  }
469 
478  @NotNull
479  private GUICommand parseDialogClose(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
480  //noinspection VariableNotUsedInsideIf
481  if (element != null) {
482  throw new IOException("<element> is not allowed");
483  }
484 
485  final String name = args.get();
486  dialogs.addDialog(name);
487  return new DialogCloseCommand(commandCallback, name);
488  }
489 
500  @NotNull
501  private static GUICommand parseGuiExecuteCommand(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandExecutor commandExecutor, @NotNull final LineNumberReader lnr, @NotNull final Macros macros) throws IOException {
502  //noinspection VariableNotUsedInsideIf
503  if (element != null) {
504  throw new IOException("<element> is not allowed");
505  }
506 
507  final String commandString = ParseUtils.parseText(args, lnr);
508  return new ExecuteCommandCommand(commandExecutor, commandString, macros);
509  }
510 
520  @NotNull
521  private GUICommand parseExecSelection(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandQueue commandQueue, @NotNull final CrossfireServerConnection crossfireServerConnection) throws IOException {
522  final CommandType commandType = NumberParser.parseEnum(CommandType.class, args.get(), "command name");
523 
524  if (element == null) {
525  throw new IOException("<element> is required");
526  }
527 
528  if (!(element instanceof GUIItemList)) {
529  throw new IOException("'"+element+"' must be an item list");
530  }
531 
532  return new ExecSelectionCommand((GUIItemList<?>)element, commandType, crossfireServerConnection, floorView, commandQueue);
533  }
534 
542  @NotNull
543  private static GUICommand parseMoveSelection(@NotNull final Args args, @Nullable final GUIElement element) throws IOException {
544  final int diffLines = ExpressionParser.parseInt(args.get());
545  final int diffElements = ExpressionParser.parseInt(args.get());
546  if (diffLines == 0 && diffElements == 0) {
547  throw new IOException("Invalid zero scroll distance");
548  }
549 
550  if (element == null) {
551  throw new IOException("<element> is required");
552  }
553 
554  if (!(element instanceof GUIList)) {
555  throw new IOException("'"+element+"' must be a list");
556  }
557 
558  return new MoveSelectionCommand((GUIList<?>)element, diffLines, diffElements);
559  }
560 
568  @NotNull
569  private static GUICommand parseScrollList(@NotNull final Args args, @Nullable final GUIElement element) throws IOException {
570  final int distance = ExpressionParser.parseInt(args.get());
571  if (distance == 0) {
572  throw new IOException("Invalid zero scroll distance");
573  }
574 
575  if (element == null) {
576  throw new IOException("<element> is required");
577  }
578 
579  if (!(element instanceof GUIScrollable)) {
580  throw new IOException("'"+element+"' must be a scrollable");
581  }
582 
583  return new ScrollListCommand((GUIScrollable)element, distance);
584  }
585 
595  @NotNull
596  private static GUICommand parseScroll(@NotNull final Args args, @Nullable final GUIElement element, final boolean isScroll) throws IOException {
597  final int distance = ExpressionParser.parseInt(args.get());
598  if (distance == 0) {
599  throw new IOException("Invalid zero scroll distance");
600  }
601 
602  if (element == null) {
603  throw new IOException("<element> is required");
604  }
605 
606  if (!(element instanceof GUIScrollable)) {
607  throw new IOException("'"+element+"' must be a scrollable element");
608  }
609 
610  return isScroll ? new ScrollCommand(distance, (GUIScrollable)element) : new ScrollNeverCommand(distance, (GUIScrollable)element);
611  }
612 
619  @NotNull
620  private static GUICommand parseScrollReset(@Nullable final GUIElement element) throws IOException {
621  if (element == null) {
622  throw new IOException("<element> is required");
623  }
624 
625  if (!(element instanceof GUIScrollable)) {
626  throw new IOException("'"+element+"' must be a scrollable element");
627  }
628 
629  return new ScrollResetCommand((GUIScrollable)element);
630  }
631 
640  @NotNull
641  private GUICommand parseMoveFocus(@NotNull final Args args, @Nullable final GUIElement element) throws IOException, JXCSkinException {
642  final Object nextElement = definedGUIElements.lookup(args.get());
643  if (!(nextElement instanceof ActivatableGUIElement)) {
644  throw new IOException("'"+args.getPrev()+"' cannot become active");
645  }
646 
647  final int apply = args.hasMore() ? ExpressionParser.parseInt(args.get()) : 0;
648  if (apply != 0 && apply != 1) {
649  throw new IOException("<apply> must be 0 or 1");
650  }
651 
652  if (element == null) {
653  throw new IOException("<element> is required");
654  }
655 
656  if (!(element instanceof ActivatableGUIElement)) {
657  throw new IOException("'"+element+"' cannot become active");
658  }
659 
660  return new ScrollNextCommand((ActivatableGUIElement)nextElement, (ActivatableGUIElement)element, apply != 0);
661  }
662 
670  @NotNull
671  private GUICommand parseAccountLogin(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
672  if (element == null) {
673  throw new IOException("<element> is required");
674  }
675 
676  return new AccountLoginCommand(commandCallback, element, guiFactory);
677  }
678 
686  @NotNull
687  private GUICommand parseAccountCreate(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
688  if (element == null) {
689  throw new IOException("<element> is required");
690  }
691 
692  return new AccountCreateCommand(commandCallback, element, guiFactory);
693  }
694 
702  @NotNull
703  private GUICommand parseAccountPlay(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
704  if (element == null) {
705  throw new IOException("<element> is required");
706  }
707 
708  return new AccountPlayCharacterCommand(commandCallback, element, guiFactory);
709  }
710 
718  @NotNull
719  private GUICommand parseAccountLink(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
720  if (element == null) {
721  throw new IOException("<element> is required");
722  }
723 
724  return new AccountLinkCharacterCommand(commandCallback, element, guiFactory);
725  }
726 
734  @NotNull
735  private GUICommand parseAccountCreateCharacter(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
736  if (element == null) {
737  throw new IOException("<element> is required");
738  }
739 
740  return new AccountCreateCharacterCommand(commandCallback, element, guiFactory, newCharModel);
741  }
742 
750  @NotNull
751  private GUICommand parseAccountPassword(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback) throws IOException {
752  if (element == null) {
753  throw new IOException("<element> is required");
754  }
755 
756  return new AccountPasswordCommand(commandCallback, element, guiFactory);
757  }
758 
766  @NotNull
767  private static GUICommand parseSelect(@NotNull final Args args, @Nullable final GUIElement element) throws IOException {
768  final boolean selected = NumberParser.parseBoolean(args.get());
769 
770  if (element == null) {
771  throw new IOException("<element> is required");
772  }
773 
774  if (!(element instanceof GUISelectable)) {
775  throw new IOException("'"+element+"' must be a selectable element");
776  }
777 
778  return new SelectCommand((GUISelectable)element, selected);
779  }
780 
788  @NotNull
789  private GUICommand parseInventoryOption(@NotNull final Args args, @Nullable final GUIElement element) throws IOException {
790  final InventoryFilter filter = NumberParser.parseEnum(InventoryFilter.class, args.get(), "inventory option");
791 
792  //noinspection VariableNotUsedInsideIf
793  if (element != null) {
794  throw new IOException("<element> is not allowed");
795  }
796 
797  return new InventoryFilterCommand(inventoryView, filter);
798  }
799 
800  @NotNull
801  private GUICommand parseQuestsFilter(@NotNull final Args args, @Nullable final GUIElement element) throws IOException {
802  final QuestsFilter filter = NumberParser.parseEnum(QuestsFilter.class, args.get(), "quests filter");
803 
804  //noinspection VariableNotUsedInsideIf
805  if (element != null) {
806  throw new IOException("<element> is not allowed");
807  }
808 
809  return new QuestsFilterCommand(questsView, filter);
810  }
811 
812 }
com.realtime.crossfire.jxclient
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseGuiStart
static GUICommand parseGuiStart(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager)
Definition: CommandParser.java:402
com.realtime.crossfire.jxclient.skin.skin
Definition: DefaultJXCSkin.java:23
com.realtime.crossfire.jxclient.skin.io.CommandParser.floorView
final FloorView floorView
Definition: CommandParser.java:106
com.realtime.crossfire.jxclient.gui.commands.CommandType
Definition: CommandType.java:37
com.realtime.crossfire.jxclient.gui.button.GUISelectable
Definition: GUISelectable.java:31
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseScrollList
static GUICommand parseScrollList(@NotNull final Args args, @Nullable final GUIElement element)
Definition: CommandParser.java:569
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseAccountLogin
GUICommand parseAccountLogin(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:671
com.realtime.crossfire.jxclient.skin.io.Args
Definition: Args.java:32
com.realtime.crossfire.jxclient.server
com.realtime.crossfire.jxclient.skin.io.CommandParser.dialogs
final Dialogs dialogs
Definition: CommandParser.java:100
com.realtime.crossfire.jxclient.skin.io.CommandParser.newCharModel
final NewCharModel newCharModel
Definition: CommandParser.java:133
com.realtime.crossfire.jxclient.gui.commands.ScrollResetCommand
Definition: ScrollResetCommand.java:34
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseAccountPlay
GUICommand parseAccountPlay(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:703
com.realtime.crossfire.jxclient.items.FloorView
Definition: FloorView.java:36
com.realtime.crossfire.jxclient.skin
com.realtime.crossfire.jxclient.gui.commands.MoveSelectionCommand
Definition: MoveSelectionCommand.java:33
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseExecSelection
GUICommand parseExecSelection(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandQueue commandQueue, @NotNull final CrossfireServerConnection crossfireServerConnection)
Definition: CommandParser.java:521
com.realtime.crossfire.jxclient.gui.textinput.ExecuteCommandCommand
Definition: ExecuteCommandCommand.java:34
com.realtime.crossfire.jxclient.gui.commands.QuitCommand
Definition: QuitCommand.java:33
com.realtime.crossfire.jxclient.skin.io.ParseUtils
Definition: ParseUtils.java:42
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement
Definition: ActivatableGUIElement.java:33
com.realtime.crossfire.jxclient.gui.commands.AccountCreateCharacterCommand
Definition: AccountCreateCharacterCommand.java:43
com.realtime.crossfire.jxclient.gui.label
Definition: AbstractLabel.java:23
com.realtime.crossfire.jxclient.skin.skin.GuiFactory
Definition: GuiFactory.java:41
com.realtime.crossfire.jxclient.gui.textinput
Definition: ActivateCommandInputCommand.java:23
com.realtime.crossfire.jxclient.gui.commandlist
Definition: CommandList.java:23
com.realtime.crossfire.jxclient.gui.commands.AccountLoginCommand
Definition: AccountLoginCommand.java:37
com.realtime.crossfire.jxclient.skin.io.CommandParser.guiFactory
final GuiFactory guiFactory
Definition: CommandParser.java:127
com.realtime.crossfire.jxclient.skin.skin.JXCSkinException
Definition: JXCSkinException.java:31
com.realtime.crossfire.jxclient.gui.commands.ShowCommand
Definition: ShowCommand.java:35
com.realtime.crossfire.jxclient.gui.commands.DialogOpenCommand
Definition: DialogOpenCommand.java:34
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseScrollReset
static GUICommand parseScrollReset(@Nullable final GUIElement element)
Definition: CommandParser.java:620
com.realtime.crossfire.jxclient.gui.item.GUIItem
Definition: GUIItem.java:39
com.realtime.crossfire.jxclient.items.QuestsFilter
Definition: QuestsFilter.java:10
com.realtime.crossfire.jxclient.gui.commands.PrintCommand
Definition: PrintCommand.java:31
com.realtime.crossfire.jxclient.skin.io.ExpressionParser.parseInt
static int parseInt(@NotNull final String str)
Definition: ExpressionParser.java:68
com.realtime.crossfire.jxclient.util.NumberParser.parseEnum
static< T extends Enum< T > T parseEnum(@NotNull final Class< T > class_, @NotNull final String name, @NotNull final String ident)
Definition: NumberParser.java:128
com.realtime.crossfire.jxclient.gui.commands.ExecuteElementCommand
Definition: ExecuteElementCommand.java:34
com.realtime.crossfire.jxclient.gui.textinput.CommandCallback
Definition: CommandCallback.java:33
com.realtime.crossfire.jxclient.gui.list.GUIItemList
Definition: GUIItemList.java:46
com.realtime.crossfire.jxclient.settings
Definition: CommandHistory.java:23
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseScroll
static GUICommand parseScroll(@NotNull final Args args, @Nullable final GUIElement element, final boolean isScroll)
Definition: CommandParser.java:596
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseMoveFocus
GUICommand parseMoveFocus(@NotNull final Args args, @Nullable final GUIElement element)
Definition: CommandParser.java:641
com.realtime.crossfire.jxclient.skin.io.CommandParser.CommandParser
CommandParser(@NotNull final Dialogs dialogs, @NotNull final FloorView floorView, @NotNull final InventoryView inventoryView, @NotNull final QuestsView questsView, @NotNull final JXCSkinCache< AbstractGUIElement > definedGUIElements, @NotNull final GuiFactory guiFactory, @NotNull final NewCharModel newCharModel)
Definition: CommandParser.java:144
com.realtime.crossfire.jxclient.guistate.GuiStateManager
Definition: GuiStateManager.java:34
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseShow
static GUICommand parseShow(@Nullable final Component element)
Definition: CommandParser.java:269
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseDisconnect
static GUICommand parseDisconnect(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager)
Definition: CommandParser.java:368
com.realtime.crossfire.jxclient.gui.commands.MetaCommand
Definition: MetaCommand.java:34
com.realtime.crossfire.jxclient.gui.commands.ScrollNeverCommand
Definition: ScrollNeverCommand.java:34
com.realtime.crossfire.jxclient.guistate
Definition: ClientSocketState.java:23
com.realtime.crossfire.jxclient.gui.list
Definition: CharacterCellRenderer.java:23
com.realtime.crossfire.jxclient.items.QuestsView
Definition: QuestsView.java:38
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseQuestsFilter
GUICommand parseQuestsFilter(@NotNull final Args args, @Nullable final GUIElement element)
Definition: CommandParser.java:801
com.realtime.crossfire.jxclient.gui.commands.StartCommand
Definition: StartCommand.java:34
com.realtime.crossfire.jxclient.gui.commands.DialogCloseCommand
Definition: DialogCloseCommand.java:34
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseConnect
static GUICommand parseConnect(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager)
Definition: CommandParser.java:348
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseGuiMeta
static GUICommand parseGuiMeta(@Nullable final GUIElement element, @NotNull final GuiStateManager guiStateManager)
Definition: CommandParser.java:385
com.realtime.crossfire.jxclient.skin.io.CommandParser.definedGUIElements
final JXCSkinCache< AbstractGUIElement > definedGUIElements
Definition: CommandParser.java:121
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseQuit
static GUICommand parseQuit(@Nullable final GUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:331
com.realtime.crossfire.jxclient.gui.commands.HideCommand
Definition: HideCommand.java:35
com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection
Definition: CrossfireServerConnection.java:37
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseGuiExecuteElement
static GUICommand parseGuiExecuteElement(@Nullable final GUIElement element)
Definition: CommandParser.java:418
com.realtime.crossfire.jxclient.gui.commands.SelectCommand
Definition: SelectCommand.java:34
com.realtime.crossfire.jxclient.skin.io.CommandParser.inventoryView
final InventoryView inventoryView
Definition: CommandParser.java:112
com.realtime.crossfire.jxclient.items.InventoryFilter
Definition: InventoryFilter.java:9
com.realtime.crossfire.jxclient.util.NumberParser.parseBoolean
static boolean parseBoolean(@NotNull final String str)
Definition: NumberParser.java:109
com.realtime.crossfire.jxclient.gui.commands.ScrollCommand
Definition: ScrollCommand.java:34
com.realtime.crossfire.jxclient.settings.Macros
Definition: Macros.java:38
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseAccountPassword
GUICommand parseAccountPassword(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:751
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseDialogClose
GUICommand parseDialogClose(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:479
com.realtime.crossfire.jxclient.gui.commands.DisconnectCommand
Definition: DisconnectCommand.java:33
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseHide
static GUICommand parseHide(@Nullable final Component element)
Definition: CommandParser.java:284
com.realtime.crossfire.jxclient.gui
com.realtime.crossfire.jxclient.queue.CommandQueue
Definition: CommandQueue.java:38
com.realtime.crossfire.jxclient.skin.io.ParseUtils.parseText
static String parseText(@NotNull final Args args, @NotNull final LineNumberReader lnr)
Definition: ParseUtils.java:180
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseToggle
static GUICommand parseToggle(@Nullable final Component element)
Definition: CommandParser.java:299
com.realtime.crossfire.jxclient.skin.skin.JXCSkinCache
Definition: JXCSkinCache.java:40
com.realtime.crossfire.jxclient.gui.commands.DialogToggleCommand
Definition: DialogToggleCommand.java:33
com.realtime.crossfire.jxclient.gui.commands.AccountPlayCharacterCommand
Definition: AccountPlayCharacterCommand.java:38
com.realtime.crossfire.jxclient.gui.commands.ToggleCommand
Definition: ToggleCommand.java:36
com.realtime.crossfire.jxclient.skin.io.CommandParser.parsePrint
static GUICommand parsePrint(@Nullable final GUIElement element)
Definition: CommandParser.java:314
com.realtime.crossfire.jxclient.skin.io.CommandParser
Definition: CommandParser.java:94
com.realtime.crossfire.jxclient.util
Definition: Codec.java:23
com.realtime.crossfire.jxclient.gui.button
Definition: AbstractButton.java:23
com.realtime.crossfire.jxclient.server.crossfire
Definition: AbstractCrossfireServerConnection.java:23
com.realtime.crossfire.jxclient.gui.textinput.CommandExecutor
Definition: CommandExecutor.java:31
com.realtime.crossfire.jxclient.gui.commands.AccountCreateCommand
Definition: AccountCreateCommand.java:39
com.realtime.crossfire.jxclient.gui.gui.GUIElement
Definition: GUIElement.java:33
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseMoveSelection
static GUICommand parseMoveSelection(@NotNull final Args args, @Nullable final GUIElement element)
Definition: CommandParser.java:543
com.realtime.crossfire.jxclient.gui.list.GUIList
Definition: GUIList.java:56
com.realtime.crossfire.jxclient.gui.label.NewCharModel
Definition: NewCharModel.java:43
com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable
Definition: GUIScrollable.java:32
com.realtime.crossfire.jxclient.gui.commands.ScrollNextCommand
Definition: ScrollNextCommand.java:34
com.realtime.crossfire.jxclient.gui.gui
Definition: AbstractGUIElement.java:23
com.realtime.crossfire.jxclient.queue
Definition: CommandQueue.java:23
com.realtime.crossfire.jxclient.skin.skin.Dialogs.addDialog
void addDialog(@NotNull final String name)
Definition: Dialogs.java:90
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseAccountCreate
GUICommand parseAccountCreate(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:687
com.realtime.crossfire
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseInventoryOption
GUICommand parseInventoryOption(@NotNull final Args args, @Nullable final GUIElement element)
Definition: CommandParser.java:789
com.realtime.crossfire.jxclient.skin.io.ExpressionParser
Definition: ExpressionParser.java:35
com.realtime.crossfire.jxclient.gui.textinput.GUIText
Definition: GUIText.java:61
com.realtime
com.realtime.crossfire.jxclient.gui.scrollable
Definition: GUIScrollable.java:23
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseCommandArgs
GUICommand parseCommandArgs(@NotNull final Args args, @Nullable final AbstractGUIElement element, @NotNull final String command, @NotNull final GuiStateManager guiStateManager, @NotNull final CommandExecutor commandExecutor, @NotNull final LineNumberReader lnr, @NotNull final CommandQueue commandQueue, @NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final CommandCallback commandCallback, @NotNull final Macros macros)
Definition: CommandParser.java:171
com
com.realtime.crossfire.jxclient.skin.skin.Dialogs
Definition: Dialogs.java:39
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseDialogOpen
GUICommand parseDialogOpen(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:439
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseAccountCreateCharacter
GUICommand parseAccountCreateCharacter(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:735
com.realtime.crossfire.jxclient.items
Definition: AbstractItemView.java:23
com.realtime.crossfire.jxclient.gui.item
Definition: GUIItem.java:23
com.realtime.crossfire.jxclient.gui.commands.ConnectCommand
Definition: ConnectCommand.java:34
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseGuiExecuteCommand
static GUICommand parseGuiExecuteCommand(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandExecutor commandExecutor, @NotNull final LineNumberReader lnr, @NotNull final Macros macros)
Definition: CommandParser.java:501
com.realtime.crossfire.jxclient.skin.io.CommandParser.questsView
final QuestsView questsView
Definition: CommandParser.java:115
com.realtime.crossfire.jxclient.util.NumberParser
Definition: NumberParser.java:32
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
Definition: AbstractGUIElement.java:37
com.realtime.crossfire.jxclient.gui.commands
Definition: AccountCreateCharacterCommand.java:23
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseSelect
static GUICommand parseSelect(@NotNull final Args args, @Nullable final GUIElement element)
Definition: CommandParser.java:767
com.realtime.crossfire.jxclient.gui.commands.AccountPasswordCommand
Definition: AccountPasswordCommand.java:39
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseAccountLink
GUICommand parseAccountLink(@Nullable final AbstractGUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:719
com.realtime.crossfire.jxclient.gui.commands.InventoryFilterCommand
Definition: InventoryFilterCommand.java:34
com.realtime.crossfire.jxclient.gui.commands.QuestsFilterCommand
Definition: QuestsFilterCommand.java:34
com.realtime.crossfire.jxclient.items.InventoryView
Definition: InventoryView.java:38
com.realtime.crossfire.jxclient.gui.commands.ExecSelectionCommand
Definition: ExecSelectionCommand.java:37
com.realtime.crossfire.jxclient.gui.commands.ScrollListCommand
Definition: ScrollListCommand.java:33
com.realtime.crossfire.jxclient.skin.io.CommandParser.parseDialogToggle
GUICommand parseDialogToggle(@NotNull final Args args, @Nullable final GUIElement element, @NotNull final CommandCallback commandCallback)
Definition: CommandParser.java:459
com.realtime.crossfire.jxclient.gui.commandlist.GUICommand
Definition: GUICommand.java:29