Skip to content

Commit

Permalink
Removed unused Files from sources
Browse files Browse the repository at this point in the history
  • Loading branch information
thothbot committed Feb 12, 2016
1 parent 72fd105 commit 699f6e0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 91 deletions.
30 changes: 0 additions & 30 deletions parallax/src/org/parallax3d/parallax/Files.java

This file was deleted.

6 changes: 2 additions & 4 deletions parallax/src/org/parallax3d/parallax/files/FileHandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@

package org.parallax3d.parallax.files;

import org.parallax3d.parallax.Files;
import org.parallax3d.parallax.system.ParallaxRuntimeException;
import org.parallax3d.parallax.system.StreamUtils;

import java.io.*;

/** Represents a file or directory on the filesystem, classpath, Android SD card, or Android assets directory. FileHandles are
* created via a {@link Files} instance.
/** Represents a file or directory on the filesystem, classpath, Android SD card, or Android assets directory.
*
* Because some of the file types are backed by composite files and may be compressed (for example, if they are in an Android .apk
* or are found via the classpath), the methods for extracting a {@link #path()} or {@link #file()} may not be appropriate for all
Expand All @@ -41,7 +39,7 @@ protected FileHandle () {
}

/** Creates a new absolute FileHandle for the file name. Use this for tools on the desktop that don't need any of the platforms.
* Do not use this constructor in case you write something cross-platforms. Use the {@link Files} interface instead.
* Do not use this constructor in case you write something cross-platforms.
* @param fileName the filename. */
public FileHandle (String fileName) {
this(new File(fileName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@

public class GwtApp implements Parallax.App {

private final Storage LocalStorage = Storage.getLocalStorageIfSupported();
public final Storage LocalStorage = Storage.getLocalStorageIfSupported();

Preloader preloader;

AgentInfo agentInfo;
static AgentInfo agentInfo;
GwtAppConfiguration config;

protected GwtApp(){};
Expand Down Expand Up @@ -79,7 +79,7 @@ public static void init(final Parallax.AppListener appListener) {

/** Contains precomputed information on the user-agent. Useful for dealing with browser and OS behavioral differences. Kindly
* borrowed from PlayN */
public AgentInfo agentInfo () {
public static AgentInfo agentInfo() {
return agentInfo;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.parallax3d.parallax.platforms.gwt;

import org.parallax3d.parallax.Parallax;
import org.parallax3d.parallax.Preferences;
import org.parallax3d.parallax.system.FastMap;
import org.parallax3d.parallax.system.ParallaxRuntimeException;
Expand All @@ -31,10 +32,10 @@ public class GwtPreferences implements Preferences {
this.prefix = prefix + ":";
int prefixLength = this.prefix.length();
try {
for (int i = 0; i < GwtFiles.LocalStorage.getLength(); i++) {
String key = GwtFiles.LocalStorage.key(i);
for (int i = 0; i < ((GwtApp)Parallax.app()).LocalStorage.getLength(); i++) {
String key = ((GwtApp)Parallax.app()).LocalStorage.key(i);
if (key.startsWith(prefix)) {
String value = GwtFiles.LocalStorage.getItem(key);
String value = ((GwtApp)Parallax.app()).LocalStorage.getItem(key);
values.put(key.substring(prefixLength, key.length() - 1), toObject(key, value));
}
}
Expand Down Expand Up @@ -139,16 +140,16 @@ public void remove(String key) {
public void flush() {
try {
// remove all old values
for (int i = 0; i < GwtFiles.LocalStorage.getLength(); i++) {
String key = GwtFiles.LocalStorage.key(i);
if (key.startsWith(prefix)) GwtFiles.LocalStorage.removeItem(key);
for (int i = 0; i < ((GwtApp)Parallax.app()).LocalStorage.getLength(); i++) {
String key = ((GwtApp)Parallax.app()).LocalStorage.key(i);
if (key.startsWith(prefix)) ((GwtApp)Parallax.app()).LocalStorage.removeItem(key);
}

// push new values to LocalStorage
for (String key : values.keySet()) {
String storageKey = toStorageKey(key, values.get(key));
String storageValue = "" + values.get(key).toString();
GwtFiles.LocalStorage.setItem(storageKey, storageValue);
((GwtApp)Parallax.app()).LocalStorage.setItem(storageKey, storageValue);
}

} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.parallax3d.parallax.platforms.gwt.generator;

import org.parallax3d.parallax.Files;
import org.parallax3d.parallax.system.ParallaxRuntimeException;
import org.parallax3d.parallax.system.StreamUtils;

Expand All @@ -28,12 +27,8 @@
public class FileWrapper {
protected File file;

protected FileWrapper () {
}
protected FileWrapper () {}

/** Creates a new absolute FileHandle for the file name. Use this for tools on the desktop that don't need any of the backends.
* Do not use this constructor in case you write something cross-platform. Use the {@link Files} interface instead.
* @param fileName the filename. */
public FileWrapper (String fileName) {
this.file = new File(fileName);
}
Expand Down

0 comments on commit 699f6e0

Please sign in to comment.