net.sourceforge.jpotpourri.util
Class GuiUtil

java.lang.Object
  extended by net.sourceforge.jpotpourri.util.GuiUtil

public class GuiUtil
extends java.lang.Object

Author:
christoph_pickl@users.sourceforge.net

Constructor Summary
protected GuiUtil()
           
 
Method Summary
static void addGlobalKeyListener(javax.swing.JComponent contentPanel, IGlobalKeyListener listener)
           
static java.lang.String convertExceptionToString(java.lang.Exception e)
           
static java.lang.String convertExceptionToString(java.lang.Exception e, boolean withCause)
           
static void enableHandCursor(java.awt.Component component)
           
static void error(javax.swing.JDialog owner, java.lang.String title, java.lang.String message)
           
static void error(javax.swing.JDialog owner, java.lang.String title, java.lang.String message, java.lang.Exception exception)
           
static void error(javax.swing.JFrame owner, java.lang.String title, java.lang.String message)
           
static void error(javax.swing.JFrame owner, java.lang.String title, java.lang.String message, java.lang.Exception exception)
           
static void error(java.lang.String title, java.lang.String message)
           
static void error(java.lang.String title, java.lang.String message, java.lang.Exception exception)
           
static void info(java.awt.Component parent, java.lang.String title, java.lang.String message)
           
static void info(java.lang.String title, java.lang.String message)
           
static javax.swing.JMenuItem newMenuItem(java.lang.String label, java.lang.String actionCmd, java.util.List<javax.swing.JMenuItem> list)
           
static void paintCenteredBackgroundImage(java.awt.Graphics g, javax.swing.JPanel panel, java.awt.Image image)
           
static void paintGradient(java.awt.Graphics2D g2, java.awt.Color colorTop, java.awt.Color colorBottom, java.awt.Dimension size)
           
static void setCenterLocation(java.awt.Component component)
           
static void setCenterLocation(java.awt.Component component, int xOffset, int yOffset)
          sets the position of given component to the center of the screen
static void warning(java.awt.Component parent, java.lang.String title, java.lang.String message)
           
static void warning(java.lang.String title, java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiUtil

protected GuiUtil()
Method Detail

setCenterLocation

public static void setCenterLocation(java.awt.Component component)

setCenterLocation

public static void setCenterLocation(java.awt.Component component,
                                     int xOffset,
                                     int yOffset)
sets the position of given component to the center of the screen

Parameters:
component - which should be placed in the center of screen

enableHandCursor

public static void enableHandCursor(java.awt.Component component)

info

public static void info(java.lang.String title,
                        java.lang.String message)

info

public static void info(java.awt.Component parent,
                        java.lang.String title,
                        java.lang.String message)

warning

public static void warning(java.lang.String title,
                           java.lang.String message)

warning

public static void warning(java.awt.Component parent,
                           java.lang.String title,
                           java.lang.String message)

error

public static void error(java.lang.String title,
                         java.lang.String message)

error

public static void error(java.lang.String title,
                         java.lang.String message,
                         java.lang.Exception exception)

error

public static void error(javax.swing.JDialog owner,
                         java.lang.String title,
                         java.lang.String message)

error

public static void error(javax.swing.JDialog owner,
                         java.lang.String title,
                         java.lang.String message,
                         java.lang.Exception exception)

error

public static void error(javax.swing.JFrame owner,
                         java.lang.String title,
                         java.lang.String message)

error

public static void error(javax.swing.JFrame owner,
                         java.lang.String title,
                         java.lang.String message,
                         java.lang.Exception exception)

addGlobalKeyListener

public static void addGlobalKeyListener(javax.swing.JComponent contentPanel,
                                        IGlobalKeyListener listener)

convertExceptionToString

public static java.lang.String convertExceptionToString(java.lang.Exception e)

convertExceptionToString

public static java.lang.String convertExceptionToString(java.lang.Exception e,
                                                        boolean withCause)

newMenuItem

public static javax.swing.JMenuItem newMenuItem(java.lang.String label,
                                                java.lang.String actionCmd,
                                                java.util.List<javax.swing.JMenuItem> list)

paintCenteredBackgroundImage

public static void paintCenteredBackgroundImage(java.awt.Graphics g,
                                                javax.swing.JPanel panel,
                                                java.awt.Image image)

paintGradient

public static void paintGradient(java.awt.Graphics2D g2,
                                 java.awt.Color colorTop,
                                 java.awt.Color colorBottom,
                                 java.awt.Dimension size)


Copyright © 2008. All Rights Reserved.