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

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

public class ScrollNeverCommand
extends java.lang.Object
implements GUICommand

A GUICommand which scrolls a target GUIScrollable gui element if executed but always reports that scrolling is not possible.


Field Summary
private  int distance
          The distance to scroll.
private  GUIScrollable scrollable
          The scrollable element.
 
Constructor Summary
ScrollNeverCommand(int distance, 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

distance

private final int distance
The distance to scroll.


scrollable

@NotNull
private final GUIScrollable scrollable
The scrollable element.

Constructor Detail

ScrollNeverCommand

public ScrollNeverCommand(int distance,
                          @NotNull
                          GUIScrollable scrollable)
Creates a new instance.

Parameters:
distance - the distance to scroll
scrollable - the scrollable element
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