org-openide-options

16:40:41.139 INFO  jd.cli.Main - Decompiling org-openide-options.jar
package org.openide.explorer.propertysheet;

import java.awt.Color;
import org.openide.options.SystemOption;
import org.openide.util.HelpCtx;

/**
 * @deprecated
 */
public class PropertySheetSettings
  extends SystemOption
{
  static final long serialVersionUID = -3820718202747868830L;
  static int propertyPaintingStyle = -1;
  static boolean plastic = false;
  static boolean displayWritableOnly = false;
  static int sortingMode = -1;
  static Color valueColor = null;
  private static Color disabledColor;
  static PropertySheetSettings propertySheetSettings = null;
  
  static PropertySheetSettings getDefault()
  {
    return propertySheetSettings;
  }
  
  public String displayName()
  {
    return null;
  }
  
  public HelpCtx getHelpCtx()
  {
    return null;
  }
  
  public void setPropertyPaintingStyle(int paramInt) {}
  
  public int getPropertyPaintingStyle()
  {
    return -1;
  }
  
  public void setSortingMode(int paramInt) {}
  
  public int getSortingMode()
  {
    return -1;
  }
  
  public void setPlastic(boolean paramBoolean) {}
  
  public boolean getPlastic()
  {
    return false;
  }
  
  public void setValueColor(Color paramColor) {}
  
  public Color getValueColor()
  {
    return null;
  }
  
  public void setDisabledPropertyColor(Color paramColor) {}
  
  public Color getDisabledPropertyColor()
  {
    return null;
  }
  
  public void setDisplayWritableOnly(boolean paramBoolean) {}
  
  public boolean getDisplayWritableOnly()
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     org.openide.explorer.propertysheet.PropertySheetSettings
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

import java.util.Comparator;

class ContextSystemOption$ClassComparator
  implements Comparator
{
  public int compare(Object paramObject1, Object paramObject2)
  {
    return paramObject1.getClass().getName().compareTo(paramObject2.getClass().getName());
  }
}

/* Location:
 * Qualified Name:     org.openide.options.ContextSystemOption.ClassComparator
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.beancontext.BeanContextSupport;

class ContextSystemOption$OptionBeanContext
  extends BeanContextSupport
  implements PropertyChangeListener
{
  private static final long serialVersionUID = 3532434266136225440L;
  private ContextSystemOption parent = null;
  
  public ContextSystemOption$OptionBeanContext(ContextSystemOption paramContextSystemOption)
  {
    parent = paramContextSystemOption;
  }
  
  public boolean add(Object paramObject)
  {
    if (!(paramObject instanceof SystemOption)) {
      throw new IllegalArgumentException("Not a SystemOption: " + paramObject);
    }
    boolean bool = super.add(paramObject);
    if (bool) {
      ((SystemOption)paramObject).addPropertyChangeListener(this);
    }
    return bool;
  }
  
  public boolean remove(Object paramObject)
  {
    if (!(paramObject instanceof SystemOption)) {
      throw new IllegalArgumentException("Not a SystemOption: " + paramObject);
    }
    boolean bool = super.remove(paramObject);
    if (bool) {
      ((SystemOption)paramObject).removePropertyChangeListener(this);
    }
    return bool;
  }
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    if (parent != null) {
      parent.firePropertyChange(paramPropertyChangeEvent.getPropertyName(), paramPropertyChangeEvent.getOldValue(), paramPropertyChangeEvent.getNewValue());
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.options.ContextSystemOption.OptionBeanContext
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.beancontext.BeanContext;
import java.beans.beancontext.BeanContextChild;
import java.beans.beancontext.BeanContextProxy;
import java.beans.beancontext.BeanContextSupport;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Arrays;
import java.util.Comparator;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openide.util.io.NbMarshalledObject;

public abstract class ContextSystemOption
  extends SystemOption
  implements BeanContextProxy
{
  private static Object ctxt = new Object();
  private static final long serialVersionUID = -781528552645947127L;
  /**
   * @deprecated
   */
  protected BeanContext beanContext;
  
  public ContextSystemOption()
  {
    beanContext = getBeanContext();
  }
  
  public final void addOption(SystemOption paramSystemOption)
  {
    getBeanContext().add(paramSystemOption);
  }
  
  public final void removeOption(SystemOption paramSystemOption)
  {
    getBeanContext().remove(paramSystemOption);
  }
  
  public final SystemOption[] getOptions()
  {
    Object[] arrayOfObject = getBeanContext().toArray();
    
    int i = 0;
    for (int j = 0; i < arrayOfObject.length; i++) {
      if ((arrayOfObject[i] instanceof SystemOption))
      {
        if (i > j) {
          arrayOfObject[j] = arrayOfObject[i];
        }
        j++;
      }
    }
    SystemOption[] arrayOfSystemOption = new SystemOption[j];
    System.arraycopy(arrayOfObject, 0, arrayOfSystemOption, 0, j);
    
    return arrayOfSystemOption;
  }
  
  public final BeanContextChild getBeanContextProxy()
  {
    return getBeanContext();
  }
  
  private BeanContext getBeanContext()
  {
    return (BeanContext)getProperty(ctxt);
  }
  
  protected void initialize()
  {
    super.initialize();
    putProperty(ctxt, new OptionBeanContext(this));
  }
  
  public void writeExternal(ObjectOutput paramObjectOutput)
    throws IOException
  {
    super.writeExternal(paramObjectOutput);
    
    Object[] arrayOfObject = getBeanContext().toArray();
    Arrays.sort(arrayOfObject, new ClassComparator());
    for (int i = 0; i < arrayOfObject.length; i++) {
      paramObjectOutput.writeObject(new NbMarshalledObject(arrayOfObject[i]));
    }
    paramObjectOutput.writeObject(null);
  }
  
  public void readExternal(ObjectInput paramObjectInput)
    throws IOException, ClassNotFoundException
  {
    super.readExternal(paramObjectInput);
    
    Object localObject = paramObjectInput.readObject();
    if ((localObject instanceof BeanContext))
    {
      beanContext = ((BeanContext)localObject);
    }
    else
    {
      BeanContext localBeanContext = getBeanContext();
      while (localObject != null)
      {
        NbMarshalledObject localNbMarshalledObject = (NbMarshalledObject)localObject;
        try
        {
          localBeanContext.add(localNbMarshalledObject.get());
        }
        catch (Exception localException)
        {
          Logger.getLogger(ContextSystemOption.class.getName()).log(Level.WARNING, null, localException);
        }
        catch (LinkageError localLinkageError)
        {
          Logger.getLogger(ContextSystemOption.class.getName()).log(Level.WARNING, null, localLinkageError);
        }
        localObject = paramObjectInput.readObject();
      }
    }
  }
  
  private static class ClassComparator
    implements Comparator
  {
    public int compare(Object paramObject1, Object paramObject2)
    {
      return paramObject1.getClass().getName().compareTo(paramObject2.getClass().getName());
    }
  }
  
  private static class OptionBeanContext
    extends BeanContextSupport
    implements PropertyChangeListener
  {
    private static final long serialVersionUID = 3532434266136225440L;
    private ContextSystemOption parent = null;
    
    public OptionBeanContext(ContextSystemOption paramContextSystemOption)
    {
      parent = paramContextSystemOption;
    }
    
    public boolean add(Object paramObject)
    {
      if (!(paramObject instanceof SystemOption)) {
        throw new IllegalArgumentException("Not a SystemOption: " + paramObject);
      }
      boolean bool = super.add(paramObject);
      if (bool) {
        ((SystemOption)paramObject).addPropertyChangeListener(this);
      }
      return bool;
    }
    
    public boolean remove(Object paramObject)
    {
      if (!(paramObject instanceof SystemOption)) {
        throw new IllegalArgumentException("Not a SystemOption: " + paramObject);
      }
      boolean bool = super.remove(paramObject);
      if (bool) {
        ((SystemOption)paramObject).removePropertyChangeListener(this);
      }
      return bool;
    }
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      if (parent != null) {
        parent.firePropertyChange(paramPropertyChangeEvent.getPropertyName(), paramPropertyChangeEvent.getOldValue(), paramPropertyChangeEvent.getNewValue());
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.options.ContextSystemOption
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import org.openide.util.Exceptions;

public class ContextSystemOptionBeanInfo
  extends SimpleBeanInfo
{
  public BeanInfo[] getAdditionalBeanInfo()
  {
    try
    {
      return new BeanInfo[] { Introspector.getBeanInfo(SystemOption.class) };
    }
    catch (IntrospectionException localIntrospectionException)
    {
      Exceptions.printStackTrace(localIntrospectionException);
    }
    return null;
  }
  
  public PropertyDescriptor[] getPropertyDescriptors()
  {
    try
    {
      PropertyDescriptor localPropertyDescriptor1 = new PropertyDescriptor("beanContextProxy", ContextSystemOption.class, "getBeanContextProxy", null);
      localPropertyDescriptor1.setHidden(true);
      PropertyDescriptor localPropertyDescriptor2 = new PropertyDescriptor("options", ContextSystemOption.class, "getOptions", null);
      localPropertyDescriptor2.setHidden(true);
      return new PropertyDescriptor[] { localPropertyDescriptor1, localPropertyDescriptor2 };
    }
    catch (IntrospectionException localIntrospectionException)
    {
      Exceptions.printStackTrace(localIntrospectionException);
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.openide.options.ContextSystemOptionBeanInfo
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

final class SystemOption$Box
{
  public Object value;
  
  public SystemOption$Box(Object paramObject)
  {
    value = paramObject;
  }
}

/* Location:
 * Qualified Name:     org.openide.options.SystemOption.Box
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openide.util.Exceptions;
import org.openide.util.HelpCtx;
import org.openide.util.HelpCtx.Provider;
import org.openide.util.NbBundle;
import org.openide.util.SharedClassObject;
import org.openide.util.Utilities;

/**
 * @deprecated
 */
public abstract class SystemOption
  extends SharedClassObject
  implements HelpCtx.Provider
{
  static final long serialVersionUID = 558589201969066966L;
  private static final Object PROP_LOADING = new Object();
  private static final Object PROP_STORING = new Object();
  private static final Object PROP_ORIGINAL_VALUES = new Object();
  private static final Object NULL = new Object();
  
  protected void firePropertyChange(String paramString, Object paramObject1, Object paramObject2)
  {
    if ((paramString != null) && (getProperty("org.openide.util.SharedClassObject.initialize") == null))
    {
      Object localObject = (Map)getProperty(PROP_ORIGINAL_VALUES);
      if (localObject == null)
      {
        localObject = new HashMap();
        putProperty(PROP_ORIGINAL_VALUES, localObject);
      }
      if (((Map)localObject).get(paramString) == null) {
        if (getProperty(paramString) == null) {
          ((Map)localObject).put(paramString, new Box(paramObject1));
        } else {
          ((Map)localObject).put(paramString, paramObject1 == null ? NULL : paramObject1);
        }
      }
    }
    if (getProperty(PROP_LOADING) != null)
    {
      putProperty(PROP_LOADING, PROP_LOADING);
      
      return;
    }
    super.firePropertyChange(paramString, paramObject1, paramObject2);
  }
  
  protected void reset()
  {
    synchronized (getLock())
    {
      Map localMap = (Map)getProperty(PROP_ORIGINAL_VALUES);
      if ((localMap == null) || (localMap.isEmpty())) {
        return;
      }
      Iterator localIterator = localMap.entrySet().iterator();
      while (localIterator.hasNext())
      {
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        if ((localEntry.getValue() instanceof Box))
        {
          Object localObject1 = getValuevalue;
          try
          {
            BeanInfo localBeanInfo = Utilities.getBeanInfo(getClass(), SystemOption.class);
            PropertyDescriptor[] arrayOfPropertyDescriptor = localBeanInfo.getPropertyDescriptors();
            for (int i = 0;; i++)
            {
              if (i >= arrayOfPropertyDescriptor.length) {
                break label205;
              }
              if (localEntry.getKey().equals(arrayOfPropertyDescriptor[i].getName()))
              {
                Method localMethod = arrayOfPropertyDescriptor[i].getWriteMethod();
                if (localMethod != null) {
                  localMethod.invoke(this, new Object[] { localObject1 });
                }
                break;
              }
            }
          }
          catch (InvocationTargetException localInvocationTargetException)
          {
            Logger.getLogger(SystemOption.class.getName()).log(Level.WARNING, null, localInvocationTargetException);
          }
          catch (IllegalAccessException localIllegalAccessException)
          {
            Logger.getLogger(SystemOption.class.getName()).log(Level.WARNING, null, localIllegalAccessException);
          }
          catch (IntrospectionException localIntrospectionException)
          {
            label205:
            Logger.getLogger(SystemOption.class.getName()).log(Level.WARNING, null, localIntrospectionException);
          }
        }
        else
        {
          putProperty(localEntry.getKey(), localEntry.getValue() == NULL ? null : localEntry.getValue());
        }
      }
      putProperty(PROP_ORIGINAL_VALUES, null);
    }
    super.firePropertyChange(null, null, null);
  }
  
  public void writeExternal(ObjectOutput paramObjectOutput)
    throws IOException
  {
    try
    {
      BeanInfo localBeanInfo = Utilities.getBeanInfo(getClass(), SystemOption.class);
      PropertyDescriptor[] arrayOfPropertyDescriptor = localBeanInfo.getPropertyDescriptors();
      
      putProperty(PROP_STORING, this);
      
      Object[] arrayOfObject = new Object[0];
      synchronized (getLock())
      {
        for (int i = 0; i < arrayOfPropertyDescriptor.length; i++) {
          if (arrayOfPropertyDescriptor[i].getWriteMethod() != null)
          {
            String str = arrayOfPropertyDescriptor[i].getName();
            Object localObject1 = getProperty(str);
            
            Method localMethod = arrayOfPropertyDescriptor[i].getReadMethod();
            if (localMethod != null)
            {
              int j;
              if ((localObject1 == null) || (isInstance(arrayOfPropertyDescriptor[i].getPropertyType(), localObject1)))
              {
                j = 1;
                try
                {
                  localObject1 = localMethod.invoke(this, arrayOfObject);
                }
                catch (InvocationTargetException localInvocationTargetException)
                {
                  throw ((IOException)new IOException(NbBundle.getMessage(SystemOption.class, "EXC_InGetter", getClass(), arrayOfPropertyDescriptor[i].getName())).initCause(localInvocationTargetException));
                }
                catch (IllegalAccessException localIllegalAccessException)
                {
                  throw ((IOException)new IOException(NbBundle.getMessage(SystemOption.class, "EXC_InGetter", getClass(), arrayOfPropertyDescriptor[i].getName())).initCause(localIllegalAccessException));
                }
              }
              else
              {
                j = 0;
              }
              paramObjectOutput.writeObject(str);
              
              paramObjectOutput.writeObject(localObject1);
              
              paramObjectOutput.writeObject(j != 0 ? Boolean.TRUE : Boolean.FALSE);
            }
          }
        }
      }
    }
    catch (IntrospectionException localIntrospectionException) {}finally
    {
      putProperty(PROP_STORING, null);
    }
    paramObjectOutput.writeObject(null);
  }
  
  private static boolean isInstance(Class paramClass, Object paramObject)
  {
    return (paramClass.isInstance(paramObject)) || ((paramClass == Byte.TYPE) && ((paramObject instanceof Byte))) || ((paramClass == Short.TYPE) && ((paramObject instanceof Short))) || ((paramClass == Integer.TYPE) && ((paramObject instanceof Integer))) || ((paramClass == Long.TYPE) && ((paramObject instanceof Long))) || ((paramClass == Float.TYPE) && ((paramObject instanceof Float))) || ((paramClass == Double.TYPE) && ((paramObject instanceof Double))) || ((paramClass == Boolean.TYPE) && ((paramObject instanceof Boolean))) || ((paramClass == Character.TYPE) && ((paramObject instanceof Character)));
  }
  
  public void readExternal(ObjectInput paramObjectInput)
    throws IOException, ClassNotFoundException
  {
    HashMap localHashMap = new HashMap();
    try
    {
      synchronized (getLock())
      {
        putProperty(PROP_LOADING, this);
        Object localObject1;
        Object localObject3;
        try
        {
          BeanInfo localBeanInfo = Utilities.getBeanInfo(getClass(), SystemOption.class);
          localObject1 = localBeanInfo.getPropertyDescriptors();
          for (int i = 0; i < localObject1.length; i++)
          {
            localObject3 = localObject1[i].getWriteMethod();
            
            localHashMap.put(localObject1[i].getName(), localObject3);
          }
        }
        catch (IntrospectionException localIntrospectionException)
        {
          Logger.getLogger(SystemOption.class.getName()).log(Level.WARNING, null, localIntrospectionException);
        }
        String str1 = null;
        for (;;)
        {
          if (str1 != null)
          {
            localObject1 = str1;
            str1 = null;
          }
          else
          {
            localObject1 = (String)paramObjectInput.readObject();
          }
          if (localObject1 == null) {
            break;
          }
          Object localObject2 = paramObjectInput.readObject();
          
          localObject3 = paramObjectInput.readObject();
          
          int j = 0;
          boolean bool;
          if (localObject3 == null)
          {
            bool = true;
            j = 1;
          }
          else if ((localObject3 instanceof String))
          {
            bool = true;
            str1 = (String)localObject3;
          }
          else
          {
            bool = ((Boolean)localObject3).booleanValue();
          }
          if (bool)
          {
            Method localMethod = (Method)localHashMap.get(localObject1);
            if (localMethod != null) {
              try
              {
                localMethod.invoke(this, new Object[] { localObject2 });
              }
              catch (Exception localException)
              {
                String str2 = "Cannot call " + localMethod + " for property " + getClass().getName() + "." + (String)localObject1;
                
                Exceptions.attachMessage(localException, str2);
                Logger.getLogger(SystemOption.class.getName()).log(Level.WARNING, null, localException);
              }
            }
          }
          else
          {
            putProperty((String)localObject1, localObject2, false);
          }
          if (j != 0) {
            break;
          }
        }
      }
    }
    finally
    {
      if (this != getProperty(PROP_LOADING))
      {
        putProperty(PROP_LOADING, null);
        firePropertyChange(null, null, null);
      }
      else
      {
        putProperty(PROP_LOADING, null);
      }
    }
  }
  
  protected boolean clearSharedData()
  {
    return false;
  }
  
  public final String getName()
  {
    return displayName();
  }
  
  public abstract String displayName();
  
  public HelpCtx getHelpCtx()
  {
    return new HelpCtx(SystemOption.class);
  }
  
  protected final boolean isReadExternal()
  {
    return getProperty(PROP_LOADING) != null;
  }
  
  protected final boolean isWriteExternal()
  {
    return getProperty(PROP_STORING) != null;
  }
  
  private static final class Box
  {
    public Object value;
    
    public Box(Object paramObject)
    {
      value = paramObject;
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.options.SystemOption
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import org.openide.util.Exceptions;

public class SystemOptionBeanInfo
  extends SimpleBeanInfo
{
  public PropertyDescriptor[] getPropertyDescriptors()
  {
    try
    {
      PropertyDescriptor localPropertyDescriptor1 = new PropertyDescriptor("name", SystemOption.class, "getName", null);
      localPropertyDescriptor1.setHidden(true);
      PropertyDescriptor localPropertyDescriptor2 = new PropertyDescriptor("helpCtx", SystemOption.class, "getHelpCtx", null);
      localPropertyDescriptor2.setHidden(true);
      return new PropertyDescriptor[] { localPropertyDescriptor1, localPropertyDescriptor2 };
    }
    catch (IntrospectionException localIntrospectionException)
    {
      Exceptions.printStackTrace(localIntrospectionException);
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.openide.options.SystemOptionBeanInfo
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.options;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
import java.util.HashSet;
import java.util.Iterator;

public abstract class VetoSystemOption
  extends SystemOption
{
  static final long serialVersionUID = -614731095908156413L;
  private static final String PROP_VETO_SUPPORT = "vetoSupport";
  
  private HashSet getVeto()
  {
    HashSet localHashSet = (HashSet)getProperty("vetoSupport");
    if (localHashSet == null)
    {
      localHashSet = new HashSet();
      putProperty("vetoSupport", localHashSet);
    }
    return localHashSet;
  }
  
  public final void addVetoableChangeListener(VetoableChangeListener paramVetoableChangeListener)
  {
    synchronized (getLock())
    {
      getVeto().add(paramVetoableChangeListener);
    }
  }
  
  public final void removeVetoableChangeListener(VetoableChangeListener paramVetoableChangeListener)
  {
    synchronized (getLock())
    {
      getVeto().remove(paramVetoableChangeListener);
    }
  }
  
  public final void fireVetoableChange(String paramString, Object paramObject1, Object paramObject2)
    throws PropertyVetoException
  {
    PropertyChangeEvent localPropertyChangeEvent = new PropertyChangeEvent(this, paramString, paramObject1, paramObject2);
    Iterator localIterator;
    synchronized (getLock())
    {
      localIterator = ((HashSet)getVeto().clone()).iterator();
    }
    while (localIterator.hasNext()) {
      ((VetoableChangeListener)localIterator.next()).vetoableChange(localPropertyChangeEvent);
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.options.VetoSystemOption
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.text;

import java.awt.Color;
import org.openide.options.SystemOption;

/**
 * @deprecated
 */
public final class NbDocument$Colors
  extends SystemOption
{
  public static final String PROP_BREAKPOINT = "NbBreakpointStyle";
  public static final String PROP_ERROR = "NbErrorStyle";
  public static final String PROP_CURRENT = "NbCurrentStyle";
  static final long serialVersionUID = -9152250591365746193L;
  
  public void setBreakpoint(Color paramColor) {}
  
  public Color getBreakpoint()
  {
    return new Color(127, 127, 255);
  }
  
  public void setError(Color paramColor) {}
  
  public Color getError()
  {
    return Color.red;
  }
  
  public void setCurrent(Color paramColor) {}
  
  public Color getCurrent()
  {
    return Color.magenta;
  }
  
  public String displayName()
  {
    return "COLORS";
  }
}

/* Location:
 * Qualified Name:     org.openide.text.NbDocument.Colors
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.text;

import java.beans.PropertyEditorSupport;
import org.openide.util.NbBundle;

public class PrintSettings$AlignmentEditor
  extends PropertyEditorSupport
{
  private String sCENTER;
  private String sRIGHT;
  private String sLEFT;
  private String[] tags = { sLEFT = NbBundle.getMessage(PrintSettings.class$org$openide$text$PrintSettings == null ? (PrintSettings.class$org$openide$text$PrintSettings = PrintSettings.class$("org.openide.text.PrintSettings")) : PrintSettings.class$org$openide$text$PrintSettings, "CTL_LEFT"), sCENTER = NbBundle.getMessage(PrintSettings.class$org$openide$text$PrintSettings == null ? (PrintSettings.class$org$openide$text$PrintSettings = PrintSettings.class$("org.openide.text.PrintSettings")) : PrintSettings.class$org$openide$text$PrintSettings, "CTL_CENTER"), sRIGHT = NbBundle.getMessage(PrintSettings.class$org$openide$text$PrintSettings == null ? (PrintSettings.class$org$openide$text$PrintSettings = PrintSettings.class$("org.openide.text.PrintSettings")) : PrintSettings.class$org$openide$text$PrintSettings, "CTL_RIGHT") };
  
  public String[] getTags()
  {
    return tags;
  }
  
  public String getAsText()
  {
    return tags[((Integer)getValue()).intValue()];
  }
  
  public void setAsText(String paramString)
  {
    if (paramString.equals(sLEFT)) {
      setValue(new Integer(0));
    } else if (paramString.equals(sCENTER)) {
      setValue(new Integer(1));
    } else {
      setValue(new Integer(2));
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.text.PrintSettings.AlignmentEditor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.text;

import java.awt.Component;
import java.awt.print.PageFormat;
import java.awt.print.PrinterJob;
import java.beans.PropertyEditorSupport;

public class PrintSettings$PageFormatEditor
  extends PropertyEditorSupport
{
  public String getAsText()
  {
    return null;
  }
  
  public boolean supportsCustomEditor()
  {
    return true;
  }
  
  public Component getCustomEditor()
  {
    PageFormat localPageFormat1 = (PageFormat)getValue();
    PrinterJob localPrinterJob = PrinterJob.getPrinterJob();
    PageFormat localPageFormat2 = localPrinterJob.pageDialog(localPageFormat1);
    
    ((PrintSettings)PrintSettings.findObject(PrintSettings.class$org$openide$text$PrintSettings == null ? (PrintSettings.class$org$openide$text$PrintSettings = PrintSettings.class$("org.openide.text.PrintSettings")) : PrintSettings.class$org$openide$text$PrintSettings)).setPageFormat((PageFormat)localPageFormat2.clone());
    localPrinterJob.cancel();
    
    return null;
  }
}

/* Location:
 * Qualified Name:     org.openide.text.PrintSettings.PageFormatEditor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.text;

import java.awt.Component;
import java.awt.Font;
import java.awt.print.PageFormat;
import java.awt.print.PrinterJob;
import java.beans.PropertyEditorSupport;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.openide.options.ContextSystemOption;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;

public final class PrintSettings
  extends ContextSystemOption
{
  static final long serialVersionUID = -9102470021814206818L;
  public static final int CENTER = 1;
  public static final int RIGHT = 2;
  public static final int LEFT = 0;
  public static final String PROP_PAGE_FORMAT = "pageFormat";
  public static final String PROP_WRAP = "wrap";
  public static final String PROP_HEADER_FORMAT = "headerFormat";
  public static final String PROP_FOOTER_FORMAT = "footerFormat";
  public static final String PROP_HEADER_FONT = "headerFont";
  public static final String PROP_FOOTER_FONT = "footerFont";
  public static final String PROP_HEADER_ALIGNMENT = "headerAlignment";
  public static final String PROP_FOOTER_ALIGNMENT = "footerAlignment";
  public static final String PROP_LINE_ASCENT_CORRECTION = "lineAscentCorrection";
  private static final String HELP_ID = "editing.printing";
  
  public String displayName()
  {
    return NbBundle.getMessage(PrintSettings.class, "CTL_Print_settings");
  }
  
  public HelpCtx getHelpCtx()
  {
    return new HelpCtx("editing.printing");
  }
  
  public static PageFormat getPageFormat(PrinterJob paramPrinterJob)
  {
    return PrintPreferences.getPageFormat(paramPrinterJob);
  }
  
  /**
   * @deprecated
   */
  public PageFormat getPageFormat()
  {
    return getPageFormat(PrinterJob.getPrinterJob());
  }
  
  public void setPageFormat(PageFormat paramPageFormat)
  {
    PrintPreferences.setPageFormat(paramPageFormat);
    firePropertyChange("pageFormat", null, paramPageFormat);
  }
  
  public boolean getWrap()
  {
    return PrintPreferences.getWrap();
  }
  
  public void setWrap(boolean paramBoolean)
  {
    PrintPreferences.setWrap(paramBoolean);
    firePropertyChange("wrap", paramBoolean ? Boolean.FALSE : Boolean.TRUE, paramBoolean ? Boolean.TRUE : Boolean.FALSE);
  }
  
  public String getHeaderFormat()
  {
    return PrintPreferences.getHeaderFormat();
  }
  
  public void setHeaderFormat(String paramString)
  {
    PrintPreferences.setHeaderFormat(paramString);
    firePropertyChange("headerFormat", null, paramString);
  }
  
  public String getFooterFormat()
  {
    return PrintPreferences.getFooterFormat();
  }
  
  public void setFooterFormat(String paramString)
  {
    PrintPreferences.setFooterFormat(paramString);
    firePropertyChange("footerFormat", null, paramString);
  }
  
  public Font getHeaderFont()
  {
    return PrintPreferences.getHeaderFont();
  }
  
  public void setHeaderFont(Font paramFont)
  {
    PrintPreferences.setHeaderFont(paramFont);
    firePropertyChange("headerFont", null, paramFont);
  }
  
  public Font getFooterFont()
  {
    return PrintPreferences.getFooterFont();
  }
  
  public void setFooterFont(Font paramFont)
  {
    PrintPreferences.setFooterFont(paramFont);
    firePropertyChange("footerFont", null, paramFont);
  }
  
  public int getHeaderAlignment()
  {
    return fromAlignment(PrintPreferences.getHeaderAlignment());
  }
  
  public void setHeaderAlignment(int paramInt)
  {
    PrintPreferences.setHeaderAlignment(toAlignment(paramInt));
    firePropertyChange("headerAlignment", null, new Integer(paramInt));
  }
  
  private PrintPreferences.Alignment toAlignment(int paramInt)
  {
    PrintPreferences.Alignment localAlignment = PrintPreferences.Alignment.CENTER;
    switch (paramInt)
    {
    case 1: 
      localAlignment = PrintPreferences.Alignment.CENTER;
      break;
    case 0: 
      localAlignment = PrintPreferences.Alignment.LEFT;
      break;
    case 2: 
      localAlignment = PrintPreferences.Alignment.RIGHT;
    }
    return localAlignment;
  }
  
  private int fromAlignment(PrintPreferences.Alignment paramAlignment)
  {
    int i = 1;
    if (PrintPreferences.Alignment.CENTER.equals(paramAlignment)) {
      i = 1;
    } else if (PrintPreferences.Alignment.LEFT.equals(paramAlignment)) {
      i = 0;
    } else if (PrintPreferences.Alignment.RIGHT.equals(paramAlignment)) {
      i = 2;
    }
    return i;
  }
  
  public int getFooterAlignment()
  {
    return fromAlignment(PrintPreferences.getFooterAlignment());
  }
  
  public void setFooterAlignment(int paramInt)
  {
    PrintPreferences.setFooterAlignment(toAlignment(paramInt));
    firePropertyChange("footerAlignment", null, new Integer(paramInt));
  }
  
  public float getLineAscentCorrection()
  {
    return PrintPreferences.getLineAscentCorrection();
  }
  
  public void setLineAscentCorrection(float paramFloat)
  {
    PrintPreferences.setLineAscentCorrection(paramFloat);
    firePropertyChange("lineAscentCorrection", null, new Float(paramFloat));
  }
  
  public void writeExternal(ObjectOutput paramObjectOutput)
    throws IOException
  {}
  
  public void readExternal(ObjectInput paramObjectInput)
    throws IOException, ClassNotFoundException
  {}
  
  public static class AlignmentEditor
    extends PropertyEditorSupport
  {
    private String sCENTER;
    private String sRIGHT;
    private String sLEFT;
    private String[] tags = { sLEFT = NbBundle.getMessage(PrintSettings.class, "CTL_LEFT"), sCENTER = NbBundle.getMessage(PrintSettings.class, "CTL_CENTER"), sRIGHT = NbBundle.getMessage(PrintSettings.class, "CTL_RIGHT") };
    
    public String[] getTags()
    {
      return tags;
    }
    
    public String getAsText()
    {
      return tags[((Integer)getValue()).intValue()];
    }
    
    public void setAsText(String paramString)
    {
      if (paramString.equals(sLEFT)) {
        setValue(new Integer(0));
      } else if (paramString.equals(sCENTER)) {
        setValue(new Integer(1));
      } else {
        setValue(new Integer(2));
      }
    }
  }
  
  public static class PageFormatEditor
    extends PropertyEditorSupport
  {
    public String getAsText()
    {
      return null;
    }
    
    public boolean supportsCustomEditor()
    {
      return true;
    }
    
    public Component getCustomEditor()
    {
      PageFormat localPageFormat1 = (PageFormat)getValue();
      PrinterJob localPrinterJob = PrinterJob.getPrinterJob();
      PageFormat localPageFormat2 = localPrinterJob.pageDialog(localPageFormat1);
      
      ((PrintSettings)PrintSettings.findObject(PrintSettings.class)).setPageFormat((PageFormat)localPageFormat2.clone());
      localPrinterJob.cancel();
      
      return null;
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.text.PrintSettings
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.text;

import java.awt.Image;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import org.openide.util.Exceptions;
import org.openide.util.ImageUtilities;
import org.openide.util.NbBundle;

public class PrintSettingsBeanInfo
  extends SimpleBeanInfo
{
  public Image getIcon(int paramInt)
  {
    return ImageUtilities.loadImage("org/openide/text/printSettings.gif");
  }
  
  public PropertyDescriptor[] getPropertyDescriptors()
  {
    try
    {
      PropertyDescriptor[] arrayOfPropertyDescriptor = { new PropertyDescriptor("wrap", PrintSettings.class), new PropertyDescriptor("headerFormat", PrintSettings.class), new PropertyDescriptor("footerFormat", PrintSettings.class), new PropertyDescriptor("headerFont", PrintSettings.class), new PropertyDescriptor("footerFont", PrintSettings.class), new PropertyDescriptor("headerAlignment", PrintSettings.class), new PropertyDescriptor("footerAlignment", PrintSettings.class), new PropertyDescriptor("lineAscentCorrection", PrintSettings.class) };
      
      arrayOfPropertyDescriptor[0].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_WRAP"));
      arrayOfPropertyDescriptor[0].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_WRAP"));
      arrayOfPropertyDescriptor[1].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_HEADER_FORMAT"));
      arrayOfPropertyDescriptor[1].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_HEADER_FORMAT"));
      arrayOfPropertyDescriptor[2].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_FOOTER_FORMAT"));
      arrayOfPropertyDescriptor[2].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_FOOTER_FORMAT"));
      arrayOfPropertyDescriptor[3].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_HEADER_FONT"));
      arrayOfPropertyDescriptor[3].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_HEADER_FONT"));
      arrayOfPropertyDescriptor[4].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_FOOTER_FONT"));
      arrayOfPropertyDescriptor[4].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_FOOTER_FONT"));
      arrayOfPropertyDescriptor[5].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_HEADER_ALIGNMENT"));
      arrayOfPropertyDescriptor[5].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_HEADER_ALIGNMENT"));
      arrayOfPropertyDescriptor[5].setPropertyEditorClass(PrintSettings.AlignmentEditor.class);
      arrayOfPropertyDescriptor[6].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_FOOTER_ALIGNMENT"));
      arrayOfPropertyDescriptor[6].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_FOOTER_ALIGNMENT"));
      arrayOfPropertyDescriptor[6].setPropertyEditorClass(PrintSettings.AlignmentEditor.class);
      
      arrayOfPropertyDescriptor[7].setDisplayName(NbBundle.getMessage(PrintSettings.class, "PROP_LINE_ASCENT_CORRECTION"));
      arrayOfPropertyDescriptor[7].setShortDescription(NbBundle.getMessage(PrintSettings.class, "HINT_LINE_ASCENT_CORRECTION"));
      
      return arrayOfPropertyDescriptor;
    }
    catch (IntrospectionException localIntrospectionException)
    {
      Exceptions.printStackTrace(localIntrospectionException);
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.openide.text.PrintSettingsBeanInfo
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
1

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