22 package com.realtime.crossfire.jxclient.gui.commands;
27 import java.awt.Component;
28 import org.jetbrains.annotations.NotNull;
51 target.setVisible(
false);
final Component target
The gui element to hide.
Interface defining an abstract GUI element.
void execute()
Executes the command.Does nothing if called while canExecute() returnsfalse .
Utility class for Swing related functions.
A GUICommand which hides a target GUIElement.
boolean canExecute()
Returns whether this command may be executed.whether this command may be executed ...
final Runnable executeRunnable
The Runnable that implements the functionality of execute().
HideCommand(@NotNull final Component target)
Creates a new instance.
static void invokeAndWait(@NotNull final Runnable runnable)
Calls SwingUtilities#invokeAndWait(Runnable) if not on the EDT or calls the Runnable directly if on t...