org-openide-io

16:40:35.167 INFO  jd.cli.Main - Decompiling org-openide-io.jar
package org.openide.windows;

import java.awt.Color;
import java.io.IOException;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Provider;

public abstract class IOColorLines
{
  private static IOColorLines find(InputOutput paramInputOutput)
  {
    if ((paramInputOutput instanceof Lookup.Provider))
    {
      Lookup.Provider localProvider = (Lookup.Provider)paramInputOutput;
      return (IOColorLines)localProvider.getLookup().lookup(IOColorLines.class);
    }
    return null;
  }
  
  public static void println(InputOutput paramInputOutput, CharSequence paramCharSequence, Color paramColor)
    throws IOException
  {
    IOColorLines localIOColorLines = find(paramInputOutput);
    if (localIOColorLines != null) {
      localIOColorLines.println(paramCharSequence, null, false, paramColor);
    }
  }
  
  public static void println(InputOutput paramInputOutput, CharSequence paramCharSequence, OutputListener paramOutputListener, boolean paramBoolean, Color paramColor)
    throws IOException
  {
    IOColorLines localIOColorLines = find(paramInputOutput);
    if (localIOColorLines != null) {
      localIOColorLines.println(paramCharSequence, paramOutputListener, paramBoolean, paramColor);
    }
  }
  
  public static boolean isSupported(InputOutput paramInputOutput)
  {
    return find(paramInputOutput) != null;
  }
  
  protected abstract void println(CharSequence paramCharSequence, OutputListener paramOutputListener, boolean paramBoolean, Color paramColor)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.openide.windows.IOColorLines
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.awt.Color;
import java.io.IOException;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Provider;

public abstract class IOColorPrint
{
  private static IOColorPrint find(InputOutput paramInputOutput)
  {
    if ((paramInputOutput instanceof Lookup.Provider))
    {
      Lookup.Provider localProvider = (Lookup.Provider)paramInputOutput;
      return (IOColorPrint)localProvider.getLookup().lookup(IOColorPrint.class);
    }
    return null;
  }
  
  public static void print(InputOutput paramInputOutput, CharSequence paramCharSequence, Color paramColor)
    throws IOException
  {
    IOColorPrint localIOColorPrint = find(paramInputOutput);
    if (localIOColorPrint != null) {
      localIOColorPrint.print(paramCharSequence, null, false, paramColor);
    }
  }
  
  public static void print(InputOutput paramInputOutput, CharSequence paramCharSequence, OutputListener paramOutputListener, boolean paramBoolean, Color paramColor)
    throws IOException
  {
    IOColorPrint localIOColorPrint = find(paramInputOutput);
    if (localIOColorPrint != null) {
      localIOColorPrint.print(paramCharSequence, paramOutputListener, paramBoolean, paramColor);
    }
  }
  
  public static boolean isSupported(InputOutput paramInputOutput)
  {
    return find(paramInputOutput) != null;
  }
  
  protected abstract void print(CharSequence paramCharSequence, OutputListener paramOutputListener, boolean paramBoolean, Color paramColor)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.openide.windows.IOColorPrint
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

public enum IOColors$OutputType
{
  OUTPUT,  ERROR,  HYPERLINK,  HYPERLINK_IMPORTANT;
  
