com.realtime.crossfire.jxclient.gui.commands
Class ScrollResetCommand

java.lang.Object
  extended by com.realtime.crossfire.jxclient.gui.commands.ScrollResetCommand
All Implemented Interfaces:
GUICommand

public class ScrollResetCommand
extends java.lang.Object
implements GUICommand

A GUICommand which resets the scroll position of a GUIScrollable.


Field Summary
private  GUIScrollable scrollable
          The scrollable gui element to reset.
 
Constructor Summary
ScrollResetCommand(GUIScrollable scrollable)
          Creates a new instance.
 
Method Summary
 boolean canExecute()
          Returns whether this command may be executed.
 void execute()
          Executes the command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scrollable

@NotNull
private final GUIScrollable scrollable
The scrollable gui element to reset.

Constructor Detail

ScrollResetCommand

public ScrollResetCommand(@NotNull
                          GUIScrollable scrollable)
Creates a new instance.

Parameters:
scrollable - the scrollable gui element to reset
Method Detail

canExecute

public boolean canExecute()
Returns whether this command may be executed.

Specified by:
canExecute in interface GUICommand
Returns:
whether this command may be executed

execute

public void execute()
Executes the command. Does nothing if called while GUICommand.canExecute() returns false.

Specified by:
execute in interface GUICommand