Static Public Member Functions | Static Public Attributes

cern.gp.util.GPManager Class Reference

List of all members.

Static Public Member Functions

static final void setStatusText (String text)
static final java.awt.Dialog createDialog (org.openide.DialogDescriptor descriptor)
static final Object notify (org.openide.NotifyDescriptor descriptor)
static final
org.openide.windows.OutputWriter 
getStdOut ()
static final
org.openide.windows.InputOutput 
getIO (String name, boolean newIO)
static final void notify (int severity, Throwable t)
static final void showURL (java.net.URL url)

Static Public Attributes

static final int ERROR = ErrorManager.ERROR
static final int EXCEPTION = ErrorManager.EXCEPTION
static final int INFORMATIONAL = ErrorManager.INFORMATIONAL
static final int UNKNOWN = ErrorManager.UNKNOWN
static final int USER = ErrorManager.USER
static final int WARNING = ErrorManager.WARNING

Detailed Description

This class must be used as a replacement for TopManager whenever TopManager has to be used. It provides the same utility methods for getting services from NetBeans. New versions of NetBeans removed TopManager completely and are changing the way those services are accessed. This class limits the impact of the changes in your code.

Author:
Lionel Mestre
Version:
Revision:
1.2
Date:
2006/09/25 08:52:36

Member Function Documentation

static final java.awt.Dialog cern.gp.util.GPManager.createDialog ( org.openide.DialogDescriptor  descriptor  )  [static]

Get a new standard dialog. The dialog is designed and created as specified in the parameter. Anyone who wants a dialog with standard buttons and standard behavior should use this method.

Do not cache the resulting dialog if it is modal and try to reuse it! Always create a new dialog using this method if you need to show a dialog again. Otherwise previously closed windows can reappear.

Parameters:
descriptor general description of the dialog
static final org.openide.windows.InputOutput cern.gp.util.GPManager.getIO ( String  name,
boolean  newIO 
) [static]

Support reading from and writing to a specific tab on the Output Window. If a tab with the supplied name already exists, a new tab with the same name will be created regardless.

Parameters:
name desired name of the tab
Returns:
an InputOutput class for accessing the new tab
static final org.openide.windows.OutputWriter cern.gp.util.GPManager.getStdOut (  )  [static]

Support writing to the Output Window on the main tab.

Returns:
a writer for the standard IDE output
static final void cern.gp.util.GPManager.notify ( int  severity,
Throwable  t 
) [static]

Prints the exception to the log file and (possibly) notifies the user.

Parameters:
everity the severity to be applied to the exception (overrides default), e.g. EXCEPTION
t the exception to notify
static final Object cern.gp.util.GPManager.notify ( org.openide.NotifyDescriptor  descriptor  )  [static]

Notify the user of something in a message box, possibly with feedback.

To support both GUI and non-GUI use, this method may be called from any thread (providing you are not holding any locks), and will block the caller's thread. In GUI mode, it will be run in the AWT event thread automatically. If you wish to hold locks, or do not need the result object immediately or at all, please make this call asynchronously (e.g. from the request processor).

Parameters:
nd description of the notification
Returns:
the option that caused the message box to be closed
static final void cern.gp.util.GPManager.setStatusText ( String  text  )  [static]

Show text in the IDE's status line. Can be called at any time, but remember the text may not be updated until the AWT event queue is ready for it - so if you are hogging the event queue the text will not appear until you release it (finish your work or display a modal dialog, for example).

Parameters:
text the text to be shown
static final void cern.gp.util.GPManager.showURL ( java.net.URL  url  )  [static]

Browse a document named by some URL. HtmlBrowser provides more control in certain cases.

Parameters:
url URL of WWW or local document to be shown
t the exception to notify

Member Data Documentation

final int cern.gp.util.GPManager.ERROR = ErrorManager.ERROR [static]

Serious problem, application may be crippled

final int cern.gp.util.GPManager.EXCEPTION = ErrorManager.EXCEPTION [static]

Something went wrong, though it can be recovered

final int cern.gp.util.GPManager.INFORMATIONAL = ErrorManager.INFORMATIONAL [static]

Message that would be useful for tracing events but which need not be a problem

final int cern.gp.util.GPManager.UNKNOWN = ErrorManager.UNKNOWN [static]

Undefined severity

final int cern.gp.util.GPManager.USER = ErrorManager.USER [static]

Something the user should be aware of

final int cern.gp.util.GPManager.WARNING = ErrorManager.WARNING [static]

Something went wrong in the software, but it is continuing and the user need not be bothered


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties