org.argouml.application.api
Class Argo

java.lang.Object
  |
  +--org.argouml.application.api.Argo

public class Argo
extends java.lang.Object

The Argo class provides static methods and definitions that can be used as helpers throughout the Argo code. This class is a variation of the Expert design pattern [Grand]. By incorporating a number of unrelated but commonly used methods in a single class, it attempts to decrease the complexity of the overall code while increasing its own complexity. The These include


Field Summary
static java.lang.String ARGO_CONSOLE_PREFIX
          Standard definition of system variable to add text prefix to console log.
static java.lang.String ARGO_CONSOLE_SUPPRESS
          Standard definition of the logging category for the console.
static java.lang.String ARGOINI
          argo.ini path
static java.lang.String CONSOLE_LOG
          Standard definition of the logging category for the console.
static ConfigurationKey KEY_EDEM
          Key to report usage statistics.
static ConfigurationKey KEY_LOOK_AND_FEEL_CLASS
          Key for look and feel class name
static ConfigurationKey KEY_MOST_RECENT_PROJECT_FILE
          Key for last saved project URL.
static ConfigurationKey KEY_NUMBER_LAST_RECENT_USED
          Key for number of last recently used file entries in menu list
static ConfigurationKey KEY_PRELOAD
          Key to preload classes.
static ConfigurationKey KEY_PROFILE
          Key to profile initialization.
static ConfigurationKey KEY_RELOAD_RECENT_PROJECT
          Key to reload last saved project on startup.
static ConfigurationKey KEY_SCREEN_EAST_WIDTH
          Key for east pane width
static ConfigurationKey KEY_SCREEN_HEIGHT
          Key for screen height
static ConfigurationKey KEY_SCREEN_LEFT_X
          Key for screen left
static ConfigurationKey KEY_SCREEN_NORTH_HEIGHT
          Key for north pane height
static ConfigurationKey KEY_SCREEN_NORTHEAST_WIDTH
          Key for northeast pane width
static ConfigurationKey KEY_SCREEN_NORTHWEST_WIDTH
          Key for northwest pane width
static ConfigurationKey KEY_SCREEN_SOUTH_HEIGHT
          Key for south pane height
static ConfigurationKey KEY_SCREEN_SOUTHEAST_WIDTH
          Key for southeast pane width
static ConfigurationKey KEY_SCREEN_SOUTHWEST_WIDTH
          Key for southwest pane width
static ConfigurationKey KEY_SCREEN_THEME
          Key for theme
static ConfigurationKey KEY_SCREEN_TOP_Y
          Key for screen top
static ConfigurationKey KEY_SCREEN_WEST_WIDTH
          Key for west pane width
static ConfigurationKey KEY_SCREEN_WIDTH
          Key for screen width
static ConfigurationKey KEY_SMOOTH_EDGES
          Key to enable smooth edges of diagram text and lines (anti-aliasing).
static ConfigurationKey KEY_SPLASH
          Key to show splash screen.
static ConfigurationKey KEY_STARTUP_DIR
          Key for default startup directory.
static ConfigurationKey KEY_THEME_CLASS
          Key for theme class name
static ConfigurationKey KEY_USER_EMAIL
          Key for user email address
static ConfigurationKey KEY_USER_EXPLORER_PERSPECTIVES
          Key for user explorer perspectives.
static ConfigurationKey KEY_USER_FULLNAME
          Key for user full name
static ConfigurationKey KEY_USER_IMPORT_CLASSPATH
          Key for user java reverse engineering classpath
static Logger log
          Deprecated. as of 0.15.2. Use your own instance of Logger in each class.
static java.lang.String MENU_BUNDLE
          Deprecated. in 0.15.1. Replaced by menu and action properties.
static java.lang.String RESOURCEDIR
          Key for argo resource directory.
 
Constructor Summary
private Argo()
          Don't let this class be instantiated.
 
Method Summary
static java.lang.String getArgoHome()
          Convenience helper to access the argo home directory
static java.lang.String getArgoRoot()
          Convenience helper to access the argo root directory
static java.lang.String getDirectory()
          Get the default startup directory.
static java.util.ArrayList getPlugins(java.lang.Class pluginType)
          Returns a vector of all plugins of the class type passed.
