Package games.stendhal.client.gui.chatlog

Examples of games.stendhal.client.gui.chatlog.HeaderLessEventLine


      final String text = "Stendhal is developed and tested on Sun Java and OpenJDK. You are using "
        + System.getProperty("java.vm.vendor", "unknown") + " "
        + System.getProperty("java.vm.name", "unknown")
        + " so there may be some problems like a black or grey screen.\n"
        + " If you have coding experience with your JDK, we are looking for help.";
      addEventLine(new HeaderLessEventLine(text, NotificationType.ERROR));
    }
  }
View Full Code Here


   * @param params ignored
   * @param remainder ignored
   * @return <code>true</code>
   */
  public boolean execute(final String[] params, final String remainder) {
    ClientSingletonRepository.getUserInterface().addEventLine(new HeaderLessEventLine(
        "Trying to open #" + urlToOpen + " in your browser.",
    NotificationType.CLIENT));
 
    BareBonesBrowserLaunch.openURL(urlToOpen);
 
View Full Code Here

        "- /mute\t\tMute or unmute the sounds",
        "- /volume\t\tLists or sets the volume for sound and music"
    };

    for (final String line : lines) {
      ClientSingletonRepository.getUserInterface().addEventLine(new HeaderLessEventLine(line, NotificationType.CLIENT));
    }

    return true;
  }
View Full Code Here

  public boolean execute(final String[] params, final String remainder) {
    if (params[0] == null) {
      float volume = ClientSingletonRepository.getSound().getVolume();
      UserInterface ui = ClientSingletonRepository.getUserInterface();
      ui.addEventLine(new StandardEventLine("Please use /volume <name> <value> to adjust the volume."));
      ui.addEventLine(new HeaderLessEventLine("<name> is an item from the following list. \"master\" refers to the global volume setting.", NotificationType.CLIENT));
      ui.addEventLine(new HeaderLessEventLine("<value> is in the range from 0 to 100 but may be set higher.", NotificationType.CLIENT));
      ui.addEventLine(new HeaderLessEventLine("master -> " + Numeric.floatToInt(volume, 100.0f), NotificationType.CLIENT));

      for (String name : ClientSingletonRepository.getSound().getGroupNames()) {
        volume = ClientSingletonRepository.getSound().getGroup(name).getVolume();
        ui.addEventLine(new HeaderLessEventLine(name + " -> " + Numeric.floatToInt(volume, 100.0f), NotificationType.CLIENT));
      }
    } else if (params[1] != null) {
      changeVolume(params[0], params[1]);
    } else {
      ClientSingletonRepository.getUserInterface().addEventLine(
          new HeaderLessEventLine("Please use /volume for help.",
          NotificationType.ERROR));
    }
    return true;
  }
View Full Code Here

          ClientSingletonRepository.getUserInterface().addEventLine(new StandardEventLine("No sound group \"" + groupName + "\" does exist"));
          ClientSingletonRepository.getUserInterface().addEventLine(new StandardEventLine("Please type \"/volume show\" for a valid list of groups"));
        }
      }
    } catch (NumberFormatException exception) {
      ClientSingletonRepository.getUserInterface().addEventLine(new HeaderLessEventLine(volumeString + " is not a valid number", NotificationType.ERROR));
    }
  }
View Full Code Here

        + System.getProperty("java.vm.version") + "\n");

    final long freeMemory = Runtime.getRuntime().freeMemory() / 1024;
    final long totalMemory = Runtime.getRuntime().totalMemory() / 1024;
    sb.append("Total/Used memory: " + totalMemory + "/" + (totalMemory - freeMemory) + "\n");
    ClientSingletonRepository.getUserInterface().addEventLine(new HeaderLessEventLine(sb.toString(), NotificationType.CLIENT));

    if (first) {
      tell.put("type", "support");
      tell.put("text", sb.toString());
      ClientSingletonRepository.getClientFramework().send(tell);
View Full Code Here

        if (members == null) {
          panel.showHeader("<html>You are not a member of a group.<html>");
          if (grouped) {
            String message = "You are not a member of a group anymore.";
            ClientSingletonRepository.getUserInterface().addEventLine(
                new HeaderLessEventLine(message, NotificationType.CLIENT));
            grouped = false;
            GameObjects.getInstance().removeGameObjectListener(GroupPanelController.this);
          }
          panel.setMembers(null);
        } else {
View Full Code Here

   * Listener for clicking the invite button
   */
  private static class InviteActionListener implements ActionListener {
    public void actionPerformed(ActionEvent e) {
      j2DClient.get().setChatLine("/group invite ");
      j2DClient.get().addEventLine(new HeaderLessEventLine("Fill in the name of the player you want to invite", NotificationType.CLIENT));
    }
View Full Code Here

      final SlashActionCommand command = SlashActionParser.parse(text.substring(1));
      final String[] params = command.getParams();

      if (command.hasError()) {
        ClientSingletonRepository.getUserInterface().addEventLine(
          new HeaderLessEventLine(command.getErrorString(),
          NotificationType.ERROR));
        return false;
      }

      /*
 
View Full Code Here

      image.deleteOnExit();
      dat.deleteOnExit();
    } catch (final Exception e) {
      logger.error("Failed creating graph: ", e);
      j2DClient.get().addEventLine(new HeaderLessEventLine(
          "Failed creating graph (Is graphviz installed and on your system search path?): "
              + e.getMessage(), NotificationType.ERROR));
    }
  }
View Full Code Here

TOP

Related Classes of games.stendhal.client.gui.chatlog.HeaderLessEventLine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.