com.realtime.crossfire.jxclient.commands
Class ScreenshotCommand

java.lang.Object
  extended by com.realtime.crossfire.jxclient.commands.AbstractCommand
      extended by com.realtime.crossfire.jxclient.commands.ScreenshotCommand
All Implemented Interfaces:
Command

public class ScreenshotCommand
extends AbstractCommand

Implements the "screenshot" command. It write the current window contents into a .png file.


Field Summary
private static int SCREENSHOT_FILENAMES
          The number of auto-created screenshot filenames.
private static int screenshotId
          A number for creating screenshot file names.
private  JXCWindowRenderer windowRenderer
          The renderer to use.
 
Constructor Summary
ScreenshotCommand(JXCWindowRenderer windowRenderer, CrossfireServerConnection crossfireServerConnection)
          Creates a new instance.
 
Method Summary
 boolean allArguments()
          Returns whether all remaining commands should be included as arguments.
 void execute(java.lang.String args)
          Executes the command with the given arguments.
 
Methods inherited from class com.realtime.crossfire.jxclient.commands.AbstractCommand
drawInfo, drawInfo, drawInfoError, drawInfoSetDebugMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCREENSHOT_FILENAMES

private static final int SCREENSHOT_FILENAMES
The number of auto-created screenshot filenames. If more than this number of screenshots are created, old files will be recycled.

See Also:
Constant Field Values

screenshotId

private static int screenshotId
A number for creating screenshot file names. It is incremented for each screenshot.


windowRenderer

@NotNull
private final JXCWindowRenderer windowRenderer
The renderer to use.

Constructor Detail

ScreenshotCommand

public ScreenshotCommand(@NotNull
                         JXCWindowRenderer windowRenderer,
                         @NotNull
                         CrossfireServerConnection crossfireServerConnection)
Creates a new instance.

Parameters:
windowRenderer - the renderer to use
crossfireServerConnection - the connection instance
Method Detail

allArguments

public boolean allArguments()
Returns whether all remaining commands should be included as arguments.

Returns:
whether all remaining commands should be included as arguments

execute

public void execute(@NotNull
                    java.lang.String args)
Executes the command with the given arguments.

Parameters:
args - the command arguments