static java.util.ArrayList getPlugins(java.lang.Class pluginType, java.lang.Object[] context)
          Returns a vector of plugins of the class type passed which satisfy both of the contexts required.
static void initializeModules()
          Initializes the module loader.
static java.lang.String localize(java.lang.String bundle, java.lang.String key)
          Deprecated. since 0.15.2. Use {see org.argouml.i18n.Translator#localize(String)} directly instead.
static javax.swing.Icon lookupIconResource(java.lang.String arg1)
          Look up an icon resource.
static javax.swing.Icon lookupIconResource(java.lang.String arg1, java.lang.String arg2)
          Look up an icon resource.
static void setDirectory(java.lang.String dir)
          Change the default startup directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCEDIR

public static final java.lang.String RESOURCEDIR
Key for argo resource directory.

See Also:
Constant Field Values

ARGOINI

public static final java.lang.String ARGOINI
argo.ini path

See Also:
Constant Field Values

MENU_BUNDLE

public static final java.lang.String MENU_BUNDLE
Deprecated. in 0.15.1. Replaced by menu and action properties.

Key for menu resource bundle.

See Also:
Constant Field Values

KEY_STARTUP_DIR

public static final ConfigurationKey KEY_STARTUP_DIR
Key for default startup directory.


KEY_SPLASH

public static final ConfigurationKey KEY_SPLASH
Key to show splash screen.


KEY_PRELOAD

public static final ConfigurationKey KEY_PRELOAD
Key to preload classes.


KEY_EDEM

public static final ConfigurationKey KEY_EDEM
Key to report usage statistics.


KEY_PROFILE

public static final ConfigurationKey KEY_PROFILE
Key to profile initialization.


KEY_MOST_RECENT_PROJECT_FILE

public static final ConfigurationKey KEY_MOST_RECENT_PROJECT_FILE
Key for last saved project URL.


KEY_RELOAD_RECENT_PROJECT

public static final ConfigurationKey KEY_RELOAD_RECENT_PROJECT
Key to reload last saved project on startup.


KEY_NUMBER_LAST_RECENT_USED

public static final ConfigurationKey KEY_NUMBER_LAST_RECENT_USED
Key for number of last recently used file entries in menu list


KEY_SCREEN_TOP_Y

public static final ConfigurationKey KEY_SCREEN_TOP_Y
Key for screen top


KEY_SCREEN_LEFT_X

public static final ConfigurationKey KEY_SCREEN_LEFT_X
Key for screen left


KEY_SCREEN_WIDTH

public static final ConfigurationKey KEY_SCREEN_WIDTH
Key for screen width


KEY_SCREEN_HEIGHT

public static final ConfigurationKey KEY_SCREEN_HEIGHT
Key for screen height


KEY_SCREEN_SOUTHWEST_WIDTH

public static final ConfigurationKey KEY_SCREEN_SOUTHWEST_WIDTH
Key for southwest pane width


KEY_SCREEN_NORTHWEST_WIDTH

public static final ConfigurationKey KEY_SCREEN_NORTHWEST_WIDTH
Key for northwest pane width


KEY_SCREEN_SOUTHEAST_WIDTH

public static final ConfigurationKey KEY_SCREEN_SOUTHEAST_WIDTH
Key for southeast pane width


KEY_SCREEN_NORTHEAST_WIDTH

public static final ConfigurationKey KEY_SCREEN_NORTHEAST_WIDTH
Key for northeast pane width


KEY_SCREEN_WEST_WIDTH

public static final ConfigurationKey KEY_SCREEN_WEST_WIDTH
Key for west pane width


KEY_SCREEN_EAST_WIDTH

public static final ConfigurationKey KEY_SCREEN_EAST_WIDTH
Key for east pane width


KEY_SCREEN_SOUTH_HEIGHT

public static final ConfigurationKey KEY_SCREEN_SOUTH_HEIGHT
Key for south pane height


KEY_SCREEN_NORTH_HEIGHT

public static final ConfigurationKey KEY_SCREEN_NORTH_HEIGHT
Key for north pane height


KEY_SCREEN_THEME

public static final ConfigurationKey KEY_SCREEN_THEME
Key for theme


KEY_LOOK_AND_FEEL_CLASS

public static final ConfigurationKey KEY_LOOK_AND_FEEL_CLASS
Key for look and feel class name


KEY_THEME_CLASS

public static final ConfigurationKey KEY_THEME_CLASS
Key for theme class name


KEY_SMOOTH_EDGES

public static final ConfigurationKey KEY_SMOOTH_EDGES
Key to enable smooth edges of diagram text and lines (anti-aliasing).


KEY_USER_EMAIL

public static final ConfigurationKey KEY_USER_EMAIL
Key for user email address


KEY_USER_FULLNAME

public static final ConfigurationKey KEY_USER_FULLNAME
Key for user full name


KEY_USER_IMPORT_CLASSPATH

public static final ConfigurationKey KEY_USER_IMPORT_CLASSPATH
Key for user java reverse engineering classpath


KEY_USER_EXPLORER_PERSPECTIVES

public static final ConfigurationKey KEY_USER_EXPLORER_PERSPECTIVES
Key for user explorer perspectives.
 format:
 perspective name,rule,rule,rule;perspective name, etc


CONSOLE_LOG

public static final java.lang.String CONSOLE_LOG
Standard definition of the logging category for the console.

See Also:
Constant Field Values

ARGO_CONSOLE_SUPPRESS

public static final java.lang.String ARGO_CONSOLE_SUPPRESS
Standard definition of the logging category for the console.

See Also:
Constant Field Values

ARGO_CONSOLE_PREFIX

public static final java.lang.String ARGO_CONSOLE_PREFIX
Standard definition of system variable to add text prefix to console log.

See Also:
Constant Field Values

log

public static final Logger log
Deprecated. as of 0.15.2. Use your own instance of Logger in each class.

Define a static log4j category variable for ArgoUML to do logging for classes that don't have a Logger object of their own.

Constructor Detail

Argo

private Argo()
Don't let this class be instantiated.

Method Detail

setDirectory

public static void setDirectory(java.lang.String dir)
Change the default startup directory.

Parameters:
dir - the directory to save

getDirectory

public static java.lang.String getDirectory()
Get the default startup directory.

Returns:
the startup directory

localize

public static java.lang.String localize(java.lang.String bundle,
                                        java.lang.String key)
Deprecated. since 0.15.2. Use {see org.argouml.i18n.Translator#localize(String)} directly instead.

Helper for localization to eliminate the need to import the gef util library. DON'T USE IT : NOT USED ANYMORE, WILL BE REMOVED NEXT RELEASE

Parameters:
bundle - the localization bundle name to use
key - the resource string to find
Returns:
the localized string

getPlugins

public static final java.util.ArrayList getPlugins(java.lang.Class pluginType,
                                                   java.lang.Object[] context)
Returns a vector of plugins of the class type passed which satisfy both of the contexts required. If no plugins are available, returns null.

Parameters:
pluginType - class of the plugin to search for
context - plugin-specific query parameters
Returns:
a vector of plugins or null

getPlugins

public static final java.util.ArrayList getPlugins(java.lang.Class pluginType)
Returns a vector of all plugins of the class type passed. If no plugins are available, returns null.

Parameters:
pluginType - class of the plugin to search for
Returns:
a vector of plugins or null

initializeModules

public static final void initializeModules()
Initializes the module loader. Multiple calls are ignored.


getArgoHome

public static java.lang.String getArgoHome()
Convenience helper to access the argo home directory

Returns:
the argo home directory

getArgoRoot

public static java.lang.String getArgoRoot()
Convenience helper to access the argo root directory

Returns:
the argo root directory

lookupIconResource

public static javax.swing.Icon lookupIconResource(java.lang.String arg1)
Look up an icon resource.

Parameters:
arg1 - the name of the resource to find.
Returns:
an Icon

lookupIconResource

public static javax.swing.Icon lookupIconResource(java.lang.String arg1,
                                                  java.lang.String arg2)
Look up an icon resource.

Parameters:
arg1 - the name of the resource to find.
arg2 - the description of the resource
Returns:
an Icon


ArgoUML © 1996-2004 (20040306)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook