text stringlengths 3 1.18M |
|---|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* findOrderUI.java
*
* Created on Jan 16, 2011, 7:30:07 PM
*/
package UILayer.Screens;
import UILayer.MainGuiView;
/**
*
* @author Daniel
*/
public class FindOrderUI extends javax.swing.JPanel {
MainGu... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package UILayer;
import java.awt.Component;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
/**
*
* @author Moulde
*/
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* SaleCreatedDialog.java
*
* Created on 15-01-2011, 17:45:29
*/
package UILayer;
import ControlLayer.PriceCalculator;
import ModelLayer.Car;
import ModelLayer.Product;
import ModelLayer.SalesLine;
import ModelL... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* ErrorOccuredDialog.java
*
* Created on 12-01-2011, 22:12:51
*/
package UILayer;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
/**
*
* @author Moulde
... |
/*
* SemProjektGUIView.java
*/
package UILayer;
import ControlLayer.CustomerPickedEvent;
import ControlLayer.GlobalInstances;
import ControlLayer.ICustomerPickedEventListener;
import ControlLayer.ILoginStateChangedEventListener;
import ControlLayer.LoginStateChangedEvent;
import ModelLayer.Actor;
import UILayer.Scre... |
/*
* SemProjektGUIApp.java
*/
package UILayer;
import java.util.logging.Logger;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
/**
* The main class of the application.
*/
public class MainGuiApp extends SingleFrameApplication
{
/**
* At startup create... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Prototypes;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JPanel;
/**
*
* @author Moulde
*/
... |
package blog.test1;
import javax.swing.*;
import javax.swing.plaf.basic.BasicButtonUI;
import java.awt.*;
import java.awt.event.*;
/**
* Component to be used as as tabComponent;
* Contains a JLabel to show the text and
* a JButton to close the tab it belongs to
*/
public class ButtonTabComponentSec extends JPanel... |
package Prototypes;
import javax.swing.*;
import java.awt.*;
/**
* Component to be used as tabComponent;
* contains two JLabels to show the title and the icon
* for each tab, takes title and icon from the JTabbedPane
* so always shows up-to-date information
*
* @author Alexander Potochkin
*/
public class Label... |
package Prototypes;
import javax.swing.*;
import javax.swing.*;
import javax.swing.plaf.basic.BasicButtonUI;
import java.awt.*;
import java.awt.event.*;
/**
* Component to be used as tabComponent;
* Contains a JLabel to show the text and
* a JButton to close the tab it belongs to
*/
public class ButtonTabComponen... |
package DBLayer;
import DBLayer.Interfaces.IContainer;
import ModelLayer.Supplier;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
public class DBSupplier extends DatabaseAccess implements IContainer<Supplier>
{
public DBSupplier()
{
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import DBLayer.Interfaces.IContainer;
import ModelLayer.Customer;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.l... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import DBLayer.Interfaces.IContainer;
import ModelLayer.SalesLine;
import java.util.ArrayList;
/**
*
* @author Evil
*/
public class DBSalesLine extends DatabaseAccess implements IContainer<SalesLin... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import DBLayer.Interfaces.IContainer;
import ModelLayer.OrderLine;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.l... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//ResultSetGenericModelBinder binder = new ResultSetGenericModelBinder();
//ArrayList<ImportCar> items = binder.BindModels(results);
package DBLayer;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import... |
package DBLayer;
import java.sql.*;
/**
* @Author Kis Boisen Hansen
* @Version 2006.10.02 - revised marts 2009 FEN
* @version 2010.10.07 - new connection
* This class is used to create the connection to the database
* It is implementet as a singelton. The constructor is private to encure that only
* one objec... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import DBLayer.Interfaces.IContainer;
import ModelLayer.SalesOrder;
import java.util.ArrayList;
/**
*
* @author Evil
*/
public class DBSalesOrder extends DatabaseAccess implements IContainer<SalesO... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import DBLayer.Interfaces.IContainer;
import ModelLayer.Car;
import ModelLayer.CarColor;
import ModelLayer.CarEngine;
import ModelLayer.Product;
import java.sql.PreparedStatement;
import java.sql.Result... |
package DBLayer.Interfaces;
import java.util.ArrayList;
/**
*
* @author Moulde
*/
public interface IContainer<T>
{
//Returns an object from the container
public T getObject(int ID);
//Returns an arraylist with objects from the container
public ArrayList<T> getObjects();
//Stores the actor in th... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import ControlLayer.HelperMethods;
import DBLayer.Interfaces.IContainer;
import ModelLayer.Actor;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arr... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import DBLayer.Interfaces.IContainer;
import ModelLayer.Employee;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.loggin... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DBLayer;
import ControlLayer.GlobalInstances;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logg... |
package DBLayer;
import ControlLayer.GlobalInstances;
import DBLayer.Interfaces.IContainer;
import ModelLayer.Order;
import ModelLayer.OrderLine;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDat... |
package DBLayer;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This Annotation is used to map the field of a java class to a column in the database if the field name doesnt match.
* @author Mould... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
/**
*
* @author Moulde
*/
public class Product
{
@MapName(ColumnName = "ID")
protected int productID;
protected int minStock;
protected int maxStock;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
import java.util.ArrayList;
/**
*
* @author Evil
*/
public class Order
{
@MapName(ColumnName = "ID")
private int orderID;
private int employeeID;
private ... |
package ModelLayer;
import java.util.ArrayList;
import DBLayer.MapName;
import java.io.InvalidObjectException;
/**
*
* @author Moulde
*/
public class Actor
{
@MapName(ColumnName="Name")
private String name;
@MapName(ColumnName="Address")
private String address;
@MapName(ColumnName="Phonenumber"... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
/**
*
* @author Moulde
*/
public class Customer extends Role
{
@MapName(ColumnName="ID")
private int customerID;
private int totalSpent;
public Custo... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
/**
*
* @author Evil
*/
public class CarColor
{
@MapName(ColumnName="ID")
private int colorID;
@MapName(ColumnName="Color")
private String color;
@Map... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
/**
*
* @author Moulde
*/
public class Car extends Product
{
@MapName(ColumnName="Brand")
private String brand;
@MapName(ColumnName="Model")
private Strin... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
/**
*
* @author Evil
*/
public class CarEngine
{
@MapName(ColumnName="ID")
private int engineID;
@MapName(ColumnName="Fuel")
private String fuel;
@Map... |
package ModelLayer;
import ControlLayer.HelperMethods;
import DBLayer.MapName;
/**
*
* @author Evil
*/
public class Employee extends Role //implements Cloneable
{
@MapName(ColumnName = "ID")
private int employeeID;
@MapName(ColumnName = "Salary")
private int salary;
@MapName(ColumnName = "Passw... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
import java.io.InvalidObjectException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Evil
*/
public class S... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer.Interfaces;
/**
*
* @author Moulde
*/
public interface IRole {
public String getRole();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import DBLayer.MapName;
/**
*
* @author Evil
*/
public class SalesLine
{
private SalesOrder order;
private Product product;
@MapName(ColumnName = "Quantity")
private int quantity... |
package ModelLayer;
import DBLayer.MapName;
/**
*
* @author Evil
*/
public class OrderLine
{
private Order order;
private Product product;
@MapName(ColumnName = "Quantity")
private int quantity;
@MapName(ColumnName = "ProductID")
private int productID;
@MapName(ColumnName = "OrderID")
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ModelLayer;
import ModelLayer.Interfaces.IRole;
/**
*
* @author Moulde
*/
public abstract class Role implements IRole
{
public static final String Employee = "employee";
public static final String S... |
package ModelLayer;
import DBLayer.MapName;
public class Supplier extends Role
{
@MapName(ColumnName="ID")
private int supplierID;
private int roleID;
public Supplier()
{
}
/**
* Get the value of roleID
*
* @return the value of roleID
*/
public int getRoleID()
... |
package CtrlLayer;
import java.util.ArrayList;
import ModelLayer.*;
import DBLayer.*;
//Handles the complete order from the table with food, wine and bill//
public class OrderCtrl
{
private Order order;
private PartOrder partOrder;
private MonthMenu1 monthMenu;
private ArrayList<PartOrder> partOrde... |
package CtrlLayer;
import ModelLayer.*;
import ModelLayer.Menu;
import ModelLayer.Drinks;
import ModelLayer.Wines;
public class MenuCtrl {
public void createMenu(int _id, String _name, String _ingredients, String _information, double _price, String _category, MonthMenu1 _monthMenu)
{
Menu newM... |
package DBLayer;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import ModelLayer.Drinks;
public abstract class DBDrinks implements IFDBDrinks
{
private Connection con;
public DBDrinks()
{
con = DBConnection1.getInstance().getDBcon();
... |
package DBLayer;
import java.sql.*;
public class DBConnection1
{
//constants used to get access to the database
//SQL Server
private static final String driver = "jdbc:sqlserver://Balder.ucn.dk";
private static final String databaseName = ";databaseName=dmaa0912_8";
//SQL Server
private static final ... |
package DBLayer;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.SQLException;
import ModelLayer.Menu;
public abstract class DBMenu implements IFDBMenu
{
private Connection con;
public DBMenu()
{
con = DBConnection1.getInstance().getDBcon();
... |
package DBLayer;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBMenu
{
// get all Department
public ArrayList<Menu> getAllDepartment(boolean retriveAssociation);
//get one Menu having the ID
public Menu findDepartment(int dno, boolean retriveAssociation);
//fi... |
package DBLayer;
import java.sql.*;
/**
* GetMax.java
* @author kbh
* @version 26. oktober 2006
*/
public class GetMax {
/** Creates a new instance of GetMax */
public GetMax() {
}
//getMax is for the primary key in the table
public static int getMaxId(String query){
... |
package DBLayer;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import ModelLayer.Wines;
public abstract class DBWines implements IFDBMenu
{
private Connection con;
public DBWines()
{
con = DBConnection1.getInstance().getDBcon();
... |
package DBLayer;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBDrinks
{
// get all Department
public ArrayList<Drinks> getAllDepartment(boolean retriveAssociation);
//get one Menu having the ID
public Drinks findDepartment(int dno, boolean retriveAssociation);
... |
package DBLayer;
import java.sql.Date;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBOrder
{
//insert new Menu
public int addFinalOrder(int orderId, int tableNr);
public int addPartOrders(int partOrderId, int amount, int orderId, int mId, int wId, int dId, int m... |
package DBLayer;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBWines
{
// get all Department
public ArrayList<Wines> getAllDepartment(boolean retriveAssociation);
//get one Menu having the ID
public Wines findDepartment(int dno, boolean retriveAssociation);
/... |
package ModelLayer;
public class Starter {
private String name;
private String ingredients;
private String information;
private int price;
/**
* Constructor for objects of class Starter.
* @param _name
* @param _ingredients
* @param _information
* @param _price
*/
public Starter(String _name... |
package ModelLayer;
public class Drinks {
private int id;
private String name;
private String information;
private double price;
/**
* Constructor for objects of class Drinks.
* @param _name
* @param _information
* @param _price
*/
public Drinks(int _id, String _name, String _information, ... |
package ModelLayer;
public class Table {
private int tableNr;
private int amount;
private Table(int _amount, int _tableNr)
{
tableNr = _tableNr;
amount = _amount;
}
public void newTable(int _amount, int _tableNr)
{
tableNr = _tableNr;
amount = _amount;
}
public void se... |
package ModelLayer;
import java.util.ArrayList;
public class Order
{
private int orderId;
private int tableNr;
private double totalPrice;
private ArrayList<PartOrder> partOrderList;
public Order()
{
orderId = -1;
tableNr = 22;
partOrderList = new ArrayList<PartOrder>();
}
public vo... |
package ModelLayer;
public class Menu {
private int id;
private String name;
private String ingredients;
private String information;
private double price;
private String category;
/**
* Constructor for objects of class Menu.
* @param _id
* @param _name
* @param _ingredients
*... |
package ModelLayer;
public class MainCourse
{
public String name;
public String ingredients;
public String information;
public double price;
/**
* Constructor for objects of class MainCourse.
* @param _name
* @param _ingredients
* @param _information
* @param _price
*/
public MainCourse(St... |
package ModelLayer;
public class Bill {
private double price;
private String date;
private Bill(double _price, String _date)
{
price = _price;
date = _date;
}
public void setPrice( double _price)
{
price = _price;
}
public void setDate( String _date)
{
date = _date;
}
pu... |
package ModelLayer;
public class MonthMenu1 {
public int id;
public String name;
public String information;
public boolean pommes;
public boolean bagtKartoffel;
public boolean ekstra100;
public double price;
/**
* Constructor for the objects of class MonthMenu1.
* @param _menuName
* @par... |
package ModelLayer;
public class Dessert
{
private String name;
private String ingredients;
private String information;
private double price;
/**
* Constructor for objects of class Dessert.
* @param _name
* @param _ingredients
* @param _information
* @param _price
*/
public Desser... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Scrollbar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.ImageIcon;
import javax.swing.JButton;
imp... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Scrollbar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.ImageIcon;
import javax.swing.JButton;
imp... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
impo... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Scrollbar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
impo... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Scrollbar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
impo... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Scrollbar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
impo... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Scrollbar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
impo... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
... |
package GUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Scrollbar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
impo... |
package name.lemonedo.iidx.record;
import java.io.File;
import java.io.IOException;
/**
*
* @author LEE Chungmin
*/
class RecordReaderGold extends AbstractRecordReader {
RecordReaderGold(File saveFile) throws IOException {
super(Version.GOLD, saveFile, "gold.txt", new MetaInfo(99480, 20));
}... |
package name.lemonedo.iidx.record;
/**
* An integer value, capable of being undefined.
*
* @author LEE Chungmin
*/
public interface Value extends Comparable<Value> {
/**
* Returns <code>true</code> if it is defined, i.e., its value is in the valid
* range.
*
* @return <code>true</co... |
package name.lemonedo.iidx.record;
/**
*
* @author LEE Chungmin
*/
public enum Version {
IIDX_RED, HAPPY_SKY, DISTORTED, GOLD;
@Override
public String toString() {
switch (this) {
case IIDX_RED:
return "beatmaniaIIDX 11 IIDX RED";
case HAPPY_SKY:
return "beatmaniaIID... |
package name.lemonedo.iidx.record;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
*
* @author LEE Chungmin
*/
class SongListReader {
// prevent instantiation
private SongListReader() {}
static List<Song> read(String name) {
... |
package name.lemonedo.iidx.record.app;
import java.io.*;
import java.util.*;
import name.lemonedo.iidx.record.*;
import name.lemonedo.iidx.record.util.*;
/**
*
* @author LEE Chungmin
*/
public class RecordExtractor {
private final HtmlPrinter htmlPrinter;
/**
* Constructs a new <code>Re... |
package name.lemonedo.iidx.record.app;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import name.lemonedo.util.Utf8ResourceBundle;
/**
*
* @author LEE Chungmin
*/
class Messages {
private static final String BUNDLE_NAME =
"name.lemonedo.iidx.record.app.message... |
package name.lemonedo.iidx.record.app;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
/**
*
* @author LEE Chungmin
*/
class Launcher {
static {
try {
UIManager.getInstalledLookAndFeels();
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}... |
package name.lemonedo.iidx.record.app;
import name.lemonedo.util.UnaryFunction;
import edu.stanford.ejalbert.BrowserLauncher;
import edu.stanford.ejalbert.exceptionhandler.BrowserLauncherErrorHandler;
/**
*
* @author LEE Chungmin
*/
final class BrowserLauncherWrapper extends BrowserLauncher {
Brows... |
package name.lemonedo.iidx.record.app;
import java.io.IOException;
import java.util.Scanner;
import java.net.URL;
import java.net.URLConnection;
/**
*
* @author LEE Chungmin
*/
class UpdateChecker {
private static final String VERSION = "0.30";
private static final String UPDATE_CHECK_URL =
... |
package name.lemonedo.iidx.record.app;
import static javax.swing.BorderFactory.createTitledBorder;
import static javax.swing.JOptionPane.CANCEL_OPTION;
import static javax.swing.JOptionPane.ERROR_MESSAGE;
import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
import static javax.swing.JOptionPane.OK_CANCEL_O... |
package name.lemonedo.iidx.record;
/**
* For IIDX RED - DistorteD. From GOLD, the parsing method is different.
*
* @author LEE Chungmin
*/
class RecordReaderHelper {
static Record parseRecord(byte[][] b, Version v, Song s, PlayMode m) {
if (b[0][20] == 9)
return null;
return Record.ne... |
package name.lemonedo.iidx.record;
import java.io.File;
import java.io.IOException;
/**
*
* @author LEE Chungmin
*/
class RecordReaderHappySky extends AbstractRecordReader {
RecordReaderHappySky(File saveFile) throws IOException {
super(Version.HAPPY_SKY, saveFile, "happysky.txt",
new ... |
package name.lemonedo.iidx.record;
import static name.lemonedo.iidx.record.PlayMode.DA;
import static name.lemonedo.iidx.record.PlayMode.DH;
import static name.lemonedo.iidx.record.PlayMode.DN;
import static name.lemonedo.iidx.record.PlayMode.SA;
import static name.lemonedo.iidx.record.PlayMode.SH;
import stati... |
package name.lemonedo.iidx.record;
/**
* Difficulty for a song with a play mode. The valid range is
* 1-12 (inclusive).
*
* @author LEE Chungmin
*/
public class Difficulty implements Value {
/**
* A constant for undefined <code>Difficulty</code>.
*/
public static final Difficulty UNDEFINE... |
package name.lemonedo.iidx.record;
import java.io.File;
import java.io.IOException;
/**
*
* @author LEE Chungmin
*/
class RecordReaderDistorted extends AbstractRecordReader {
RecordReaderDistorted(File saveFile) throws IOException {
super(Version.DISTORTED, saveFile, "distorted.txt",
n... |
package name.lemonedo.iidx.record;
import static name.lemonedo.iidx.record.Version.DISTORTED;
import static name.lemonedo.iidx.record.Version.GOLD;
import static name.lemonedo.iidx.record.Version.HAPPY_SKY;
import static name.lemonedo.iidx.record.Version.IIDX_RED;
import java.io.File;
import java.io.IOExcepti... |
package name.lemonedo.iidx.record;
import java.io.File;
import java.io.IOException;
/**
* @author LEE Chungmin
*
*/
class RecordReaderIidxRed extends AbstractRecordReader {
RecordReaderIidxRed(File saveFile) throws IOException {
super(Version.IIDX_RED, saveFile, "iidxred.txt",
new MetaI... |
package name.lemonedo.iidx.record;
/**
* A common value in IIDX. The valid range is 0-9999 (inclusive).
*
* @author LEE Chungmin
*/
public class CommonValue implements Value {
/**
* A constant for undefined <code>CommonValue</code>.
*/
public static final CommonValue UNDEFINED = new CommonV... |
package name.lemonedo.iidx.record;
import java.util.List;
/**
*
* @author LEE Chungmin
*/
public interface RecordReader {
/**
* Returns the version of this reader.
*
* @return the version of this reader.
*/
public Version getVersion();
/**
* Returns a list of records of t... |
package name.lemonedo.iidx.record;
import java.util.EnumMap;
/**
*
* @author LEE Chungmin
*/
public class Song {
private static final String TO_STRING_FORMAT = "GENRE: %s, TITLE: %s, ARTIS" +
"T: %s";
private final String genre;
private final String title;
private final String artis... |
package name.lemonedo.iidx.record;
/**
*
* @author LEE Chungmin
*/
public enum PlayMode {
SN {
public boolean isAnother() { return false; }
public boolean isDoubleMode() { return false; };
public String getOldName() { return "L7"; }
},
SH {
public boolean isAnother() { return f... |
package name.lemonedo.iidx.record.util;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Formatter;
import java.util.LinkedHa... |
package name.lemonedo.iidx.record;
import java.util.Comparator;
/**
*
* @author LEE Chungmin
*/
public class Record {
public static final Comparator<Record> TITLE_ORDER;
public static final Comparator<Record> DIFFICULTY_ORDER;
public static final Comparator<Record> PLAY_MODE_ORDER;
static ... |
package name.lemonedo.util;
/**
*
* @author LEE Chungmin
*/
import java.io.UnsupportedEncodingException;
import java.util.Enumeration;
import java.util.Locale;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
/**
* Borrowed from http://www.thoughtsabout.net/blog/archives/000... |
package name.lemonedo.util;
/**
*
* @author LEE Chungmin
*/
public interface UnaryPredicate<T> extends UnaryFunction<Boolean, T> {
public Boolean eval(T object);
}
|
package name.lemonedo.util;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author LEE Chungmin
*/
public final class Algorithms {
// prevent instatiation
private Algorithms() {}
public static <T> List<T> filter(Iterable<T> elements,
UnaryPredi... |
package name.lemonedo.util;
/**
*
* @author LEE Chungmin
*/
public interface UnaryFunction<R, T> {
public R eval(T object);
}
|
package name.lemonedo.util;
/**
*
* @author LEE Chungmin
*/
public class Pair<E> {
private final E e1;
private final E e2;
public Pair(E e1, E e2) {
this.e1 = e1;
this.e2 = e2;
}
public E getFirst() {
return e1;
}
public E getSecond() {
return e2;
}
}
|
package name.lemonedo.iidx.record;
import java.io.File;
import java.io.IOException;
/**
*
* @author LEE Chungmin
*/
class RecordReaderGold extends AbstractRecordReader {
RecordReaderGold(File saveFile) throws IOException {
super(Version.GOLD, saveFile, "gold.txt", new MetaInfo(99480, 20));
}... |
package name.lemonedo.iidx.record;
/**
* An integer value, capable of being undefined.
*
* @author LEE Chungmin
*/
public interface Value extends Comparable<Value> {
/**
* Returns <code>true</code> if it is defined, i.e., its value is in the valid
* range.
*
* @return <code>true</co... |
package name.lemonedo.iidx.record;
/**
*
* @author LEE Chungmin
*/
public enum Version {
IIDX_RED, HAPPY_SKY, DISTORTED, GOLD;
@Override
public String toString() {
switch (this) {
case IIDX_RED:
return "beatmaniaIIDX 11 IIDX RED";
case HAPPY_SKY:
return "beatmaniaIID... |
package name.lemonedo.iidx.record;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
*
* @author LEE Chungmin
*/
class SongListReader {
// prevent instantiation
private SongListReader() {}
static List<Song> read(String name) {
... |
package name.lemonedo.iidx.record.app;
import java.io.*;
import java.util.*;
import name.lemonedo.iidx.record.*;
import name.lemonedo.iidx.record.util.*;
/**
*
* @author LEE Chungmin
*/
public class RecordExtractor {
private final HtmlPrinter htmlPrinter;
/**
* Constructs a new <code>Re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.