  private IOColors$OutputType() {}
}

/* Location:
 * Qualified Name:     org.openide.windows.IOColors.OutputType
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.awt.Color;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Provider;

public abstract class IOColors
{
  private static IOColors find(InputOutput paramInputOutput)
  {
    if ((paramInputOutput instanceof Lookup.Provider))
    {
      Lookup.Provider localProvider = (Lookup.Provider)paramInputOutput;
      return (IOColors)localProvider.getLookup().lookup(IOColors.class);
    }
    return null;
  }
  
  public static enum OutputType
  {
    OUTPUT,  ERROR,  HYPERLINK,  HYPERLINK_IMPORTANT;
    
    private OutputType() {}
  }
  
  public static Color getColor(InputOutput paramInputOutput, OutputType paramOutputType)
  {
    IOColors localIOColors = find(paramInputOutput);
    return localIOColors != null ? localIOColors.getColor(paramOutputType) : null;
  }
  
  public static void setColor(InputOutput paramInputOutput, OutputType paramOutputType, Color paramColor)
  {
    IOColors localIOColors = find(paramInputOutput);
    if (localIOColors != null) {
      localIOColors.setColor(paramOutputType, paramColor);
    }
  }
  
  public static boolean isSupported(InputOutput paramInputOutput)
  {
    return find(paramInputOutput) != null;
  }
  
  protected abstract Color getColor(OutputType paramOutputType);
  
  protected abstract void setColor(OutputType paramOutputType, Color paramColor);
}

/* Location:
 * Qualified Name:     org.openide.windows.IOColors
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

class IOContainer$1 {}

/* Location:
 * Qualified Name:     org.openide.windows.IOContainer.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

public abstract interface IOContainer$CallBacks
{
  public abstract void closed();
  
  public abstract void selected();
  
  public abstract void activated();
  
  public abstract void deactivated();
}

/* Location:
 * Qualified Name:     org.openide.windows.IOContainer.CallBacks
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JComponent;

public abstract interface IOContainer$Provider
{
  public abstract void open();
  
  public abstract void requestActive();
  
  public abstract void requestVisible();
  
  public abstract boolean isActivated();
  
  public abstract void add(JComponent paramJComponent, IOContainer.CallBacks paramCallBacks);
  
  public abstract void remove(JComponent paramJComponent);
  
  public abstract void select(JComponent paramJComponent);
  
  public abstract JComponent getSelected();
  
  public abstract void setTitle(JComponent paramJComponent, String paramString);
  
  public abstract void setToolTipText(JComponent paramJComponent, String paramString);
  
  public abstract void setIcon(JComponent paramJComponent, Icon paramIcon);
  
  public abstract void setToolbarActions(JComponent paramJComponent, Action[] paramArrayOfAction);
  
  public abstract boolean isCloseable(JComponent paramJComponent);
}

/* Location:
 * Qualified Name:     org.openide.windows.IOContainer.Provider
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;

class IOContainer$Trivial
  extends JTabbedPane
  implements IOContainer.Provider
{
  private JFrame frame;
  
  public void open()
  {
    if (frame == null)
    {
      frame = new JFrame();
      frame.setDefaultCloseOperation(1);
      frame.add(this);
      if (getTabCount() > 0) {
        frame.setTitle(getTitleAt(0));
      }
      frame.pack();
    }
    frame.setVisible(true);
  }
  
  public void requestActive()
  {
    frame.requestFocus();
  }
  
  public void requestVisible()
  {
    frame.setVisible(true);
  }
  
  public boolean isActivated()
  {
    return frame.isActive();
  }
  
  public void add(JComponent paramJComponent, IOContainer.CallBacks paramCallBacks)
  {
    add(paramJComponent);
  }
  
  public void remove(JComponent paramJComponent)
  {
    remove(paramJComponent);
  }
  
  public void select(JComponent paramJComponent)
  {
    setSelectedComponent(paramJComponent);
  }
  
  public JComponent getSelected()
  {
    return (JComponent)getSelectedComponent();
  }
  
  public void setTitle(JComponent paramJComponent, String paramString)
  {
    setTitleAt(indexOfComponent(paramJComponent), paramString);
  }
  
  public void setToolTipText(JComponent paramJComponent, String paramString)
  {
    setToolTipTextAt(indexOfComponent(paramJComponent), paramString);
  }
  
  public void setIcon(JComponent paramJComponent, Icon paramIcon)
  {
    setIconAt(indexOfComponent(paramJComponent), paramIcon);
  }
  
  public void setToolbarActions(JComponent paramJComponent, Action[] paramArrayOfAction) {}
  
  public boolean isCloseable(JComponent paramJComponent)
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.openide.windows.IOContainer.Trivial
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;
import javax.swing.SwingUtilities;
import org.openide.util.Lookup;
import org.openide.util.Parameters;

public final class IOContainer
{
  private static IOContainer defaultIOContainer;
  private Provider provider;
  
  public static IOContainer create(Provider paramProvider)
  {
    Parameters.notNull("provider", paramProvider);
    return new IOContainer(paramProvider);
  }
  
  public static IOContainer getDefault()
  {
    if (defaultIOContainer == null)
    {
      Object localObject = (Provider)Lookup.getDefault().lookup(Provider.class);
      if (localObject == null) {
        localObject = new Trivial(null);
      }
      defaultIOContainer = create((Provider)localObject);
    }
    return defaultIOContainer;
  }
  
  private IOContainer(Provider paramProvider)
  {
    provider = paramProvider;
  }
  
  public void open()
  {
    log("open()", new Object[0]);
    provider.open();
  }
  
  public void requestActive()
  {
    log("requestActive()", new Object[0]);
    provider.requestActive();
  }
  
  public void requestVisible()
  {
    log("requestVisible()", new Object[0]);
    provider.requestVisible();
  }
  
  public boolean isActivated()
  {
    log("isActivated()", new Object[0]);
    return provider.isActivated();
  }
  
  public void add(JComponent paramJComponent, CallBacks paramCallBacks)
  {
    log("add()", new Object[] { paramJComponent, paramCallBacks });
    provider.add(paramJComponent, paramCallBacks);
  }
  
  public void remove(JComponent paramJComponent)
  {
    log("remove()", new Object[] { paramJComponent });
    provider.remove(paramJComponent);
  }
  
  public void select(JComponent paramJComponent)
  {
    log("select()", new Object[] { paramJComponent });
    provider.select(paramJComponent);
  }
  
  public JComponent getSelected()
  {
    log("getSelected()", new Object[0]);
    return provider.getSelected();
  }
  
  public void setTitle(JComponent paramJComponent, String paramString)
  {
    log("setTitle()", new Object[] { paramJComponent, paramString });
    provider.setTitle(paramJComponent, paramString);
  }
  
  public void setToolTipText(JComponent paramJComponent, String paramString)
  {
    log("setToolTipText()", new Object[] { paramJComponent, paramString });
    provider.setToolTipText(paramJComponent, paramString);
  }
  
  public void setIcon(JComponent paramJComponent, Icon paramIcon)
  {
    log("setIcon()", new Object[] { paramJComponent, paramIcon });
    provider.setIcon(paramJComponent, paramIcon);
  }
  
  public void setToolbarActions(JComponent paramJComponent, Action[] paramArrayOfAction)
  {
    log("setToolbarActions()", new Object[] { paramJComponent, paramArrayOfAction });
    provider.setToolbarActions(paramJComponent, paramArrayOfAction);
  }
  
  public boolean isCloseable(JComponent paramJComponent)
  {
    log("isCloseable()", new Object[] { paramJComponent });
    return provider.isCloseable(paramJComponent);
  }
  
  private static final Logger LOGGER = Logger.getLogger(IOContainer.class.getName());
  
  private synchronized void log(String paramString, Object... paramVarArgs)
  {
    LOGGER.log(Level.FINER, "{0}: {1} {2}", new Object[] { provider.getClass(), paramString, Arrays.asList(paramVarArgs) });
    checkIsEDT();
  }
  
  private static void checkIsEDT()
  {
    if (!SwingUtilities.isEventDispatchThread())
    {
      Level localLevel = Level.FINE;
      
      assert ((localLevel = Level.WARNING) != null);
      
      int i = 0;
      StackTraceElement[] arrayOfStackTraceElement1 = Thread.currentThread().getStackTrace();
      for (StackTraceElement localStackTraceElement : arrayOfStackTraceElement1) {
        if ("java.awt.EventDispatchThread".equals(localStackTraceElement.getClassName()))
        {
          i = 1;
          break;
        }
      }
      if (i == 0) {
        LOGGER.log(localLevel, null, new IllegalStateException("Should be called from AWT thread."));
      } else {
        LOGGER.log(localLevel, null, new IllegalStateException("Known problem in JDK occurred. If you are interested, vote and report at:\nhttp://bugs.sun.com/view_bug.do?bug_id=6424157, http://bugs.sun.com/view_bug.do?bug_id=6553239 \nAlso see related discussion at http://www.netbeans.org/issues/show_bug.cgi?id=90590"));
      }
    }
  }
  
  private static class Trivial
    extends JTabbedPane
    implements IOContainer.Provider
  {
    private JFrame frame;
    
    public void open()
    {
      if (frame == null)
      {
        frame = new JFrame();
        frame.setDefaultCloseOperation(1);
        frame.add(this);
        if (getTabCount() > 0) {
          frame.setTitle(getTitleAt(0));
        }
        frame.pack();
      }
      frame.setVisible(true);
    }
    
    public void requestActive()
    {
      frame.requestFocus();
    }
    
    public void requestVisible()
    {
      frame.setVisible(true);
    }
    
    public boolean isActivated()
    {
      return frame.isActive();
    }
    
    public void add(JComponent paramJComponent, IOContainer.CallBacks paramCallBacks)
    {
      add(paramJComponent);
    }
    
    public void remove(JComponent paramJComponent)
    {
      remove(paramJComponent);
    }
    
    public void select(JComponent paramJComponent)
    {
      setSelectedComponent(paramJComponent);
    }
    
    public JComponent getSelected()
    {
      return (JComponent)getSelectedComponent();
    }
    
    public void setTitle(JComponent paramJComponent, String paramString)
    {
      setTitleAt(indexOfComponent(paramJComponent), paramString);
    }
    
    public void setToolTipText(JComponent paramJComponent, String paramString)
    {
      setToolTipTextAt(indexOfComponent(paramJComponent), paramString);
    }
    
    public void setIcon(JComponent paramJComponent, Icon paramIcon)
    {
      setIconAt(indexOfComponent(paramJComponent), paramIcon);
    }
    
    public void setToolbarActions(JComponent paramJComponent, Action[] paramArrayOfAction) {}
    
    public boolean isCloseable(JComponent paramJComponent)
    {
      return true;
    }
  }
  
  public static abstract interface CallBacks
  {
    public abstract void closed();
    
    public abstract void selected();
    
    public abstract void activated();
    
    public abstract void deactivated();
  }
  
  public static abstract interface Provider
  {
    public abstract void open();
    
    public abstract void requestActive();
    
    public abstract void requestVisible();
    
    public abstract boolean isActivated();
    
    public abstract void add(JComponent paramJComponent, IOContainer.CallBacks paramCallBacks);
    
    public abstract void remove(JComponent paramJComponent);
    
    public abstract void select(JComponent paramJComponent);
    
    public abstract JComponent getSelected();
    
    public abstract void setTitle(JComponent paramJComponent, String paramString);
    
    public abstract void setToolTipText(JComponent paramJComponent, String paramString);
    
    public abstract void setIcon(JComponent paramJComponent, Icon paramIcon);
    
    public abstract void setToolbarActions(JComponent paramJComponent, Action[] paramArrayOfAction);
    
    public abstract boolean isCloseable(JComponent paramJComponent);
  }
}

/* Location:
 * Qualified Name:     org.openide.windows.IOContainer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

public abstract interface IOPosition$Position
{
  public abstract void scrollTo();
}

/* Location:
 * Qualified Name:     org.openide.windows.IOPosition.Position
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import org.openide.util.Lookup;
import org.openide.util.Lookup.Provider;

public abstract class IOPosition
{
  private static IOPosition find(InputOutput paramInputOutput)
  {
    if ((paramInputOutput instanceof Lookup.Provider))
    {
      Lookup.Provider localProvider = (Lookup.Provider)paramInputOutput;
      return (IOPosition)localProvider.getLookup().lookup(IOPosition.class);
    }
    return null;
  }
  
  public static Position currentPosition(InputOutput paramInputOutput)
  {
    IOPosition localIOPosition = find(paramInputOutput);
    return localIOPosition != null ? localIOPosition.currentPosition() : null;
  }
  
  public static boolean isSupported(InputOutput paramInputOutput)
  {
    return find(paramInputOutput) != null;
  }
  
  protected abstract Position currentPosition();
  
  public static abstract interface Position
  {
    public abstract void scrollTo();
  }
}

/* Location:
 * Qualified Name:     org.openide.windows.IOPosition
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.io.Reader;

final class IOProvider$Trivial$TrivialIO
  implements InputOutput
{
  private final String name;
  
  public IOProvider$Trivial$TrivialIO(IOProvider.Trivial paramTrivial, String paramString)
  {
    name = paramString;
  }
  
  public Reader getIn()
  {
    return IOProvider.Trivial.access$000();
  }
  
  public OutputWriter getOut()
  {
    return new IOProvider.Trivial.TrivialOW(IOProvider.Trivial.access$100(), name);
  }
  
  public OutputWriter getErr()
  {
    return new IOProvider.Trivial.TrivialOW(IOProvider.Trivial.access$200(), name);
  }
  
  public Reader flushReader()
  {
    return getIn();
  }
  
  public boolean isClosed()
  {
    return false;
  }
  
  public boolean isErrSeparated()
  {
    return false;
  }
  
  public boolean isFocusTaken()
  {
    return false;
  }
  
  public void closeInputOutput() {}
  
  public void select() {}
  
  public void setErrSeparated(boolean paramBoolean) {}
  
  public void setErrVisible(boolean paramBoolean) {}
  
  public void setFocusTaken(boolean paramBoolean) {}
  
  public void setInputVisible(boolean paramBoolean) {}
  
  public void setOutputVisible(boolean paramBoolean) {}
}

/* Location:
 * Qualified Name:     org.openide.windows.IOProvider.Trivial.TrivialIO
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.io.IOException;
import java.io.PrintStream;
import java.io.StringWriter;

final class IOProvider$Trivial$TrivialOW
  extends OutputWriter
{
  private static int count = 0;
  private final String name;
  private final PrintStream stream;
  
  public IOProvider$Trivial$TrivialOW(PrintStream paramPrintStream, String paramString)
  {
    super(new StringWriter());
    stream = paramPrintStream;
    if (paramString != null) {
      name = paramString;
    } else {
      name = ("anon-" + ++count);
    }
  }
  
  private void prefix(boolean paramBoolean)
  {
    if (paramBoolean) {
      stream.print("[" + name + "]* ");
    } else {
      stream.print("[" + name + "]  ");
    }
  }
  
  public void println(String paramString, OutputListener paramOutputListener)
    throws IOException
  {
    prefix(paramOutputListener != null);
    stream.println(paramString);
  }
  
  public void reset()
    throws IOException
  {}
  
  public void println(float paramFloat)
  {
    prefix(false);
    stream.println(paramFloat);
  }
  
  public void println(double paramDouble)
  {
    prefix(false);
    stream.println(paramDouble);
  }
  
  public void println()
  {
    prefix(false);
    stream.println();
  }
  
  public void println(Object paramObject)
  {
    prefix(false);
    stream.println(paramObject);
  }
  
  public void println(int paramInt)
  {
    prefix(false);
    stream.println(paramInt);
  }
  
  public void println(char paramChar)
  {
    prefix(false);
    stream.println(paramChar);
  }
  
  public void println(long paramLong)
  {
    prefix(false);
    stream.println(paramLong);
  }
  
  public void println(char[] paramArrayOfChar)
  {
    prefix(false);
    stream.println(paramArrayOfChar);
  }
  
  public void println(boolean paramBoolean)
  {
    prefix(false);
    stream.println(paramBoolean);
  }
  
  public void println(String paramString)
  {
    prefix(false);
    stream.println(paramString);
  }
  
  public void write(int paramInt)
  {
    stream.write(paramInt);
  }
  
  public void write(char[] paramArrayOfChar, int paramInt1, int paramInt2)
  {
    String str = new String(paramArrayOfChar, paramInt1, paramInt2);
    if (str.endsWith("\n")) {
      println(str.substring(0, str.length() - 1));
    } else {
      try
      {
        stream.write(str.getBytes());
      }
      catch (IOException localIOException) {}
    }
  }
  
  public void write(String paramString, int paramInt1, int paramInt2)
  {
    paramString = paramString.substring(paramInt1, paramInt1 + paramInt2);
    if (paramString.endsWith("\n")) {
      println(paramString.substring(0, paramString.length() - 1));
    } else {
      try
      {
        stream.write(paramString.getBytes());
      }
      catch (IOException localIOException) {}
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.windows.IOProvider.Trivial.TrivialOW
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.Reader;
import java.io.StringWriter;

final class IOProvider$Trivial
  extends IOProvider
{
  private static final Reader in = new BufferedReader(new InputStreamReader(System.in));
  private static final PrintStream out = System.out;
  private static final PrintStream err = System.err;
  
  public InputOutput getIO(String paramString, boolean paramBoolean)
  {
    return new TrivialIO(paramString);
  }
  
  public OutputWriter getStdOut()
  {
    return new TrivialOW(out, "stdout");
  }
  
  private final class TrivialIO
    implements InputOutput
  {
    private final String name;
    
    public TrivialIO(String paramString)
    {
      name = paramString;
    }
    
    public Reader getIn()
    {
      return IOProvider.Trivial.in;
    }
    
    public OutputWriter getOut()
    {
      return new IOProvider.Trivial.TrivialOW(IOProvider.Trivial.out, name);
    }
    
    public OutputWriter getErr()
    {
      return new IOProvider.Trivial.TrivialOW(IOProvider.Trivial.err, name);
    }
    
    public Reader flushReader()
    {
      return getIn();
    }
    
    public boolean isClosed()
    {
      return false;
    }
    
    public boolean isErrSeparated()
    {
      return false;
    }
    
    public boolean isFocusTaken()
    {
      return false;
    }
    
    public void closeInputOutput() {}
    
    public void select() {}
    
    public void setErrSeparated(boolean paramBoolean) {}
    
    public void setErrVisible(boolean paramBoolean) {}
    
    public void setFocusTaken(boolean paramBoolean) {}
    
    public void setInputVisible(boolean paramBoolean) {}
    
    public void setOutputVisible(boolean paramBoolean) {}
  }
  
  private static final class TrivialOW
    extends OutputWriter
  {
    private static int count = 0;
    private final String name;
    private final PrintStream stream;
    
    public TrivialOW(PrintStream paramPrintStream, String paramString)
    {
      super();
      stream = paramPrintStream;
      if (paramString != null) {
        name = paramString;
      } else {
        name = ("anon-" + ++count);
      }
    }
    
    private void prefix(boolean paramBoolean)
    {
      if (paramBoolean) {
        stream.print("[" + name + "]* ");
      } else {
        stream.print("[" + name + "]  ");
      }
    }
    
    public void println(String paramString, OutputListener paramOutputListener)
      throws IOException
    {
      prefix(paramOutputListener != null);
      stream.println(paramString);
    }
    
    public void reset()
      throws IOException
    {}
    
    public void println(float paramFloat)
    {
      prefix(false);
      stream.println(paramFloat);
    }
    
    public void println(double paramDouble)
    {
      prefix(false);
      stream.println(paramDouble);
    }
    
    public void println()
    {
      prefix(false);
      stream.println();
    }
    
    public void println(Object paramObject)
    {
      prefix(false);
      stream.println(paramObject);
    }
    
    public void println(int paramInt)
    {
      prefix(false);
      stream.println(paramInt);
    }
    
    public void println(char paramChar)
    {
      prefix(false);
      stream.println(paramChar);
    }
    
    public void println(long paramLong)
    {
      prefix(false);
      stream.println(paramLong);
    }
    
    public void println(char[] paramArrayOfChar)
    {
      prefix(false);
      stream.println(paramArrayOfChar);
    }
    
    public void println(boolean paramBoolean)
    {
      prefix(false);
      stream.println(paramBoolean);
    }
    
    public void println(String paramString)
    {
      prefix(false);
      stream.println(paramString);
    }
    
    public void write(int paramInt)
    {
      stream.write(paramInt);
    }
    
    public void write(char[] paramArrayOfChar, int paramInt1, int paramInt2)
    {
      String str = new String(paramArrayOfChar, paramInt1, paramInt2);
      if (str.endsWith("\n")) {
        println(str.substring(0, str.length() - 1));
      } else {
        try
        {
          stream.write(str.getBytes());
        }
        catch (IOException localIOException) {}
      }
    }
    
    public void write(String paramString, int paramInt1, int paramInt2)
    {
      paramString = paramString.substring(paramInt1, paramInt1 + paramInt2);
      if (paramString.endsWith("\n")) {
        println(paramString.substring(0, paramString.length() - 1));
      } else {
        try
        {
          stream.write(paramString.getBytes());
        }
        catch (IOException localIOException) {}
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.windows.IOProvider.Trivial
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.Reader;
import java.io.StringWriter;
import java.util.Collection;
import javax.swing.Action;
import org.openide.util.Lookup;

public abstract class IOProvider
{
  public static IOProvider getDefault()
  {
    Object localObject = (IOProvider)Lookup.getDefault().lookup(IOProvider.class);
    if (localObject == null) {
      localObject = new Trivial();
    }
    return (IOProvider)localObject;
  }
  
  public static IOProvider get(String paramString)
  {
    Collection localCollection = Lookup.getDefault().lookupAll(IOProvider.class);
    for (IOProvider localIOProvider : localCollection) {
      if (localIOProvider.getName().equals(paramString)) {
        return localIOProvider;
      }
    }
    return getDefault();
  }
  
  public abstract InputOutput getIO(String paramString, boolean paramBoolean);
  
  public InputOutput getIO(String paramString, Action[] paramArrayOfAction)
  {
    return getIO(paramString, true);
  }
  
  public InputOutput getIO(String paramString, Action[] paramArrayOfAction, IOContainer paramIOContainer)
  {
    return getIO(paramString, paramArrayOfAction);
  }
  
  public String getName()
  {
    return "";
  }
  
  public abstract OutputWriter getStdOut();
  
  private static final class Trivial
    extends IOProvider
  {
    private static final Reader in = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintStream out = System.out;
    private static final PrintStream err = System.err;
    
    public InputOutput getIO(String paramString, boolean paramBoolean)
    {
      return new TrivialIO(paramString);
    }
    
    public OutputWriter getStdOut()
    {
      return new TrivialOW(out, "stdout");
    }
    
    private final class TrivialIO
      implements InputOutput
    {
      private final String name;
      
      public TrivialIO(String paramString)
      {
        name = paramString;
      }
      
      public Reader getIn()
      {
        return IOProvider.Trivial.in;
      }
      
      public OutputWriter getOut()
      {
        return new IOProvider.Trivial.TrivialOW(IOProvider.Trivial.out, name);
      }
      
      public OutputWriter getErr()
      {
        return new IOProvider.Trivial.TrivialOW(IOProvider.Trivial.err, name);
      }
      
      public Reader flushReader()
      {
        return getIn();
      }
      
      public boolean isClosed()
      {
        return false;
      }
      
      public boolean isErrSeparated()
      {
        return false;
      }
      
      public boolean isFocusTaken()
      {
        return false;
      }
      
      public void closeInputOutput() {}
      
      public void select() {}
      
      public void setErrSeparated(boolean paramBoolean) {}
      
      public void setErrVisible(boolean paramBoolean) {}
      
      public void setFocusTaken(boolean paramBoolean) {}
      
      public void setInputVisible(boolean paramBoolean) {}
      
      public void setOutputVisible(boolean paramBoolean) {}
    }
    
    private static final class TrivialOW
      extends OutputWriter
    {
      private static int count = 0;
      private final String name;
      private final PrintStream stream;
      
      public TrivialOW(PrintStream paramPrintStream, String paramString)
      {
        super();
        stream = paramPrintStream;
        if (paramString != null) {
          name = paramString;
        } else {
          name = ("anon-" + ++count);
        }
      }
      
      private void prefix(boolean paramBoolean)
      {
        if (paramBoolean) {
          stream.print("[" + name + "]* ");
        } else {
          stream.print("[" + name + "]  ");
        }
      }
      
      public void println(String paramString, OutputListener paramOutputListener)
        throws IOException
      {
        prefix(paramOutputListener != null);
        stream.println(paramString);
      }
      
      public void reset()
        throws IOException
      {}
      
      public void println(float paramFloat)
      {
        prefix(false);
        stream.println(paramFloat);
      }
      
      public void println(double paramDouble)
      {
        prefix(false);
        stream.println(paramDouble);
      }
      
      public void println()
      {
        prefix(false);
        stream.println();
      }
      
      public void println(Object paramObject)
      {
        prefix(false);
        stream.println(paramObject);
      }
      
      public void println(int paramInt)
      {
        prefix(false);
        stream.println(paramInt);
      }
      
      public void println(char paramChar)
      {
        prefix(false);
        stream.println(paramChar);
      }
      
      public void println(long paramLong)
      {
        prefix(false);
        stream.println(paramLong);
      }
      
      public void println(char[] paramArrayOfChar)
      {
        prefix(false);
        stream.println(paramArrayOfChar);
      }
      
      public void println(boolean paramBoolean)
      {
        prefix(false);
        stream.println(paramBoolean);
      }
      
      public void println(String paramString)
      {
        prefix(false);
        stream.println(paramString);
      }
      
      public void write(int paramInt)
      {
        stream.write(paramInt);
      }
      
      public void write(char[] paramArrayOfChar, int paramInt1, int paramInt2)
      {
        String str = new String(paramArrayOfChar, paramInt1, paramInt2);
        if (str.endsWith("\n")) {
          println(str.substring(0, str.length() - 1));
        } else {
          try
          {
            stream.write(str.getBytes());
          }
          catch (IOException localIOException) {}
        }
      }
      
      public void write(String paramString, int paramInt1, int paramInt2)
      {
        paramString = paramString.substring(paramInt1, paramInt1 + paramInt2);
        if (paramString.endsWith("\n")) {
          println(paramString.substring(0, paramString.length() - 1));
        } else {
          try
          {
            stream.write(paramString.getBytes());
          }
          catch (IOException localIOException) {}
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.windows.IOProvider
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

public enum IOSelect$AdditionalOperation
{
  OPEN,  REQUEST_VISIBLE,  REQUEST_ACTIVE;
  
  private IOSelect$AdditionalOperation() {}
}

/* Location:
 * Qualified Name:     org.openide.windows.IOSelect.AdditionalOperation
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.util.Set;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Provider;
import org.openide.util.Parameters;

public abstract class IOSelect
{
  public static enum AdditionalOperation
  {
    OPEN,  REQUEST_VISIBLE,  REQUEST_ACTIVE;
    
    private AdditionalOperation() {}
  }
  
  private static IOSelect find(InputOutput paramInputOutput)
  {
    if ((paramInputOutput instanceof Lookup.Provider))
    {
      Lookup.Provider localProvider = (Lookup.Provider)paramInputOutput;
      return (IOSelect)localProvider.getLookup().lookup(IOSelect.class);
    }
    return null;
  }
  
  public static void select(InputOutput paramInputOutput, Set<AdditionalOperation> paramSet)
  {
    Parameters.notNull("extraOps", paramSet);
    IOSelect localIOSelect = find(paramInputOutput);
    if (localIOSelect != null) {
      localIOSelect.select(paramSet);
    } else {
      paramInputOutput.select();
    }
  }
  
  public static boolean isSupported(InputOutput paramInputOutput)
  {
    return find(paramInputOutput) != null;
  }
  
  protected abstract void select(Set<AdditionalOperation> paramSet);
}

/* Location:
 * Qualified Name:     org.openide.windows.IOSelect
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import javax.swing.Icon;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Provider;

public abstract class IOTab
{
  private static IOTab find(InputOutput paramInputOutput)
  {
    if ((paramInputOutput instanceof Lookup.Provider))
    {
      Lookup.Provider localProvider = (Lookup.Provider)paramInputOutput;
      return (IOTab)localProvider.getLookup().lookup(IOTab.class);
    }
    return null;
  }
  
  public static Icon getIcon(InputOutput paramInputOutput)
  {
    IOTab localIOTab = find(paramInputOutput);
    return localIOTab != null ? localIOTab.getIcon() : null;
  }
  
  public static void setIcon(InputOutput paramInputOutput, Icon paramIcon)
  {
    IOTab localIOTab = find(paramInputOutput);
    if (localIOTab != null) {
      localIOTab.setIcon(paramIcon);
    }
  }
  
  public static String getToolTipText(InputOutput paramInputOutput)
  {
    IOTab localIOTab = find(paramInputOutput);
    return localIOTab != null ? localIOTab.getToolTipText() : null;
  }
  
  public static void setToolTipText(InputOutput paramInputOutput, String paramString)
  {
    IOTab localIOTab = find(paramInputOutput);
    if (localIOTab != null) {
      localIOTab.setToolTipText(paramString);
    }
  }
  
  public static boolean isSupported(InputOutput paramInputOutput)
  {
    return find(paramInputOutput) != null;
  }
  
  protected abstract Icon getIcon();
  
  protected abstract void setIcon(Icon paramIcon);
  
  protected abstract String getToolTipText();
  
  protected abstract void setToolTipText(String paramString);
}

/* Location:
 * Qualified Name:     org.openide.windows.IOTab
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.io.InputStreamReader;
import java.io.Reader;
import org.openide.util.io.NullInputStream;

final class InputOutput$Null
  implements InputOutput
{
  static Reader NULL_READER = new InputStreamReader(new NullInputStream());
  static OutputWriter NULL_WRITER = new InputOutput.NullOutputWriter();
  
  public OutputWriter getOut()
  {
    return NULL_WRITER;
  }
  
  public Reader getIn()
  {
    return NULL_READER;
  }
  
  public OutputWriter getErr()
  {
    return NULL_WRITER;
  }
  
  public void closeInputOutput() {}
  
  public boolean isClosed()
  {
    return true;
  }
  
  public void setOutputVisible(boolean paramBoolean) {}
  
  public void setErrVisible(boolean paramBoolean) {}
  
  public void setInputVisible(boolean paramBoolean) {}
  
  public void select() {}
  
  public boolean isErrSeparated()
  {
    return false;
  }
  
  public void setErrSeparated(boolean paramBoolean) {}
  
  public boolean isFocusTaken()
  {
    return false;
  }
  
  public void setFocusTaken(boolean paramBoolean) {}
  
  public Reader flushReader()
  {
    return NULL_READER;
  }
}

/* Location:
 * Qualified Name:     org.openide.windows.InputOutput.Null
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.io.OutputStreamWriter;
import org.openide.util.io.NullOutputStream;

final class InputOutput$NullOutputWriter
  extends OutputWriter
{
  InputOutput$NullOutputWriter()
  {
    super(new OutputStreamWriter(new NullOutputStream()));
  }
  
  public void reset() {}
  
  public void println(String paramString, OutputListener paramOutputListener) {}
}

/* Location:
 * Qualified Name:     org.openide.windows.InputOutput.NullOutputWriter
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.io.Reader;

public abstract interface InputOutput
{
  public static final InputOutput NULL = new InputOutput.Null();
  @Deprecated
  public static final Reader nullReader = InputOutput.Null.NULL_READER;
  @Deprecated
  public static final OutputWriter nullWriter = InputOutput.Null.NULL_WRITER;
  
  public abstract OutputWriter getOut();
  
  public abstract Reader getIn();
  
  public abstract OutputWriter getErr();
  
  public abstract void closeInputOutput();
  
  public abstract boolean isClosed();
  
  public abstract void setOutputVisible(boolean paramBoolean);
  
  public abstract void setErrVisible(boolean paramBoolean);
  
  public abstract void setInputVisible(boolean paramBoolean);
  
  public abstract void select();
  
  public abstract boolean isErrSeparated();
  
  public abstract void setErrSeparated(boolean paramBoolean);
  
  public abstract boolean isFocusTaken();
  
  public abstract void setFocusTaken(boolean paramBoolean);
  
  @Deprecated
  public abstract Reader flushReader();
}

/* Location:
 * Qualified Name:     org.openide.windows.InputOutput
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.windows;

import java.util.EventObject;

public abstract class OutputEvent
  extends EventObject
{
  static fin
1 2

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