org.openstreetmap.josm.gui.util
Class GuiHelper

java.lang.Object
  extended by org.openstreetmap.josm.gui.util.GuiHelper

public class GuiHelper
extends java.lang.Object

basic gui utils


Constructor Summary
GuiHelper()
           
 
Method Summary
static javax.swing.ImageIcon getDisabledIcon(javax.swing.ImageIcon icon)
          Replies the disabled (grayed) version of the specified icon.
static java.awt.Image getDisabledImage(java.awt.Image image)
          Replies the disabled (grayed) version of the specified image.
static void runInEDT(java.lang.Runnable task)
           
static void runInEDTAndWait(java.lang.Runnable task)
           
static void setEnabledRec(java.awt.Container root, boolean enabled)
          disable / enable a component and all its child components
static boolean warnUser(java.lang.String title, java.lang.String content, javax.swing.ImageIcon baseActionIcon, java.lang.String continueToolTip)
          returns true if the user wants to cancel, false if they want to continue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiHelper

public GuiHelper()
Method Detail

setEnabledRec

public static void setEnabledRec(java.awt.Container root,
                                 boolean enabled)
disable / enable a component and all its child components


runInEDT

public static void runInEDT(java.lang.Runnable task)

runInEDTAndWait

public static void runInEDTAndWait(java.lang.Runnable task)

warnUser

public static final boolean warnUser(java.lang.String title,
                                     java.lang.String content,
                                     javax.swing.ImageIcon baseActionIcon,
                                     java.lang.String continueToolTip)
returns true if the user wants to cancel, false if they want to continue


getDisabledImage

public static final java.awt.Image getDisabledImage(java.awt.Image image)
Replies the disabled (grayed) version of the specified image.

Parameters:
image - The image to disable
Returns:
The disabled (grayed) version of the specified image, brightened by 20%.
Since:
5484

getDisabledIcon

public static final javax.swing.ImageIcon getDisabledIcon(javax.swing.ImageIcon icon)
Replies the disabled (grayed) version of the specified icon.

Parameters:
icon - The icon to disable
Returns:
The disabled (grayed) version of the specified icon, brightened by 20%.
Since:
5484


JOSM