FileDocCategorySizeDatePackage
TellerApp.javaAPI DocExample2589Mon Aug 28 21:18:34 BST 2000com.imaginary.bank.ui

TellerApp

public class TellerApp extends Object

Fields Summary
public static final String
LABELS
public static final String
TOOLTIPS
private static com.imaginary.util.LifoStack
cursors
private static BankFrame
frame
private static Locale
locale
private static ResourceBundle
labels
private static ResourceBundle
tooltips
Constructors Summary
Methods Summary
public static java.lang.StringgetLabel(java.lang.String code)


         
        if( labels == null ) {
            return code;
        }
        else {
            try {
                return labels.getString(code);
            }
            catch( MissingResourceException e ) {
                e.printStackTrace();
                return code;
            }
        }
    
public static java.lang.StringgetTooltip(java.lang.String code)

        if( tooltips == null ) {
            return code;
        }
        else {
            try {
                return tooltips.getString(code);
            }
            catch( MissingResourceException e ) {
                e.printStackTrace();
                return code;
            }
        }
    
private static voidloadBundles()

        try {
            tooltips = ResourceBundle.getBundle(TOOLTIPS, locale);
            labels = ResourceBundle.getBundle(LABELS,locale);
        }
        catch( MissingResourceException e ) {
            e.printStackTrace();
        }
    
public static voidmain(java.lang.String[] args)

        loadBundles();
        try {
            Identifier.login("oreilly", "oreilly");
        }
        catch( AuthenticationException e ) {
            e.printStackTrace();
            return;
        }
        frame = new BankFrame();
        frame.setVisible(true);
    
public static voidnotifyResume()

        Cursor c;

        if( cursors.isEmpty() ) {
            c = Cursor.getDefaultCursor();
        }
        else {
            c = (Cursor)cursors.pop();
        }
        frame.setCursor(c);
    
public static voidnotifyWait()

        cursors.push(frame.getCursor());
        frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    
public static voidsetLocale(java.util.Locale loc)

        locale = loc;
        loadBundles();