Crossfire JXClient, Trunk
Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.commands.HideCommand Class Reference
Inheritance diagram for com.realtime.crossfire.jxclient.gui.commands.HideCommand:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.gui.commands.HideCommand:
Collaboration graph

Public Member Functions

boolean canExecute ()
 
void execute ()
 
 HideCommand (@NotNull final Component target)
 

Private Attributes

final Runnable executeRunnable
 
final Component target
 

Detailed Description

A GUICommand which hides a target GUIElement.

Author
Andreas Kirschbaum

Definition at line 35 of file HideCommand.java.

Constructor & Destructor Documentation

◆ HideCommand()

com.realtime.crossfire.jxclient.gui.commands.HideCommand.HideCommand ( @NotNull final Component  target)

Creates a new instance.

Parameters
targetthe gui element to hide

Definition at line 61 of file HideCommand.java.

References com.realtime.crossfire.jxclient.gui.commands.HideCommand.target.

Member Function Documentation

◆ canExecute()

boolean com.realtime.crossfire.jxclient.gui.commands.HideCommand.canExecute ( )

Returns whether this command may be executed.

Returns
whether this command may be executed

Implements com.realtime.crossfire.jxclient.gui.commandlist.GUICommand.

Definition at line 66 of file HideCommand.java.

◆ execute()

void com.realtime.crossfire.jxclient.gui.commands.HideCommand.execute ( )

Executes the command. Does nothing if called while canExecute() returns

false

.

Implements com.realtime.crossfire.jxclient.gui.commandlist.GUICommand.

Definition at line 71 of file HideCommand.java.

References com.realtime.crossfire.jxclient.gui.commands.HideCommand.executeRunnable, and com.realtime.crossfire.jxclient.util.SwingUtilities2.invokeAndWait().

Here is the call graph for this function:

Member Data Documentation

◆ executeRunnable

final Runnable com.realtime.crossfire.jxclient.gui.commands.HideCommand.executeRunnable
private
Initial value:
= new Runnable() {
@Override
public void run() {
target.setVisible(false);
}
}

The Runnable that implements the functionality of execute().

Definition at line 48 of file HideCommand.java.

Referenced by com.realtime.crossfire.jxclient.gui.commands.HideCommand.execute().

◆ target

final Component com.realtime.crossfire.jxclient.gui.commands.HideCommand.target
private

The gui element to hide.

Definition at line 41 of file HideCommand.java.

Referenced by com.realtime.crossfire.jxclient.gui.commands.HideCommand.HideCommand().


The documentation for this class was generated from the following file:
com.realtime.crossfire.jxclient.gui.commands.HideCommand.target
final Component target
Definition: HideCommand.java:41