made it like...work

master
mgosselinUTC 2015-03-16 15:05:04 -04:00
parent 4ef866d39b
commit c08afe7736
5 changed files with 25 additions and 104 deletions

View File

@ -3,6 +3,5 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry combineaccessrules="false" kind="src" path="/MAndEngine"/>
<classpathentry combineaccessrules="false" kind="src" path="/MAndEncryptor"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,100 +0,0 @@
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import MAndEngine.BasicApp;
public class EncryptionForm implements BasicApp {
@Override
public Dimension getResolution() {
// TODO Auto-generated method stub
return null;
}
@Override
public void initialize() {
// TODO Auto-generated method stub
}
@Override
public void resumeApp() {
// TODO Auto-generated method stub
}
@Override
public void pauseApp() {
// TODO Auto-generated method stub
}
@Override
public void tick() {
// TODO Auto-generated method stub
}
@Override
public void render(Graphics2D g) {
// TODO Auto-generated method stub
}
@Override
public void keyPressed(KeyEvent e) {
// TODO Auto-generated method stub
}
@Override
public void keyReleased(KeyEvent e) {
// TODO Auto-generated method stub
}
@Override
public String getTitle() {
// TODO Auto-generated method stub
return null;
}
@Override
public Color getColor() {
// TODO Auto-generated method stub
return null;
}
@Override
public int getFramerate() {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean getResizable() {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean visibleInMenu() {
// TODO Auto-generated method stub
return false;
}
@Override
public void resized(int width, int height) {
// TODO Auto-generated method stub
}
@Override
public void click() {
// TODO Auto-generated method stub
}
}

View File

@ -25,7 +25,9 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
*
* this class is an image or folder item, even a gif player.
* the main class tells this puppy dog to render and if you press enter,
* this class tells maine where that item will bring it.
* @author Marcus
*
*/
@ -33,6 +35,7 @@ public class Item {
// to track when to advance frame
private long lastTime = System.currentTimeMillis();
// every how many ms?
private long interval = 100;
@ -69,9 +72,12 @@ public class Item {
try {
final File file = new File(path);
name = file.getName();
//TODO add mandencryptor compliance later
/*
if(name.endsWith(".enc")) {
name = Viewer.encryptor.nameTable.decrypt(name.substring(0, name.length() - 4));
}
*/
if (file.isDirectory()) {
try {
//so many locals, had to split it up
@ -142,9 +148,12 @@ public class Item {
path = file.getAbsolutePath();
name = file.getName();
//TODO add mandencryptor compliance later
/*
if(name.endsWith(".enc")) {
name = Viewer.encryptor.nameTable.decrypt(name.substring(0, name.length() - 4));
}
*/
} else if (path.equals("\\drives")) {
name = "Drives";

View File

@ -1,6 +1,11 @@
import MAndEngine.Engine;
/**
* creates an engine instance and run the main class on it.
*
* @author mgosselin
*
*/
public class Main {
public static void main(String[] args) {
new Main();

View File

@ -18,6 +18,14 @@ import MAndEngine.BasicApp;
import MAndEngine.Engine;
import MAndEngine.Variable;
/**
* does literally just about everything relating to rendering the images on the screens
* to taking in key events to navigate around. only thing it doesn't do is load in the
* images themselves, thats a job for item.
*
* @author mgosselin
*
*/
public class Viewer implements BasicApp {
public static final int THUMBNAIL_SIZE = 80;
@ -54,7 +62,7 @@ public class Viewer implements BasicApp {
private static Thread populationThread;
public static Encryptor encryptor = new Encryptor("bcnsfw");
//public static Encryptor encryptor = new Encryptor("");
@Override
public Dimension getResolution() {