home *** CD-ROM | disk | FTP | other *** search
- package com.ibm.ivb.sguides;
-
- import com.ibm.ivb.sguides.basic.BasicLookAndFeel;
- import java.awt.Color;
- import java.awt.Font;
- import java.util.Enumeration;
- import java.util.Hashtable;
- import javax.swing.LookAndFeel;
- import javax.swing.UIDefaults;
- import javax.swing.UIManager;
- import javax.swing.UnsupportedLookAndFeelException;
-
- public class SmartGuideManager {
- private static final String kCBIBMCopyright = "(c) Copyright IBM Corporation 1998";
- private static SmartGuideManager manager = null;
- private static Hashtable managers;
- private Hashtable properties = new Hashtable();
- // $FF: renamed from: lf javax.swing.LookAndFeel
- private LookAndFeel field_0;
- private MultiLineListener hyperlinkListener;
-
- protected SmartGuideManager() {
- this.properties.put("BackButtonText", "<<Back");
- this.properties.put("NextButtonText", "Next>>");
- this.properties.put("BackButtonM", new Character('B'));
- this.properties.put("NextButtonM", new Character('N'));
- this.properties.put("FinishButtonText", "Finish");
- this.properties.put("FinishButtonM", new Character('F'));
- this.properties.put("CancelButtonText", "Cancel");
- this.properties.put("HelpButtonText", "Help");
- this.properties.put("NavigationButtonText", "Navigate");
- this.properties.put("IncompletePageError", "Page is not complete.");
- }
-
- /** @deprecated */
- public Font getClientFont() {
- return null;
- }
-
- /** @deprecated */
- public Color getCommonBackground() {
- return null;
- }
-
- public MultiLineListener getHyperlinkListener() {
- return this.hyperlinkListener;
- }
-
- public LookAndFeel getLookAndFeel() {
- return this.field_0;
- }
-
- public static SmartGuideManager getManager() {
- if (manager == null) {
- manager = new SmartGuideManager();
- }
-
- return manager;
- }
-
- public static SmartGuideManager getManager(String var0) {
- if (managers == null) {
- managers = new Hashtable();
- }
-
- SmartGuideManager var1 = (SmartGuideManager)managers.get(var0);
- if (var1 == null) {
- var1 = new SmartGuideManager();
- managers.put(var0, var1);
- }
-
- return var1;
- }
-
- public Object getProperty(String var1) {
- return this.properties.get(var1);
- }
-
- Hashtable getPropertyCopy() {
- return (Hashtable)this.properties.clone();
- }
-
- /** @deprecated */
- public int getUILook() {
- return 0;
- }
-
- /** @deprecated */
- public int getUIStyle() {
- return 0;
- }
-
- public void initialize() {
- this.initializeImpl(true, false);
- }
-
- public void initialize(boolean var1) {
- this.initializeImpl(true, var1);
- }
-
- void initializeImpl(boolean var1, boolean var2) {
- if (var2) {
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (ClassNotFoundException var4) {
- System.out.println(var4);
- } catch (UnsupportedLookAndFeelException var5) {
- System.out.println(var5);
- } catch (IllegalAccessException var6) {
- System.out.println(var6);
- } catch (InstantiationException var7) {
- System.out.println(var7);
- } catch (ClassCastException var8) {
- System.out.println(var8);
- }
- }
-
- if (var1) {
- this.setLookAndFeel((LookAndFeel)(new BasicLookAndFeel()));
- }
-
- }
-
- /** @deprecated */
- public boolean isImageFiltered() {
- return true;
- }
-
- public void putProperty(String var1, Object var2) {
- if (var2 != null) {
- this.properties.put(var1, var2);
- } else {
- if (this.properties.get(var1) != null) {
- this.properties.remove(var1);
- }
-
- }
- }
-
- /** @deprecated */
- public void setClientFont(Font var1) {
- }
-
- /** @deprecated */
- public void setCommonBackground(Color var1) {
- }
-
- public void setHyperlinkListener(MultiLineListener var1) {
- this.hyperlinkListener = var1;
- }
-
- /** @deprecated */
- public void setImageFiltered(boolean var1) {
- }
-
- public void setLookAndFeel(String var1) {
- if (this.field_0 == null) {
- this.initializeImpl(false, false);
- }
-
- try {
- this.field_0 = (LookAndFeel)Class.forName(var1).newInstance();
- this.setLookAndFeel(this.field_0);
- } catch (Exception var3) {
- System.out.println(var3);
- }
- }
-
- public void setLookAndFeel(LookAndFeel var1) {
- this.field_0 = var1;
- UIDefaults var2 = var1.getDefaults();
- Enumeration var3 = ((Hashtable)var2).keys();
-
- while(var3.hasMoreElements()) {
- String var4 = (String)var3.nextElement();
- UIManager.put(var4, var2.get(var4));
- }
-
- }
-
- /** @deprecated */
- public void setUILook(int var1) {
- }
-
- /** @deprecated */
- public void setUIStyle(int var1) {
- }
- }
-