diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
| commit | c015d586d22b69078b6da61858e5675793856b0b (patch) | |
| tree | efbc9881cf59363abef52a0beb5eedf9e81a224a /sources/utils | |
| parent | 62fe28f0b0b0c9ebde18a6dc33907889ff3aa21b (diff) | |
JAutoDoc :)
Diffstat (limited to 'sources/utils')
| -rw-r--r-- | sources/utils/VSClassLoader.java | 16 | ||||
| -rw-r--r-- | sources/utils/VSFrame.java | 41 | ||||
| -rw-r--r-- | sources/utils/VSInfoArea.java | 20 | ||||
| -rw-r--r-- | sources/utils/VSPriorityQueue.java | 16 | ||||
| -rw-r--r-- | sources/utils/VSRandom.java | 24 | ||||
| -rw-r--r-- | sources/utils/VSTools.java | 24 | ||||
| -rw-r--r-- | sources/utils/VSTupel.java | 36 |
7 files changed, 177 insertions, 0 deletions
diff --git a/sources/utils/VSClassLoader.java b/sources/utils/VSClassLoader.java index 3091fec..8d4f784 100644 --- a/sources/utils/VSClassLoader.java +++ b/sources/utils/VSClassLoader.java @@ -1,8 +1,24 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package utils; +// TODO: Auto-generated Javadoc +/** + * The Class VSClassLoader. + */ public class VSClassLoader extends ClassLoader { + + /** + * New instance. + * + * @param classname the classname + * + * @return the object + */ public Object newInstance(String classname) { Object object = null; diff --git a/sources/utils/VSFrame.java b/sources/utils/VSFrame.java index 608011b..ad2b54c 100644 --- a/sources/utils/VSFrame.java +++ b/sources/utils/VSFrame.java @@ -1,30 +1,65 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package utils; import java.awt.*; import java.awt.event.*; import javax.swing.JFrame; +// TODO: Auto-generated Javadoc +/** + * The Class VSFrame. + */ public class VSFrame extends JFrame { + + /** The Constant X_LOCATION_OFFSET. */ private final static int X_LOCATION_OFFSET = 40; + + /** The Constant Y_LOCATION_OFFSET. */ private final static int Y_LOCATION_OFFSET = 80; + + /** The parent. */ private Component parent; + + /** The dispose. */ private boolean dispose; + /** + * Instantiates a new vS frame. + * + * @param title the title + * @param parent the parent + */ public VSFrame(String title, Component parent) { super(title); init(parent); } + /** + * Instantiates a new vS frame. + * + * @param title the title + */ public VSFrame(String title) { super(title); init(null); } + /** + * Inits the. + * + * @param parent the parent + */ private void init(Component parent) { this.parent = parent; this.dispose = false; } + /** + * Dispose with parent. + */ public void disposeWithParent() { if (!dispose && parent != null && parent instanceof Window) { Window window = (Window) parent; @@ -37,6 +72,9 @@ public class VSFrame extends JFrame { dispose = true; } + /** + * Sets the correct location. + */ private void setCorrectLocation() { int x = 0, y = 0; final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); @@ -62,6 +100,9 @@ public class VSFrame extends JFrame { super.setLocation(x, y); } + /* (non-Javadoc) + * @see java.awt.Window#setSize(int, int) + */ public void setSize(int width, int height) { super.setSize(width, height); setCorrectLocation(); diff --git a/sources/utils/VSInfoArea.java b/sources/utils/VSInfoArea.java index c1afd42..241b8f8 100644 --- a/sources/utils/VSInfoArea.java +++ b/sources/utils/VSInfoArea.java @@ -1,19 +1,39 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package utils; import java.awt.*; import javax.swing.*; import javax.swing.border.*; +// TODO: Auto-generated Javadoc +/** + * The Class VSInfoArea. + */ public class VSInfoArea extends JTextPane { + + /** + * Instantiates a new vS info area. + */ public VSInfoArea() { init(); } + /** + * Instantiates a new vS info area. + * + * @param text the text + */ public VSInfoArea(String text) { setText(text); init(); } + /** + * Inits the. + */ private void init() { setOpaque(false); setBorder(null); diff --git a/sources/utils/VSPriorityQueue.java b/sources/utils/VSPriorityQueue.java index dd46a6e..7458a54 100644 --- a/sources/utils/VSPriorityQueue.java +++ b/sources/utils/VSPriorityQueue.java @@ -1,8 +1,24 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package utils; import java.util.PriorityQueue; +// TODO: Auto-generated Javadoc +/** + * The Class VSPriorityQueue. + */ public final class VSPriorityQueue<T> extends PriorityQueue<T> { + + /** + * Gets the. + * + * @param index the index + * + * @return the t + */ public T get(int index) { int i = 0; diff --git a/sources/utils/VSRandom.java b/sources/utils/VSRandom.java index 4f23e7e..088da4f 100644 --- a/sources/utils/VSRandom.java +++ b/sources/utils/VSRandom.java @@ -1,16 +1,40 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package utils; import java.util.Random; +// TODO: Auto-generated Javadoc +/** + * The Class VSRandom. + */ public final class VSRandom extends Random { + + /** + * Instantiates a new vS random. + * + * @param seedAdd the seed add + */ public VSRandom(long seedAdd) { super(seedAdd*System.currentTimeMillis()+seedAdd); } + /* (non-Javadoc) + * @see java.util.Random#nextInt() + */ public int nextInt() { return Math.abs(super.nextInt()); } + /** + * Next long. + * + * @param mod the mod + * + * @return the long + */ public long nextLong(long mod) { return Math.abs((super.nextLong() + System.currentTimeMillis()) % mod); } diff --git a/sources/utils/VSTools.java b/sources/utils/VSTools.java index b1eab28..a6c34a0 100644 --- a/sources/utils/VSTools.java +++ b/sources/utils/VSTools.java @@ -1,7 +1,23 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package utils; +// TODO: Auto-generated Javadoc +/** + * The Class VSTools. + */ public final class VSTools { + + /** + * Gets the time string. + * + * @param time the time + * + * @return the time string + */ public static String getTimeString(long time) { String ret = ""+time; @@ -10,6 +26,14 @@ public final class VSTools { return ret + "ms"; } + + /** + * Gets the string time. + * + * @param string the string + * + * @return the string time + */ public static long getStringTime(String string) { try { /* Ignore the "ms" postfix */ diff --git a/sources/utils/VSTupel.java b/sources/utils/VSTupel.java index f2c6f87..2fea87a 100644 --- a/sources/utils/VSTupel.java +++ b/sources/utils/VSTupel.java @@ -1,24 +1,60 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package utils; +// TODO: Auto-generated Javadoc +/** + * The Class VSTupel. + */ public final class VSTupel<A,B,C> { + + /** The a. */ private A a; + + /** The b. */ private B b; + + /** The c. */ private C c; + /** + * Instantiates a new vS tupel. + * + * @param a the a + * @param b the b + * @param c the c + */ public VSTupel(A a, B b, C c) { this.a = a; this.b = b; this.c = c; } + /** + * Gets the a. + * + * @return the a + */ public A getA() { return a; } + /** + * Gets the b. + * + * @return the b + */ public B getB() { return b; } + /** + * Gets the c. + * + * @return the c + */ public C getC() { return c; } |
