org-netbeans-swing-plaf

16:40:21.673 INFO  jd.cli.Main - Decompiling org-netbeans-swing-plaf.jar
package org.netbeans.swing.plaf;

import java.awt.Color;
import java.awt.Font;
import java.awt.Insets;
import java.util.HashMap;
import java.util.Map;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.metal.MetalLookAndFeel;
import org.netbeans.swing.plaf.util.GuaranteedValue;

final class AllLFCustoms
  extends LFCustoms
{
  public Object[] createApplicationSpecificKeysAndValues()
  {
    ColorUIResource localColorUIResource1 = new ColorUIResource(255, 0, 0);
    ColorUIResource localColorUIResource2 = new ColorUIResource(51, 51, 51);
    
    Object[] arrayOfObject = { "nb.errorForeground", localColorUIResource1, "nb.warningForeground", localColorUIResource2, "TabRenderer.selectedActivatedBackground", new GuaranteedValue(new String[] { "Table.selectionBackground", "info" }, Color.BLUE.brighter()), "TabRenderer.selectedActivatedForeground", new GuaranteedValue("Table.selectionForeground", Color.WHITE), "TabRenderer.selectedForeground", new GuaranteedValue("textText", Color.BLACK), "TabbedContainerUI", "org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI", "SlidingTabDisplayerUI", "org.netbeans.swing.tabcontrol.plaf.BasicSlidingTabDisplayerUI", "IndexButtonUI", "org.netbeans.swing.tabcontrol.plaf.SlidingTabDisplayerButtonUI", "SlidingButtonUI", "org.netbeans.swing.tabcontrol.SlidingButtonUI", "Nb.ScrollPane.Border.color", new Color(127, 157, 185), "Nb.Editor.ErrorStripe.ScrollBar.Insets", new Insets(0, 0, 0, 0), "Nb.SplitPane.dividerSize.vertical", new Integer(4), "Nb.SplitPane.dividerSize.horizontal", new Integer(4) };
    
    return arrayOfObject;
  }
  
  public Object[] createGuaranteedKeysAndValues()
  {
    int i = 11;
    Integer localInteger = (Integer)UIManager.get("customFontSize");
    int j = localInteger != null ? 1 : 0;
    if (j != 0) {
      i = localInteger.intValue();
    }
    Object[] arrayOfObject = { "control", new GuaranteedValue("control", Color.LIGHT_GRAY), "controlShadow", new GuaranteedValue("controlShadow", Color.GRAY), "controlDkShadow", new GuaranteedValue("controlDkShadow", Color.DARK_GRAY), "textText", new GuaranteedValue("textText", Color.BLACK), "controlFont", new GuaranteedValue("controlFont", new Font("Dialog", 0, i)), "nbDefaultFontSize", new Integer(11) };
    
    return arrayOfObject;
  }
  
  public static void initCustomFontSize(int paramInt)
  {
    FontUIResource localFontUIResource1 = new FontUIResource("Dialog", 0, paramInt);
    FontUIResource localFontUIResource2 = new FontUIResource("Dialog", 1, paramInt);
    FontUIResource localFontUIResource3 = new FontUIResource("Serif", 0, paramInt);
    FontUIResource localFontUIResource4 = new FontUIResource("SansSerif", 0, paramInt);
    FontUIResource localFontUIResource5 = new FontUIResource("Monospaced", 0, paramInt);
    
    HashMap localHashMap = new HashMap(5);
    
    switchFont("controlFont", localHashMap, paramInt, localFontUIResource1);
    switchFont("Button.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("ToggleButton.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("RadioButton.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("CheckBox.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("ColorChooser.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("ComboBox.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("Label.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("List.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("FileChooser.listFont", localHashMap, paramInt, localFontUIResource1);
    switchFont("MenuBar.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("MenuItem.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("MenuItem.acceleratorFont", localHashMap, paramInt, localFontUIResource1);
    switchFont("RadioButtonMenuItem.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("CheckBoxMenuItem.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("Menu.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("PopupMenu.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("OptionPane.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("OptionPane.messageFont", localHashMap, paramInt, localFontUIResource1);
    switchFont("Panel.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("ProgressBar.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("ScrollPane.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("Viewport.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("TabbedPane.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("Table.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("TableHeader.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("TextField.font", localHashMap, paramInt, localFontUIResource4);
    switchFont("PasswordField.font", localHashMap, paramInt, localFontUIResource5);
    switchFont("TextArea.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("TextPane.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("EditorPane.font", localHashMap, paramInt, localFontUIResource3);
    switchFont("TitledBorder.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("ToolBar.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("ToolTip.font", localHashMap, paramInt, localFontUIResource4);
    switchFont("Tree.font", localHashMap, paramInt, localFontUIResource1);
    switchFont("InternalFrame.titleFont", localHashMap, paramInt, localFontUIResource2);
    switchFont("windowTitleFont", localHashMap, paramInt, localFontUIResource2);
  }
  
  private static final boolean isMetal = (null != UIManager.getLookAndFeel()) && (UIManager.getLookAndFeel().getClass() == MetalLookAndFeel.class);
  private static final boolean isWindows = (null != UIManager.getLookAndFeel()) && ("Windows".equals(UIManager.getLookAndFeel().getID()));
  
  private static void switchFont(String paramString, Map<Font, Font> paramMap, int paramInt, Font paramFont)
  {
    Font localFont = UIManager.getFont(paramString);
    Object localObject = (null == localFont) || (isMetal) ? paramFont : (Font)paramMap.get(localFont);
    if (null == localObject)
    {
      if (isWindows) {
        localObject = localFont.deriveFont(paramInt);
      } else {
        localObject = new FontUIResource(localFont.getFontName(), localFont.getStyle(), paramInt);
      }
      paramMap.put(localFont, localObject);
    }
    UIManager.put(paramString, localObject);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.swing.plaf.AllLFCustoms
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.swing.plaf;

public abstract class LFCustoms
{
  private Object[] lfKeysAndValues = null;
  private Object[] appKeysAndValues = null;
  private Object[] guaranteedKeysAndValues = null;
  protected static final String WORKPLACE_FILL = "nb_workplace_fill";
  protected static final String CUSTOM_FONT_SIZE = "customFontSize";
  protected static final String DEFAULT_FONT_SIZE = "nbDefaultFontSize";
  protected static final String EDITOR_STATUS_LEFT_BORDER = "Nb.Editor.Status.leftBorder";
  protected static final String EDITOR_STATUS_INNER_BORDER = "Nb.Editor.Status.innerBorder";
  protected static final String EDITOR_STATUS_RIGHT_BORDER = "Nb.Editor.Status.rightBorder";
  protected static final String EDITOR_STATUS_ONLYONEBORDER = "Nb.Editor.Status.onlyOneBorder";
  protected static final String EDITOR_TOOLBAR_BORDER = "Nb.Editor.Toolbar.border";
  protected static final String EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS = "Nb.Editor.ErrorStripe.ScrollBar.Insets";
  protected static final String EXPLORER_STATUS_BORDER = "Nb.Explorer.Status.border";
  protected static final String EXPLORER_FOLDER_ICON = "Nb.Explorer.Folder.icon";
  protected static final String EXPLORER_FOLDER_OPENED_ICON = "Nb.Explorer.Folder.openedIcon";
  protected static final String DESKTOP_BORDER = "Nb.Desktop.border";
  public static final String SCROLLPANE_BORDER = "Nb.ScrollPane.border";
  protected static final String TOOLBAR_UI = "Nb.Toolbar.ui";
  protected static final String DESKTOP_BACKGROUND = "Nb.Desktop.background";
  public static final String SCROLLPANE_BORDER_COLOR = "Nb.ScrollPane.Border.color";
  protected static final String OUTPUT_SELECTION_BACKGROUND = "nb.output.selectionBackground";
  protected static final String OUTPUT_HYPERLINK_FOREGROUND = "nb.hyperlink.foreground";
  protected static final String OUTPUT_BACKGROUND = "nb.output.background";
  protected static final String OUTPUT_FOREGROUND = "nb.output.foreground";
  protected static final String PROPSHEET_ALTERNATE_ROW_COLOR = "Tree.altbackground";
  protected static final String PROPSHEET_SET_BACKGROUND = "PropSheet.setBackground";
  protected static final String PROPSHEET_SELECTED_SET_BACKGROUND = "PropSheet.selectedSetBackground";
  protected static final String PROPSHEET_SET_FOREGROUND = "PropSheet.setForeground";
  protected static final String PROPSHEET_SELECTED_SET_FOREGROUND = "PropSheet.selectedSetForeground";
  protected static final String PROPSHEET_DISABLED_FOREGROUND = "PropSheet.disabledForeground";
  protected static final String PROPSHEET_SELECTION_BACKGROUND = "PropSheet.selectionBackground";
  protected static final String PROPSHEET_SELECTION_FOREGROUND = "PropSheet.selectionForeground";
  protected static final String PROPSHEET_BUTTON_FOREGROUND = "PropSheet.customButtonForeground";
  protected static final String PROPSHEET_BUTTON_COLOR = "netbeans.ps.buttonColor";
  protected static final String PROPSHEET_BACKGROUND = "netbeans.ps.background";
  protected static final String PROPSHEET_ICON_MARGIN = "netbeans.ps.iconmargin";
  protected static final String PROPSHEET_ROWHEIGHT = "netbeans.ps.rowheight";
  protected static final String ERROR_FOREGROUND = "nb.errorForeground";
  protected static final String WARNING_FOREGROUND = "nb.warningForeground";
  protected static final String EDITOR_TABBED_CONTAINER_UI = "TabbedContainerUI";
  protected static final String EDITOR_TAB_DISPLAYER_UI = "EditorTabDisplayerUI";
  protected static final String VIEW_TAB_DISPLAYER_UI = "ViewTabDisplayerUI";
  protected static final String SLIDING_TAB_DISPLAYER_UI = "SlidingTabDisplayerUI";
  protected static final String SLIDING_TAB_BUTTON_UI = "IndexButtonUI";
  protected static final String SLIDING_BUTTON_UI = "SlidingButtonUI";
  protected static final String EDITOR_TAB_CONTENT_BORDER = "TabbedContainer.editor.contentBorder";
  protected static final String EDITOR_TAB_TABS_BORDER = "TabbedContainer.editor.tabsBorder";
  protected static final String EDITOR_TAB_OUTER_BORDER = "TabbedContainer.editor.outerBorder";
  protected static final String VIEW_TAB_CONTENT_BORDER = "TabbedContainer.view.contentBorder";
  protected static final String VIEW_TAB_TABS_BORDER = "TabbedContainer.view.tabsBorder";
  protected static final String VIEW_TAB_OUTER_BORDER = "TabbedContainer.view.outerBorder";
  protected static final String SLIDING_TAB_CONTENT_BORDER = "TabbedContainer.sliding.contentBorder";
  protected static final String SLIDING_TAB_TABS_BORDER = "TabbedContainer.sliding.tabsBorder";
  protected static final String SLIDING_TAB_OUTER_BORDER = "TabbedContainer.sliding.outerBorder";
  protected static final String TAB_ACTIVE_SELECTION_BACKGROUND = "TabRenderer.selectedActivatedBackground";
  protected static final String TAB_ACTIVE_SELECTION_FOREGROUND = "TabRenderer.selectedActivatedForeground";
  protected static final String TAB_SELECTION_FOREGROUND = "TabRenderer.selectedForeground";
  protected static final String TAB_SELECTION_BACKGROUND = "TabRenderer.selectedBackground";
  protected static final String EXPLORER_MINISTATUSBAR_BORDER = "nb.explorer.ministatusbar.border";
  protected static final String DESKTOP_SPLITPANE_BORDER = "nb.desktop.splitpane.border";
  protected static final String PROPERTYSHEET_BOOTSTRAP = "nb.propertysheet";
  protected static final String SPLIT_PANE_DIVIDER_SIZE_VERTICAL = "Nb.SplitPane.dividerSize.vertical";
  protected static final String SPLIT_PANE_DIVIDER_SIZE_HORIZONTAL = "Nb.SplitPane.dividerSize.horizontal";
  public static final String CONTROLFONT = "controlFont";
  public static final String SYSTEMFONT = "systemFont";
  public static final String USERFONT = "userFont";
  public static final String MENUFONT = "menuFont";
  public static final String WINDOWTITLEFONT = "windowTitleFont";
  public static final String SUBFONT = "subFont";
  public static final String LISTFONT = "List.font";
  public static final String TREEFONT = "Tree.font";
  public static final String PANELFONT = "Panel.font";
  public static final String SPINNERFONT = "Spinner.font";
  public static final String PROGRESS_CANCEL_BUTTON_ICON = "nb.progress.cancel.icon";
  public static final String PROGRESS_CANCEL_BUTTON_ROLLOVER_ICON = "nb.progress.cancel.icon.mouseover";
  public static final String PROGRESS_CANCEL_BUTTON_PRESSED_ICON = "nb.progress.cancel.icon.pressed";
  
  Object[] getLookAndFeelCustomizationKeysAndValues()
  {
    if (lfKeysAndValues == null) {
      lfKeysAndValues = createLookAndFeelCustomizationKeysAndValues();
    }
    return lfKeysAndValues;
  }
  
  Object[] getApplicationSpecificKeysAndValues()
  {
    if (appKeysAndValues == null) {
      appKeysAndValues = createApplicationSpecificKeysAndValues();
    }
    return appKeysAndValues;
  }
  
  Object[] getGuaranteedKeysAndValues()
  {
    if (guaranteedKeysAndValues == null) {
      guaranteedKeysAndValues = createGuaranteedKeysAndValues();
    }
    return guaranteedKeysAndValues;
  }
  
  Object[] allKeys()
  {
    Object[] arrayOfObject1 = additionalKeys();
    int i = arrayOfObject1 == null ? 0 : arrayOfObject1.length;
    if (appKeysAndValues != null) {
      i += appKeysAndValues.length / 2;
    }
    if (guaranteedKeysAndValues != null) {
      i += guaranteedKeysAndValues.length / 2;
    }
    if (lfKeysAndValues != null) {
      i += lfKeysAndValues.length / 2;
    }
    Object[] arrayOfObject2 = new Object[i];
    
    int j = 0;
    int k;
    if (lfKeysAndValues != null) {
      for (k = 0; k < lfKeysAndValues.length; k += 2) {
        arrayOfObject2[(j++)] = lfKeysAndValues[k];
      }
    }
    if (guaranteedKeysAndValues != null) {
      for (k = 0; k < guaranteedKeysAndValues.length; k += 2) {
        arrayOfObject2[(j++)] = guaranteedKeysAndValues[k];
      }
    }
    if (appKeysAndValues != null) {
      for (k = 0; k < appKeysAndValues.length; k += 2) {
        arrayOfObject2[(j++)] = appKeysAndValues[k];
      }
    }
    if (arrayOfObject1 != null) {
      for (k = 0; k < arrayOfObject1.length; k++) {
        arrayOfObject2[(j++)] = arrayOfObject1[k];
      }
    }
    return arrayOfObject2;
  }
  
  protected Object[] additionalKeys()
  {
    return null;
  }
  
  void disposeValues()
  {
    if (lfKeysAndValues != null) {
      disposeValues(lfKeysAndValues);
    }
    disposeValues(appKeysAndValues);
    disposeValues(guaranteedKeysAndValues);
  }
  
  private void disposeValues(Object[] paramArrayOfObject)
  {
    for (int i = 1; i < paramArrayOfObject.length; i += 2) {
      paramArrayOfObject[i] = null;
    }
  }
  
  public Object[] createLookAndFeelCustomizationKeysAndValues()
  {
    return new Object[0];
  }
  
  public Object[] createApplicationSpecificKeysAndValues()
  {
    return new Object[0];
  }
  
  public Object[] createGuaranteedKeysAndValues()
  {
    return new Object[0];
  }
}

/* Location:
 * Qualified Name:     org.netbeans.swing.plaf.LFCustoms
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.swing.plaf;

class Startup$1 {}

/* Location:
 * Qualified Name:     org.netbeans.swing.plaf.Startup.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.swing.plaf;

import javax.swing.UIDefaults;
import javax.swing.UIDefaults.ActiveValue;

final class Startup$CLValue
  implements UIDefaults.ActiveValue
{
  public ClassLoader createValue(UIDefaults paramUIDefaults)
  {
    return Startup.access$200() != null ? Startup.access$200() : Thread.currentThread().getContextClassLoader();
  }
}

/* Location:
 * Qualified Name:     org.netbeans.swing.plaf.Startup.CLValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.swing.plaf;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

class Startup$LFListener
  implements PropertyChangeListener
{
  private Startup$LFListener(Startup paramStartup) {}
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    if (("lookAndFeel".equals(paramPropertyChangeEvent.getPropertyName())) || ("win.xpstyle.themeActive".equals(paramPropertyChangeEvent.getPropertyName())))
    {
      Startup.access$300(this$0);
      Startup.access$400(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.swing.plaf.Startup.LFListener
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.swing.plaf;

import java.awt.Toolkit;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.PrintStream;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.logging.Logger;
import javax.swing.LookAndFeel;
import javax.swing.UIDefaults;
import javax.swing.UIDefaults.ActiveValue;
import javax.swing.UIManager;
import javax.swing.plaf.metal.MetalLookAndFeel;
import org.netbeans.swing.plaf.aqua.AquaLFCustoms;
import org.netbeans.swing.plaf.gtk.GtkLFCustoms;
import org.netbeans.swing.plaf.metal.MetalLFCustoms;
import org.netbeans.swing.plaf.nimbus.NimbusLFCustoms;
import org.netbeans.swing.plaf.util.NbTheme;
import org.netbeans.swing.plaf.util.RelativeColor;
import org.netbeans.swing.plaf.util.UIBootstrapValue.Lazy;
import org.netbeans.swing.plaf.util.UIUtils;
import org.netbeans.swing.plaf.winclassic.WindowsLFCustoms;
import org.netbeans.swing.plaf.winvista.VistaLFCustoms;
import org.netbeans.swing.plaf.winxp.XPLFCustoms;

public final class Startup
{
  private static final String FORCED_CUSTOMS = System.getProperty("nb.forceui");
  private static final boolean NO_CUSTOMIZATIONS = Boolean.getBoolean("netbeans.plaf.disable.ui.customizations");
  private static final String NIMBUS = "Nimbus";
  private static Startup instance = null;
  private LFCustoms curCustoms = null;
  private LFCustoms globalCustoms = null;
  private static URL themeURL = null;
  private static Class uiClass = null;
  private static ResourceBundle bundle;
  private boolean installed = false;
  private static ClassLoader loader;
  
  private Startup()
  {
    initialize();
  }
  
  private void initialize()
  {
    LookAndFeel localLookAndFeel = getLookAndFeel();
    if ((localLookAndFeel instanceof MetalLookAndFeel)) {
      installTheme(localLookAndFeel);
    }
    try
    {
      if (localLookAndFeel != UIManager.getLookAndFeel()) {
        UIManager.setLookAndFeel(localLookAndFeel);
      }
    }
    catch (Exception localException)
    {
      System.err.println("Could not install look and feel " + localLookAndFeel);
    }
  }
  
  private LookAndFeel getLookAndFeel()
  {
    if ((uiClass != null) && (uiClass.getName().contains("Nimbus"))) {
      Logger.getLogger(getClass().getName()).warning("L&F Warning: Nimbus L&F is not supported L&F yet and system may exhibit various drawing problems. Please use for experimental purposes only.");
    }
    Object localObject2;
    if (uiClass == null)
    {
      localObject1 = bundle != null ? bundle : ResourceBundle.getBundle("org.netbeans.swing.plaf.Bundle");
      localObject2 = ((ResourceBundle)localObject1).getString("LookAndFeelClassName");
      if ("default".equals(localObject2)) {
        localObject2 = defaultLaF();
      }
      try
      {
        uiClass = UIUtils.classForName((String)localObject2);
      }
      catch (ClassNotFoundException localClassNotFoundException)
      {
        System.err.println("Custom UI class " + (String)localObject2 + " not on classpath.");
        try
        {
          uiClass = UIUtils.classForName("javax.swing.plaf.metal.MetalLookAndFeel");
        }
        catch (Exception localException3)
        {
          localException3.printStackTrace();
        }
      }
      catch (Exception localException2)
      {
        System.err.println("While loading: " + (String)localObject2);
        localException2.printStackTrace();
      }
    }
    Object localObject1 = null;
    if (uiClass != null) {
      try
      {
        localObject2 = UIManager.getLookAndFeel();
        if (uiClass != localObject2.getClass()) {
          localObject1 = (LookAndFeel)uiClass.newInstance();
        } else {
          localObject1 = UIManager.getLookAndFeel();
        }
      }
      catch (Exception localException1)
      {
        System.err.println("Cannot load custom UI class " + uiClass);
        localException1.printStackTrace();
        localObject1 = UIManager.getLookAndFeel();
      }
    }
    return (LookAndFeel)localObject1;
  }
  
  private static String defaultLaF()
  {
    String str1;
    if (isWindows())
    {
      str1 = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
    }
    else if (isMac())
    {
      str1 = "apple.laf.AquaLookAndFeel";
    }
    else if (shouldUseMetal())
    {
      str1 = "javax.swing.plaf.metal.MetalLookAndFeel";
    }
    else
    {
      str1 = UIManager.getSystemLookAndFeelClassName();
      
      String str2 = System.getProperty("java.version");
      if (("1.6.0_01".compareTo(str2) > 0) && (System.getProperty("java.vm.name") != null) && (System.getProperty("java.vm.name").indexOf("OpenJDK") < 0))
      {
        if ((str1.indexOf("gtk") >= 0) && (!Boolean.getBoolean("useGtk"))) {
          str1 = "javax.swing.plaf.metal.MetalLookAndFeel";
        }
      }
      else if ((str1.indexOf("gtk") >= 0) && (System.getProperty("useGtk") != null) && (!Boolean.getBoolean("useGtk"))) {
        str1 = "javax.swing.plaf.metal.MetalLookAndFeel";
      }
      if (str1.contains("Nimbus")) {
        str1 = "javax.swing.plaf.metal.MetalLookAndFeel";
      }
    }
    return str1;
  }
  
  private void installTheme(LookAndFeel paramLookAndFeel)
  {
    if (themeURL != null)
    {
      NbTheme localNbTheme = new NbTheme(themeURL, paramLookAndFeel);
      MetalLookAndFeel.setCurrentTheme(localNbTheme);
    }
  }
  
  private void install()
  {
    if (installed) {
      return;
    }
    if (globalCustoms == null)
    {
      globalCustoms = new AllLFCustoms();
      installLFCustoms(globalCustoms);
    }
    installPerLFDefaults();
    installTheme(UIManager.getLookAndFeel());
    attachListener();
  }
  
  private void installPerLFDefaults()
  {
    int i = curCustoms != null ? 1 : 0;
    
    curCustoms = findCustoms();
    if (curCustoms != null)
    {
      Integer localInteger = (Integer)UIManager.get("customFontSize");
      if ((localInteger == null) && (UIManager.getLookAndFeel().getClass() == MetalLookAndFeel.class)) {
        localInteger = new Integer(11);
      }
      if ((localInteger != null) && (!UIUtils.isGtkLF())) {
        AllLFCustoms.initCustomFontSize(localInteger.intValue());
      }
      installLFCustoms(curCustoms);
      if (i != 0) {
        loadAllLazyValues(curCustoms);
      }
      curCustoms.disposeValues();
    }
  }
  
  private void loadAllLazyValues(LFCustoms paramLFCustoms)
  {
    if (globalCustoms != null)
    {
      loadLazy(globalCustoms.getApplicationSpecificKeysAndValues());
      loadLazy(globalCustoms.getGuaranteedKeysAndValues());
      loadLazy(globalCustoms.getLookAndFeelCustomizationKeysAndValues());
    }
    loadLazy(paramLFCustoms.getApplicationSpecificKeysAndValues());
    loadLazy(paramLFCustoms.getGuaranteedKeysAndValues());
    loadLazy(paramLFCustoms.getLookAndFeelCustomizationKeysAndValues());
  }
  
  private void loadLazy(Object[] paramArrayOfObject)
  {
    if (paramArrayOfObject.length > 0)
    {
      UIDefaults localUIDefaults = UIManager.getDefaults();
      for (int i = 1; i < paramArrayOfObject.length; i += 2)
      {
        if ((paramArrayOfObject[i] instanceof UIBootstrapValue.Lazy)) {
          ((UIBootstrapValue.Lazy)paramArrayOfObject[i]).createValue(localUIDefaults);
        }
        if ((paramArrayOfObject[i] instanceof RelativeColor)) {
          ((RelativeColor)paramArrayOfObject[i]).clear();
        }
      }
    }
  }
  
  private void uninstallPerLFDefaults()
  {
    assert (globalCustoms != null);
    if (curCustoms != null)
    {
      HashSet localHashSet = new HashSet(Arrays.asList(globalCustoms.allKeys()));
      Object[] arrayOfObject = curCustoms.allKeys();
      for (int i = 0; i < arrayOfObject.length; i++)
      {
        Object localObject = arrayOfObject[i];
        if (!localHashSet.contains(localObject)) {
          UIManager.put(localObject, null);
        }
      }
    }
  }
  
  private void attachListener()
  {
    assert (listener == null);
    listener = new LFListener(null);
    UIManager.addPropertyChangeListener(listener);
    Toolkit.getDefaultToolkit().addPropertyChangeListener("win.xpstyle.themeActive", listener);
  }
  
  private void installLFCustoms(LFCustoms paramLFCustoms)
  {
    UIDefaults localUIDefaults = UIManager.getDefaults();
    
    localUIDefaults.put("ClassLoader", new CLValue(null));
    
    localUIDefaults.putDefaults(paramLFCustoms.getGuaranteedKeysAndValues());
    
    localUIDefaults.putDefaults(paramLFCustoms.getApplicationSpecificKeysAndValues());
    if (!NO_CUSTOMIZATIONS) {
      localUIDefaults.putDefaults(paramLFCustoms.getLookAndFeelCustomizationKeysAndValues());
    }
  }
  
  public static void setClassLoader(ClassLoader paramClassLoader)
  {
    loader = paramClassLoader;
  }
  
  private static final class CLValue
    implements UIDefaults.ActiveValue
  {
    public ClassLoader createValue(UIDefaults paramUIDefaults)
    {
      return Startup.loader != null ? Startup.loader : Thread.currentThread().getContextClassLoader();
    }
  }
  
  private LFCustoms findCustoms()
  {
    if (FORCED_CUSTOMS != null)
    {
      System.err.println("Using explicitly set UI customizations: " + FORCED_CUSTOMS);
      if ("Vista".equals(FORCED_CUSTOMS)) {
        return new VistaLFCustoms();
      }
      if ("XP".equals(FORCED_CUSTOMS)) {
        return new XPLFCustoms();
      }
      if ("Aqua".equals(FORCED_CUSTOMS)) {
        return new AquaLFCustoms();
      }
      if ("Metal".equals(FORCED_CUSTOMS)) {
        return new MetalLFCustoms();
      }
      if ("Windows".equals(FORCED_CUSTOMS)) {
        return new WindowsLFCustoms();
      }
      if ("GTK".equals(FORCED_CUSTOMS)) {
        return new GtkLFCustoms();
      }
      try
      {
        return (LFCustoms)UIUtils.classForName(FORCED_CUSTOMS).newInstance();
      }
      catch (Exception localException)
      {
        System.err.println("UI customizations class not found: " + FORCED_CUSTOMS);
      }
    }
    StringBuffer localStringBuffer = new StringBuffer(40);
    localStringBuffer.append("Nb.");
    localStringBuffer.append(UIManager.getLookAndFeel().getID());
    if (UIUtils.isXPLF())
    {
      if ((isWindowsVista()) || (isWindows7())) {
        localStringBuffer.append("VistaLFCustoms");
      } else {
        localStringBuffer.append("XPLFCustoms");
      }
    }
    else {
      localStringBuffer.append("LFCustoms");
    }
    Object localObject = null;
    try
    {
      localObject = (LFCustoms)UIManager.get(localStringBuffer.toString());
    }
    catch (ClassCastException localClassCastException) {}
    if (localObject == null)
    {
      String[] arrayOfString = { "Metal", "Windows", "Aqua", "GTK", "Nimbus" };
      switch (Arrays.asList(arrayOfString).indexOf(UIManager.getLookAndFeel().getID()))
      {
      case 1: 
        if (UIUtils.isXPLF())
        {
          if ((isWindowsVista()) || (isWindows7())) {
            localObject = new VistaLFCustoms();
          } else {
            localObject = new XPLFCustoms();
          }
        }
        else {
          localObject = new WindowsLFCustoms();
        }
        break;
      case 0: 
        localObject = new MetalLFCustoms();
        break;
      case 2: 
        localObject = new AquaLFCustoms();
        break;
      case 3: 
        localObject = new GtkLFCustoms();
        break;
      case 4: 
        localObject = new NimbusLFCustoms();
        break;
      default: 
        if (UIUtils.isXPLF())
        {
          if ((isWindowsVista()) || (isWindows7())) {
            localObject = new VistaLFCustoms();
          } else {
            localObject = new XPLFCustoms();
          }
        }
        else if ((UIManager.getLookAndFeel() instanceof MetalLookAndFeel)) {
          localObject = new MetalLFCustoms();
        } else {
          localObject = new WindowsLFCustoms();
        }
        break;
      }
    }
    return (LFCustoms)localObject;
  }
  
  public static void run(Class paramClass, int paramInt, URL paramURL)
  {
    run(paramClass, paramInt, paramURL, null);
  }
  
  public static void run(Class paramClass, int paramInt, URL paramURL, ResourceBundle paramResourceBundle)
  {
    if (instance == null)
    {
      if (paramInt > 0)
      {
        Integer localInteger = new Integer(paramInt);
        UIManager.put("customFontSize", localInteger);
      }
      uiClass = paramClass;
      themeURL = paramURL;
      bundle = paramResourceBundle;
      instance = new Startup();
      instance.install();
    }
  }
  
  private static boolean isWindows()
  {
    String str = System.getProperty("os.name");
    return str.startsWith("Windows");
  }
  
  private static boolean isWindowsVista()
  {
    String str = System.getProperty("os.name");
    return (str.indexOf("Vista") >= 0) || ((str.equals("Windows NT (unknown)")) && ("6.0".equals(System.getProperty("os.version"))));
  }
  
  private static boolean isWindows7()
  {
    String str = System.getProperty("os.name");
    return (str.indexOf("Windows 7") >= 0) || ((str.equals("Windows NT (unknown)")) && ("6.1".equals(System.getProperty("os.version"))));
  }
  
  private static boolean isMac()
  {
    String str = System.getProperty("os.name");
    boolean bool = (str.startsWith("Darwin")) || ("Mac OS X".equals(str));
    return bool;
  }
  
  private static boolean isSolaris10()
  {
    String str1 = System.getProperty("os.name");
    String str2 = System.getProperty("os.version");
    boolean bool = (str1.startsWith("SunOS")) && ("5.10".equals(str2));
    return bool;
  }
  
  private static boolean shouldUseMetal()
  {
    String str = System.getProperty("os.name");
    boolean bool = ((!"Solaris".equals(str)) && (!str.startsWith("SunOS")) && (!str.endsWith("Linux"))) || (UIManager.getSystemLookAndFeelClassName().indexOf("Motif") > -1) || (isSolaris10());
    
    return bool;
  }
  
  private LFListener listener = null;
  
  private class LFListener
    implements PropertyChangeListener
  {
    private LFListener() {}
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      if (("lookAndFeel".equals(paramPropertyChangeEvent.getPropertyName())) || ("win.xpstyle.themeActive".equals(paramPropertyChangeEvent.getPropertyName())))
      {
        Startup.this.uninstallPerLFDefaults();
        Startup.this.installPerLFDefaults();
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.swing.plaf.Startup
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.swing.plaf.aqua;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Insets;
import java.awt.image.BufferedImage;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JLabel;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.border.MatteBorder;
import javax.swing.plaf.FontUIResource;
import org.netbeans.swing.plaf.LFCustoms;
import org.netbeans.swing.plaf.util.GuaranteedValue;
import org.netbeans.swing.plaf.util.UIUtils;

public final class AquaLFCustoms
  extends LFCustoms
{
  public Object[] createLookAndFeelCustomizationKeysAndValues()
  {
    Integer localInteger = (Integer)UIManager.get("customFontSize");
    Object[] arrayOfObject;
    if (localInteger != null)
    {
      int i = localInteger.intValue();
      Font localFont = new GuaranteedValue(new String[] { "controlFont", "Tree.font", "Label.font" }, new FontUIResource("Dialog", 0, i)).getFont();
      
      arrayOfObject = new Object[] { "Button.font", localFont, "Tree.font", localFont, "ToggleButton.font", localFont, "Menu.font", localFont, "MenuBar.font", localFont, "MenuItem.font", localFont, "CheckBoxMenuItem.font", localFont, "RadioButtonMenuItem.font", localFont, "PopupMenu.font", localFont, "List.font", localFont, "Label.font", localFont, "ComboBox.font", localFont, "PopupMenuSeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", "SeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", "PopupMenu.border", BorderFactory.createEmptyBorder(4, 0, 4, 0), "SlidingButtonUI", "org.netbeans.swing.tabcontrol.plaf.AquaSlidingButtonUI", "Nb.Editor.ErrorStripe.ScrollBar.Insets", new Insets(18, 0, 18, 0) };
    }
    else
    {
      arrayOfObject = new Object[] { "controlFont", new GuaranteedValue(new String[] { "Label.font", "Tree.font" }, new FontUIResource("Dialog", 0, 14)).getFont(), "PopupMenuSeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", "SeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", "PopupMenu.border", BorderFactory.createEmptyBorder(4, 0, 4, 0), "SlidingButtonUI", "org.netbeans.swing.tabcontrol.plaf.AquaSlidingButtonUI", "Nb.Editor.ErrorStripe.ScrollBar.Insets", new Insets(18, 0, 18, 0) };
    }
    return arrayOfObject;
  }
  
  public Object[] createApplicationSpecificKeysAndValues()
  {
    MatteBorder localMatteBorder = BorderFactory.createMatteBorder(1, 0, 0, 0, UIManager.getColor("controlShadow").brighter());
    
    Border localBorder = BorderFactory.createEmptyBorder();
    
    Image localImage = null;
    Icon localIcon = UIManager.getIcon("Tree.closedIcon");
    if (null != localIcon) {
      localImage = icon2Image(localIcon);
    } else {
      localImage = UIUtils.loadImage("org/netbeans/swing/plaf/resources/osx-folder.png");
    }
    Object[] arrayOfObject = { "Nb.Toolbar.ui", "org.netbeans.swing.plaf.aqua.PlainAquaToolbarUI", "Nb.Desktop.background", new Color(226, 223, 214), "Nb.ScrollPane.Border.color", new Color(127, 157, 185), "Nb.Explorer.Folder.icon", localImage, "Nb.Explorer.Folder.openedIcon", localImage, "Nb.Desktop.border", localBorder, "Nb.ScrollPane.border", UIManager.get("ScrollPane.border"), "Nb.Explorer.Status.border", localMatteBorder, "Nb.Editor.Status.leftBorder", localMatteBorder, "Nb.Editor.Status.rightBorder", localMatteBorder, "Nb.Editor.Status.innerBorder", localMatteBorder, "Nb.Editor.Status.onlyOneBorder", localMatteBorder, "Nb.Editor.Toolbar.border", BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(101, 101, 101)), "TabbedContainer.editor.outerBorder", BorderFactory.createEmptyBorder(), "TabbedContainer.view.outerBorder", BorderFactory.createEmptyBorder(), "EditorTabDisplayerUI", "org.netbeans.swing.tabcontrol.plaf.AquaEditorTabDisplayerUI", "ViewTabDisplayerUI", "org.netbeans.swing.tabcontrol.plaf.AquaViewTabDisplayerUI", "IndexButtonUI", "org.netbeans.swing.tabcontrol.plaf.SlidingTabDisplayerButtonUI$Aqua", "NbTabControl.focusedTabBackground", new Color(135, 189, 255), "NbTabControl.selectedTabBrighterBackground", new Color(252, 252, 252), "NbTabControl.selectedTabDarkerBackground", new Color(226, 226, 226), "NbTabControl.mouseoverTabBrighterBackground", new Color(194, 194, 194), "NbTabControl.mouseoverTabDarkerBackground", new Color(156, 156, 156), "NbTabControl.inactiveTabBrighterBackground", new Color(220, 220, 200), "NbTabControl.inactiveTabDarkerBackground", new Color(178, 178, 178), "NbTabControl.borderColor", new Color(49, 49, 49), "NbTabControl.borderShadowColor", new Color(178, 178, 178), "NbTabControl.borderDarkShadowColor", new Color(121, 121, 121), "NbTabControl.editorTabBackground", new Color(101, 101, 101), "NbTabControl.editorBorderShadowColor", new Color(121, 121, 121), "nb.explorer.ministatusbar.border", BorderFactory.createEmptyBorder(), "floatingBorder", FakeDropShadowBorder.createDefault(), "floatingBorder-left", FakeDropShadowBorder.createLeftBorder(), "floatingBorder-right", FakeDropShadowBorder.createRightBorder(), "floatingBorder-bottom", FakeDropShadowBorder.createBottomBorder(), "floatingBorder-top", FakeDropShadowBorder.createTopBorder(), "TabRenderer.selectedActivatedForeground", new GuaranteedValue("textText", Color.BLACK), "NbSplitPane.dividerSize", new Integer(3), "NbSplitPane.background", new Color(101, 101, 101), "nb.desktop.splitpane.border", BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(49, 49, 49)), "nb.desktop.view.insets", new Insets(3, 0, 0, 0), "Nb.SplitPane.dividerSize.vertical", new Integer(3), "Nb.SplitPane.dividerSize.horizontal", new Integer(3), "NbExplorerView.quicksearch.border", new Color(64, 64, 64), "NbExplorerView.quicksearch.background.top", new Color(197, 197, 197), "NbExplorerView.quicksearch.background.bottom", new Color(150, 150, 150), "NbExplorerView.background", new Color(226, 226, 226), "NbEditorStatusBar.background", new Color(226, 226, 226), "NbEditorGlyphGutter.background", new Color(255, 255, 255), "NbSlideBar.rollover", new Color(135, 135, 135), "NbBrushedMetal.darkShadow", new Color(49, 49, 49), "NbBrushedMetal.lightShadow", new Color(178, 178, 178), "PropSheet.selectedSetBackground", new Color(181, 213, 255), "PropSheet.selectionBackground", new Color(181, 213, 255), "PropSheet.setBackground", new Color(226, 226, 226), "PropSheet.selectionForeground", UIManager.getColor("Table.foreground"), "Tree.paintLines", Boolean.FALSE, "nbProgressBar.Foreground", new Color(49, 106, 197), "nbProgressBar.Background", Color.WHITE, "nbProgressBar.popupDynaText.foreground", new Color(141, 136, 122), "nbProgressBar.popupText.background", new Color(249, 249, 249), "nbProgressBar.popupText.foreground", UIManager.getColor("TextField.foreground"), "nbProgressBar.popupText.selectBackground", UIManager.getColor("List.selectionBackground"), "nbProgressBar.popupText.selectForeground", UIManager.getColor("List.selectionForeground"), "nb.progress.cancel.icon", UIUtils.loadImage("org/netbeans/swing/plaf/resources/cancel_task_linux_mac.png") };
    
    return arrayOfObject;
  }
  
  private static final Image icon2Image(Icon paramIcon)
  {
    BufferedImage localBufferedImage = new BufferedImage(paramIcon.getIconWidth(), paramIcon.getIconHeight(), 2);
    Graphics localGraphics = localBufferedImage.getGraphics();
    paramIcon.paintIcon(new JLabel(), localGraphics, 0, 0);
    localGraphics.dispose();
    return localBufferedImage;
  }
}

/* Location:
 * Qualified Name:     org.netbeans.swing.plaf.aqua.AquaLFCustoms
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.swing.plaf.aqua;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.JComponent;
import javax.swing.JPopupMenu;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SeparatorUI;

public class AquaSeparatorUI
  extends SeparatorUI
{
  private static final Color lineColor = new Color(215, 215, 215);
  private static ComponentUI separatorui = new AquaSeparatorUI();
  
  public static C
1 2 3 4 5 6

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd