Skip to content

Commit

Permalink
change the base package path
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanggang13 committed Feb 13, 2017
1 parent edc137a commit 987fee0
Show file tree
Hide file tree
Showing 201 changed files with 230 additions and 251 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.applet;
package org.dean.examples.applet;
import java.applet.*; // Don't forget this import statement!
import java.awt.*; // Or this one for the graphics!
import java.util.Date; // To obtain the current time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.applet;
import java.applet.*;
package org.dean.examples.applet;
import java.awt.*;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.applet;
package org.dean.examples.applet;
import java.applet.*;
import java.awt.*;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.applet;
package org.dean.examples.applet;
import java.applet.*; // Don't forget this import statement!
import java.awt.*; // Or this one for the graphics!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.applet;
package org.dean.examples.applet;
import java.applet.*;
import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.applet;
package org.dean.examples.applet;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This program prints out all its command-line arguments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This program computes and displays the factorial of a number specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;
import java.io.*; // Import all classes in java.io package. Saves typing.

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;
/**
* This class doesn't define a main() method, so it isn't a program by itself.
* It does define a useful method that we can use in other programs, though.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;
/**
* This class shows a recursive method to compute factorials. This method
* calls itself repeatedly based on the formula: n! = n * (n-1)!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This class computes factorials and caches the results in a table for reuse.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

// Import some other classes we'll use in this example.
// Once we import a class, we don't have to type its full name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;
/**
* This program prints out the first 20 numbers in the Fibonacci sequence.
* Each term is formed by adding together the previous two terms in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This program plays the game "Fizzbuzz". It counts to 100, replacing each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This class is much like the FizzBuzz class, but uses a switch statement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics; // A unique class name prefix
package org.dean.examples.basics; // A unique class name prefix
public class Hello { // Everything in Java is a class
public static void main(String[] args) { // All programs must have main()
System.out.println("Hello World!"); // Say hello!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This program echos the command-line arguments backwards.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;
import java.io.*; // We're doing input, so import I/O classes

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This program computes prime numbers using the Sieve of Eratosthenes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
package org.dean.examples.basics;

/**
* This class demonstrates how to sort numbers using a simple algorithm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;

/** This class defines an enumerated type with three values */
public class Alignment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;
import java.beans.*;
import java.awt.*;

/**
* This PropertyEditor defines the enumerated values of the alignment property
Expand All @@ -33,11 +32,11 @@ public void setAsText(String s) {
public String getJavaInitializationString() {
Object o = getValue();
if (o == Alignment.LEFT)
return "com.davidflanagan.examples.beans.Alignment.LEFT";
return "Alignment.LEFT";
if (o == Alignment.CENTER)
return "com.davidflanagan.examples.beans.Alignment.CENTER";
return "Alignment.CENTER";
if (o == Alignment.RIGHT)
return "com.davidflanagan.examples.beans.Alignment.RIGHT";
return "Alignment.RIGHT";
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;

/**
* The YesNoPanel class fires an event of this type when the user clicks one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;

/**
* Classes that want to be notified when the user clicks a button in a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;
import java.awt.*;
import java.util.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;
import java.beans.*;
import java.lang.reflect.*;
import java.awt.*;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.beans;
package org.dean.examples.beans;
import java.beans.*;
import java.awt.*;
import java.awt.event.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;
/**
* A class to compute the running average of numbers passed to it
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;
import java.awt.*;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;

/**
* This class represents complex numbers, and defines methods for performing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;
/**
* This is a subclass of Rect that allows itself to be drawn on a screen.
* It inherits all the fields and methods of Rect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;

/**
* This class implements a linked list that can contain any type of object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;
/**
* This class defines methods for computing pseudo-random numbers, and defines
* the state variable that needs to be maintained for use by those methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;
/**
* This class represents a rectangle. Its fields represent the coordinates
* of the corners of the rectangle. Its methods define operations that can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;

/** This class demonstrates how you might use the Rect class */
public class RectTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.classes;
package org.dean.examples.classes;
// These are some classes we need for internationalized string sorting
import java.text.Collator;
import java.text.CollationKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.datatransfer;
package org.dean.examples.datatransfer;
import java.awt.*;
import java.awt.geom.*;
import java.awt.datatransfer.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.datatransfer;
package org.dean.examples.datatransfer;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.datatransfer;
package org.dean.examples.datatransfer;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
Expand Down
Loading

0 comments on commit 987fee0

Please sign in to comment.