org.tizen.injector.location.manual_1.0.0.201310291329

16:50:05.555 INFO  jd.cli.Main - Decompiling org.tizen.injector.location.manual_1.0.0.201310291329.jar
package org.tizen.injector.location.manual;

import java.util.ArrayList;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.Section;
import org.tizen.injector.location.manual.page.Coordinate;
import org.tizen.injector.provider.AbstractInjectorItem;

public class Manual
  extends AbstractInjectorItem
{
  private static String LABEL = Messages.Manual_0;
  
  protected void addPages()
  {
    addPage(new Coordinate(this, Messages.Manual_1));
  }
  
  public void setSiblingsEnabled(boolean paramBoolean)
  {
    ArrayList localArrayList = getCategoryItems("Location");
    for (int i = 0; i < localArrayList.size(); i++)
    {
      Section localSection = (Section)((AbstractInjectorItem)localArrayList.get(i)).getParent().getParent();
      if (!localSection.getText().equals(LABEL))
      {
        if (!paramBoolean) {
          localSection.setExpanded(paramBoolean);
        }
        localSection.setEnabled(paramBoolean);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.Manual
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.injector.location.manual.messages";
  public static String Manual_0;
  public static String Manual_1;
  
  static
  {
    NLS.initializeMessages("org.tizen.injector.location.manual.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.Messages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Button;

class Coordinate$1
  implements ModifyListener
{
  Coordinate$1(Coordinate paramCoordinate) {}
  
  public void modifyText(ModifyEvent paramModifyEvent)
  {
    Coordinate.access$0(this$0).setEnabled(this$0.validateValues());
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Coordinate.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Button;

class Coordinate$2
  implements ModifyListener
{
  Coordinate$2(Coordinate paramCoordinate) {}
  
  public void modifyText(ModifyEvent paramModifyEvent)
  {
    Coordinate.access$0(this$0).setEnabled(this$0.validateValues());
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Coordinate.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import java.io.IOException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.tizen.injector.location.core.injector.LocationInjector;
import org.tizen.injector.location.core.protocol.GeoLocation;

class Coordinate$3$1
  extends Job
{
  Coordinate$3$1(Coordinate.3 param3, String paramString, GeoLocation paramGeoLocation)
  {
    super(paramString);
  }
  
  protected IStatus run(IProgressMonitor paramIProgressMonitor)
  {
    try
    {
      Coordinate.access$4(Coordinate.3.access$0(this$1), new LocationInjector());
      Coordinate.access$1(Coordinate.3.access$0(this$1)).inject(val$location, paramIProgressMonitor);
      if (paramIProgressMonitor.isCanceled())
      {
        localIStatus = Status.CANCEL_STATUS;
        return localIStatus;
      }
    }
    catch (IOException localIOException)
    {
      IStatus localIStatus = Status.CANCEL_STATUS;
      return localIStatus;
    }
    finally
    {
      Coordinate.access$4(Coordinate.3.access$0(this$1), null);
    }
    Coordinate.access$4(Coordinate.3.access$0(this$1), null);
    return Status.OK_STATUS;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Coordinate.3.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.swt.widgets.Button;
import org.tizen.injector.location.manual.Manual;

class Coordinate$3$2
  extends JobChangeAdapter
{
  Coordinate$3$2(Coordinate.3 param3) {}
  
  public void scheduled(IJobChangeEvent paramIJobChangeEvent)
  {
    Coordinate.access$0(Coordinate.3.access$0(this$1)).setEnabled(false);
    Coordinate.access$7(Coordinate.3.access$0(this$1)).setEnabled(true);
    ((Manual)Coordinate.3.access$0(this$1).getParent()).setSiblingsEnabled(false);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Coordinate.3.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import java.io.IOException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Text;
import org.tizen.injector.location.core.injector.LocationInjector;
import org.tizen.injector.location.core.protocol.GeoLocation;
import org.tizen.injector.location.manual.Manual;

class Coordinate$3
  extends SelectionAdapter
{
  Coordinate$3(Coordinate paramCoordinate) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    if ((Coordinate.access$1(this$0) != null) && (!Coordinate.access$1(this$0).isCanceld()))
    {
      Coordinate.access$0(this$0).setEnabled(false);
      localDouble1 = Double.valueOf(Double.parseDouble(Coordinate.access$2(this$0).getText().trim()));
      localDouble2 = Double.valueOf(Double.parseDouble(Coordinate.access$3(this$0).getText().trim()));
      localGeoLocation = new GeoLocation(localDouble1.doubleValue(), localDouble2.doubleValue());
      Coordinate.access$1(this$0).injectChange(localGeoLocation);
      return;
    }
    Double localDouble1 = Double.valueOf(Double.parseDouble(Coordinate.access$2(this$0).getText().trim()));
    Double localDouble2 = Double.valueOf(Double.parseDouble(Coordinate.access$3(this$0).getText().trim()));
    final GeoLocation localGeoLocation = new GeoLocation(localDouble1.doubleValue(), localDouble2.doubleValue());
    Coordinate.access$5(this$0, new Job("Inject Job")
    {
      protected IStatus run(IProgressMonitor paramAnonymousIProgressMonitor)
      {
        try
        {
          Coordinate.access$4(this$0, new LocationInjector());
          Coordinate.access$1(this$0).inject(localGeoLocation, paramAnonymousIProgressMonitor);
          if (paramAnonymousIProgressMonitor.isCanceled())
          {
            localIStatus = Status.CANCEL_STATUS;
            return localIStatus;
          }
        }
        catch (IOException localIOException)
        {
          IStatus localIStatus = Status.CANCEL_STATUS;
          return localIStatus;
        }
        finally
        {
          Coordinate.access$4(this$0, null);
        }
        Coordinate.access$4(this$0, null);
        return Status.OK_STATUS;
      }
    });
    Coordinate.access$6(this$0).addJobChangeListener(new JobChangeAdapter()
    {
      public void scheduled(IJobChangeEvent paramAnonymousIJobChangeEvent)
      {
        Coordinate.access$0(this$0).setEnabled(false);
        Coordinate.access$7(this$0).setEnabled(true);
        ((Manual)this$0.getParent()).setSiblingsEnabled(false);
      }
    });
    Coordinate.access$6(this$0).schedule();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Coordinate.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.tizen.injector.location.core.injector.LocationInjector;
import org.tizen.injector.location.manual.Manual;

class Coordinate$4
  extends SelectionAdapter
{
  Coordinate$4(Coordinate paramCoordinate) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    Coordinate.access$1(this$0).setCancel(true);
    if (Coordinate.access$6(this$0) != null) {
      try
      {
        Coordinate.access$6(this$0).join();
      }
      catch (InterruptedException localInterruptedException)
      {
        localInterruptedException.printStackTrace();
      }
    }
    Coordinate.access$0(this$0).setEnabled(this$0.validateValues());
    Coordinate.access$7(this$0).setEnabled(false);
    ((Manual)this$0.getParent()).setSiblingsEnabled(true);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Coordinate.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import java.io.IOException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.tizen.injector.location.core.injector.LocationInjector;
import org.tizen.injector.location.core.protocol.GeoLocation;
import org.tizen.injector.location.manual.Manual;
import org.tizen.injector.provider.AbstractInjectorItem;
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.util.FormPageUtil;

public class Coordinate
  extends AbstractInjectorPage
{
  private Text latitudeText;
  private Text longitudeText;
  private Button injectButton;
  private Button cancelButton;
  private LocationInjector injector = null;
  private Job injectJob = null;
  
  public Coordinate(AbstractInjectorItem paramAbstractInjectorItem, String paramString)
  {
    super(paramAbstractInjectorItem, paramString);
  }
  
  protected void createContents()
  {
    createCooridinateInputComposite();
  }
  
  protected void registerReceivers() {}
  
  private Control createCooridinateInputComposite()
  {
    Composite localComposite = formUtil.createComposite(parent, 2);
    formUtil.createLabel(localComposite, Messages.Coordinate_0);
    latitudeText = formUtil.createText(localComposite, "");
    latitudeText.addModifyListener(new ModifyListener()
    {
      public void modifyText(ModifyEvent paramAnonymousModifyEvent)
      {
        injectButton.setEnabled(validateValues());
      }
    });
    formUtil.createLabel(localComposite, Messages.Coordinate_2);
    longitudeText = formUtil.createText(localComposite, "");
    longitudeText.addModifyListener(new ModifyListener()
    {
      public void modifyText(ModifyEvent paramAnonymousModifyEvent)
      {
        injectButton.setEnabled(validateValues());
      }
    });
    injectButton = formUtil.createButton(localComposite, Messages.Coordinate_4, 8);
    injectButton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        if ((injector != null) && (!injector.isCanceld()))
        {
          injectButton.setEnabled(false);
          localDouble1 = Double.valueOf(Double.parseDouble(latitudeText.getText().trim()));
          localDouble2 = Double.valueOf(Double.parseDouble(longitudeText.getText().trim()));
          localGeoLocation = new GeoLocation(localDouble1.doubleValue(), localDouble2.doubleValue());
          injector.injectChange(localGeoLocation);
          return;
        }
        Double localDouble1 = Double.valueOf(Double.parseDouble(latitudeText.getText().trim()));
        Double localDouble2 = Double.valueOf(Double.parseDouble(longitudeText.getText().trim()));
        final GeoLocation localGeoLocation = new GeoLocation(localDouble1.doubleValue(), localDouble2.doubleValue());
        injectJob = new Job("Inject Job")
        {
          protected IStatus run(IProgressMonitor paramAnonymous2IProgressMonitor)
          {
            try
            {
              injector = new LocationInjector();
              injector.inject(localGeoLocation, paramAnonymous2IProgressMonitor);
              if (paramAnonymous2IProgressMonitor.isCanceled())
              {
                localIStatus = Status.CANCEL_STATUS;
                return localIStatus;
              }
            }
            catch (IOException localIOException)
            {
              IStatus localIStatus = Status.CANCEL_STATUS;
              return localIStatus;
            }
            finally
            {
              injector = null;
            }
            injector = null;
            return Status.OK_STATUS;
          }
        };
        injectJob.addJobChangeListener(new JobChangeAdapter()
        {
          public void scheduled(IJobChangeEvent paramAnonymous2IJobChangeEvent)
          {
            injectButton.setEnabled(false);
            cancelButton.setEnabled(true);
            ((Manual)getParent()).setSiblingsEnabled(false);
          }
        });
        injectJob.schedule();
      }
    });
    injectButton.setEnabled(false);
    cancelButton = formUtil.createButton(localComposite, Messages.Coordinate_6, 8);
    cancelButton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        injector.setCancel(true);
        if (injectJob != null) {
          try
          {
            injectJob.join();
          }
          catch (InterruptedException localInterruptedException)
          {
            localInterruptedException.printStackTrace();
          }
        }
        injectButton.setEnabled(validateValues());
        cancelButton.setEnabled(false);
        ((Manual)getParent()).setSiblingsEnabled(true);
      }
    });
    cancelButton.setEnabled(false);
    return localComposite;
  }
  
  boolean validateValues()
  {
    if (!latitudeText.getText().matches("[+|-]*[0-9]*[.]?[0-9]+"))
    {
      injectButton.setEnabled(false);
      return false;
    }
    double d = Double.parseDouble(latitudeText.getText());
    if ((d > 90.0D) || (d < -90.0D)) {
      return false;
    }
    if (!longitudeText.getText().matches("[+|-]*[0-9]*[.]?[0-9]+")) {
      return false;
    }
    d = Double.parseDouble(longitudeText.getText());
    return (d <= 180.0D) && (d >= -180.0D);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Coordinate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.manual.page;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.injector.location.manual.page.messages";
  public static String Coordinate_0;
  public static String Coordinate_2;
  public static String Coordinate_4;
  public static String Coordinate_6;
  
  static
  {
    NLS.initializeMessages("org.tizen.injector.location.manual.page.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.manual.page.Messages
 * Java Class Version: 6 (50.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