• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • JLink Game
  • Mailing Lists

[Java-link-svn] SF.net SVN: java-link: [5] trunk/lib/other

Status: Pre-Alpha
Brought to you by: welterde0
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Browse SVN
Menu ▾ ▴
  • java-link-svn

[Java-link-svn] SF.net SVN: java-link: [5] trunk/lib/other

[Java-link-svn] SF.net SVN: java-link: [5] trunk/lib/other
From: <wel...@us...> - 2006-05-12 18:08:00
Revision: 5
Author:   welterde0
Date:     2006-05-12 11:06:26 -0700 (Fri, 12 May 2006)
ViewCVS:  http://svn.sourceforge.net/java-link/?rev=5&view=rev

Log Message:
-----------
removed web-subfolder
added LL and HL subproject
created world subproject
created world:DB subproject
updated Swing LaF to substance
added some frontend classes
updated graphics

Modified Paths:
--------------
    trunk/Client/nbproject/private/private.properties
    trunk/Client/nbproject/project.properties
    trunk/Client/src/org/jlink/ClientMain.java
    trunk/Client/src/org/jlink/client/frontend/menu/MainMenu.java

Added Paths:
-----------
    trunk/Client/src/org/jlink/Frontend.java
    trunk/Client/src/org/jlink/Game.java
    trunk/Client/src/org/jlink/Main.java
    trunk/Client/src/org/jlink/controll/
    trunk/Client/src/org/jlink/controll/SystemController.java
    trunk/Client/src/org/jlink/frontend/
    trunk/Client/src/org/jlink/frontend/MainFrameController.java
    trunk/Client/src/org/jlink/frontend/Window.java
    trunk/Client/src/org/jlink/frontend/WindowManager.java
    trunk/Client/src/org/jlink/frontend/WindowManagerImpl.java
    trunk/Client/src/org/jlink/frontend/system/
    trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.form
    trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.java
    trunk/Client/src/org/jlink/frontend/system/MainmenuListener.java
    trunk/Client/src/org/jlink/frontend/system/MainmenuWindow.java
    trunk/Client/src/org/jlink/gui/
    trunk/Client/src/org/jlink/gui/JInternalFrameFactory.java
    trunk/Client/src/org/jlink/gui/laf/
    trunk/Client/src/org/jlink/gui/laf/LAFController.java
    trunk/Share/src/org/jlink/Controller.java
    trunk/Share/src/org/jlink/net/hl/
    trunk/Share/src/org/jlink/net/hl/HLConnector.java
    trunk/Share/src/org/jlink/net/hl/HLHandler.java
    trunk/Share/src/org/jlink/net/hl/HLRegistry.java
    trunk/Share/src/org/jlink/net/hl/HLServerConnector.java
    trunk/Share/src/org/jlink/net/ll/
    trunk/Share/src/org/jlink/net/ll/LLConnectionException.java
    trunk/Share/src/org/jlink/net/ll/LLConnector.java
    trunk/Share/src/org/jlink/net/ll/LLEvent.java
    trunk/Share/src/org/jlink/net/ll/LLNetworkInterface.java
    trunk/Share/src/org/jlink/net/ll/LLServerConnector.java
    trunk/Share/src/org/jlink/resources/theme/
    trunk/Share/src/org/jlink/resources/theme/account-register.png
    trunk/Share/src/org/jlink/resources/theme/system-change_server.png
    trunk/Share/src/org/jlink/resources/theme/system-exit.png
    trunk/Share/src/org/jlink/world/
    trunk/Share/src/org/jlink/world/Avatar.java
    trunk/Share/src/org/jlink/world/Session.java
    trunk/Share/src/org/jlink/world/SessionException.java
    trunk/Share/src/org/jlink/world/db/
    trunk/Share/src/org/jlink/world/db/Database.java
    trunk/Share/src/org/jlink/world/db/DatabaseFilter.java
    trunk/Share/src/org/jlink/world/db/DatabaseLoader.java
    trunk/Share/src/org/jlink/world/db/DatabaseManager.java
    trunk/Share/src/org/jlink/world/db/DatabaseSaver.java
    trunk/lib/other/substance.jar
Modified: trunk/Client/nbproject/private/private.properties
===================================================================
--- trunk/Client/nbproject/private/private.properties	2006-03-19 17:52:58 UTC (rev 4)
+++ trunk/Client/nbproject/private/private.properties	2006-05-12 18:06:26 UTC (rev 5)
@@ -4,6 +4,7 @@
 file.reference.jdom.jar=../lib/jdom/jdom.jar
 file.reference.log4j.jar=../lib/log4j/log4j.jar
 file.reference.saxpath.jar=../lib/jdom/saxpath.jar
+file.reference.substance.jar=/home/tassilo/Documents/dev/jlink/feature_substance/trunk/lib/other/substance.jar
 file.reference.swing-layout.jar=../lib/other/swing-layout.jar
 javac.debug=true
 javadoc.preview=true

Modified: trunk/Client/nbproject/project.properties
===================================================================
--- trunk/Client/nbproject/project.properties	2006-03-19 17:52:58 UTC (rev 4)
+++ trunk/Client/nbproject/project.properties	2006-05-12 18:06:26 UTC (rev 5)
@@ -20,6 +20,7 @@
 file.reference.jaxen-jdom.jar=../lib/jdom/jaxen-jdom.jar
 file.reference.jdom.jar=../lib/jdom/jdom.jar
 file.reference.saxpath.jar=../lib/jdom/saxpath.jar
+file.reference.substance.jar=../lib/other/substance.jar
 file.reference.swing-layout.jar=../lib/other/swing-layout.jar
 jar.compress=true
 javac.classpath=\
@@ -30,6 +31,7 @@
     ${file.reference.jaxen-core.jar}:\
     ${file.reference.jaxen-jdom.jar}:\
     ${file.reference.saxpath.jar}:\
+    ${file.reference.substance.jar}:\
     ${libs.swing-layout.classpath}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked
@@ -51,7 +53,7 @@
 javadoc.use=true
 javadoc.version=false
 javadoc.windowtitle=
-main.class=org.jlink.ClientMain
+main.class=org.jlink.Main
 manifest.file=manifest.mf
 meta.inf.dir=${src.dir}/META-INF
 platform.active=default_platform

Modified: trunk/Client/src/org/jlink/ClientMain.java
===================================================================
--- trunk/Client/src/org/jlink/ClientMain.java	2006-03-19 17:52:58 UTC (rev 4)
+++ trunk/Client/src/org/jlink/ClientMain.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -39,6 +39,11 @@
 import org.apache.log4j.ConsoleAppender;
 //import::sys::swing
 import javax.swing.JOptionPane;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import org.jvnet.substance.SubstanceLookAndFeel;
+import org.jvnet.substance.theme.SubstanceEbonyTheme;
+import org.jvnet.substance.watermark.SubstanceBinaryWatermark;
 
 /**
  *
@@ -54,6 +59,14 @@
      * @param args the command line arguments
      */
     public static void main(String[] args) throws IOException {
+        try {
+            UIManager.setLookAndFeel(new SubstanceLookAndFeel());
+            SubstanceLookAndFeel.setCurrentTheme(new SubstanceEbonyTheme());
+            SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBinaryWatermark());
+            UIManager.setLookAndFeel(new SubstanceLookAndFeel());
+        } catch (UnsupportedLookAndFeelException ex) {
+            ex.printStackTrace();
+        }
         // <editor-fold defaultstate="expanded" desc=" app_dir::lookup() ">
         
         if(args.length < 1) {

Added: trunk/Client/src/org/jlink/Frontend.java
===================================================================
--- trunk/Client/src/org/jlink/Frontend.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/Frontend.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,135 @@
+/*
+ * Frontend.java
+ *
+ * Created on 20. März 2006, 21:21
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink;
+
+import org.jlink.frontend.MainFrameController;
+import org.jlink.frontend.WindowManager;
+import org.jlink.frontend.WindowManagerImpl;
+import org.jlink.frontend.system.MainmenuListener;
+import org.jlink.frontend.system.MainmenuWindow;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author tassilo
+ */
+public class Frontend implements Controller, MainmenuListener {
+    
+    /** Creates a new instance of Frontend */
+    public Frontend(Game g) {
+        log = Logger.getLogger("jlink.core.frontend");
+        log.trace("Object created: org.jlink.Frontend");
+        
+        this.modCore = g;
+        this.wm = new WindowManagerImpl("JLink");
+        this.wmController = (MainFrameController) this.wm;
+    }
+
+    public void init() {
+        log.trace("entering method init()");
+        
+        //TODO: init something
+        this.wmController.setSize(1024, 768);
+        this.menuMain = new MainmenuWindow();
+        
+        this.statusValid = true;
+    }
+
+    public void start() {
+        log.trace("entering method start()");
+        
+        //TODO: start something
+        this.wmController.show();
+        
+        this.wm.addWindow("sys_menu_main", this.menuMain);
+        
+        synchronized(this.statusLock) {
+            this.statusRunning = true;
+        }
+    }
+
+    public void join() {
+        log.trace("entering method join()");
+        
+        synchronized(this.statusLock) {
+            if(!this.statusRunning)
+                return;
+            try {
+                this.statusLock.wait();
+            } catch (InterruptedException ex) {
+                return;
+            }
+        }
+    }
+
+    public void stop() {
+        log.trace("entering method stop()");
+        
+        //TODO: stop something
+        this.wmController.dispose();
+        
+        synchronized(this.statusLock) {
+            this.statusRunning = false;
+        }
+    }
+
+    public void destroy() {
+        log.trace("entering method destroy()");
+        
+        this.stop();
+        this.join();
+        
+        //TODO: destroy something
+        
+        this.statusValid = false;
+    }
+
+    public boolean runLogin(String user, String pass) {
+        
+        return true;// TODO: see TODO: in MainmenuIFrame
+    }
+
+    public void runServer() {
+    }
+
+    public void runOptions() {
+    }
+
+    public void runAccount() {
+    }
+
+    public void runExit() {
+    }
+    
+    
+    private boolean             statusValid    = false;
+    private boolean             statusRunning  = false;
+    private String              statusLock     = "lockRX4545";
+    private Game                modCore        = null;
+    private WindowManager       wm             = null;
+    private MainFrameController wmController   = null;
+    private Logger              log            = null;
+    
+    private MainmenuWindow      menuMain   = null;
+}

Added: trunk/Client/src/org/jlink/Game.java
===================================================================
--- trunk/Client/src/org/jlink/Game.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/Game.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,108 @@
+/*
+ * Game.java
+ *
+ * Created on 20. März 2006, 21:48
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink;
+
+import org.jlink.controll.SystemController;
+
+/**
+ *
+ * @author tassilo
+ */
+public class Game implements Runnable, SystemController {
+    
+    /** Creates a new instance of Game */
+    public Game() {
+    }
+    
+    public void init() {
+        this.t = new Thread(this);
+        this.t.setName("JLink-Core");
+        
+        this.modFront = new Frontend(this);
+        this.modFront.init();
+    }
+    public void start() {
+        this.t.start();
+        this.modFront.start();
+    }
+    public void run() {
+        this.statusRunning = true;
+        this.doStop = false;
+        try {
+            while(!this.doStop) {
+                try {
+                    Thread.sleep(1000);
+                } catch (InterruptedException ex) {
+                    ex.printStackTrace();
+                }
+            }
+        } finally {
+            this.statusRunning = false;
+        }
+    }
+    public void join() {
+        try {
+            this.t.join();
+        } catch (InterruptedException ex) {
+        }
+    }
+    public void stop() {
+        this.doStop = true;
+        this.modFront.stop();
+    }
+    public void destroy() {
+        this.stop();
+        this.join();
+        this.modFront.stop();
+        this.modFront.join();
+    }
+
+    public void shutdown() {
+        this.destroy();
+    }
+
+    public void fatal(String msg) {
+        //TODO: implement
+        try {
+            this.shutdown();
+        } finally {
+            System.exit(1);
+        }
+    }
+
+    public Frontend getFrontend() {
+        return this.modFront;
+    }
+    
+    
+    private Frontend modFront = null;
+    
+    private boolean statusValid   = false;
+    private boolean statusRunning = false;
+    private String  statusLock    = "locka";
+    
+    private boolean doStop = false;
+    
+    private Thread t = null;
+}

Added: trunk/Client/src/org/jlink/Main.java
===================================================================
--- trunk/Client/src/org/jlink/Main.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/Main.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,155 @@
+/*
+ * Main.java
+ *
+ * Created on 20. März 2006, 19:31
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink;
+
+//TODO: bring imports in right form
+import java.io.File;
+import java.io.IOException;
+import javax.swing.JOptionPane;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.FileAppender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PatternLayout;
+import org.jvnet.substance.SubstanceLookAndFeel;
+import org.jvnet.substance.theme.SubstanceEbonyTheme;
+import org.jvnet.substance.watermark.SubstanceBinaryWatermark;
+
+/**
+ *
+ * @author tassilo
+ */
+public class Main {
+    
+    /** Creates a new instance of Main */
+    public Main() {
+    }
+    
+    public static void main(String[] args) {
+        Game g = null;
+        // <editor-fold defaultstate="collapsed" desc=" app_dir::lookup() ">
+        
+        if(args.length < 1) {
+            JOptionPane.showMessageDialog(null, "Cannot determinate Application dir. Please run with \"ant -Dapplication.args=[/path/to/trunk] run",
+                    "FATAL ERROR", JOptionPane.ERROR_MESSAGE);
+            System.exit(1);
+        }
+        dir_app = new File(args[0]);
+        if(!dir_app.isDirectory()) {
+            JOptionPane.showMessageDialog(null, "The folder you chose, doesnt'exist" +
+                    "You chose:" + dir_app + "if you haven't chosen anythin try" +
+                    " running it with \n ant -Dapplication.args=[/path/to/trunk] run", "FATAL ERROR", JOptionPane.ERROR_MESSAGE);
+            System.exit(1);
+        }
+        
+        // </editor-fold>
+        // <editor-fold defaultstate="collapsed" desc=" home_dir::lookup()">
+        
+        dir_home = new File(new File(System.getProperty("user.home")), ".jlink");
+        if(!dir_home.exists() || !dir_home.isDirectory()) {
+            if(!dir_home.mkdirs()) {
+                JOptionPane.showMessageDialog(null, "An ~/.jlink cant be created dir:" +
+                        dir_home, "FATAL ERROR", JOptionPane.ERROR_MESSAGE);
+                System.exit(1);
+            }
+        }
+        
+        // </editor-fold>
+        // <editor-fold defaultstate="collapsed" desc=" log_dir::lookup()">
+        
+        dir_log = new File(dir_home, "logs");
+        if(!dir_log.isDirectory()) {
+            if(!dir_log.mkdirs()) {
+                //TODO: fail
+                System.exit(1);
+            }
+        }
+        
+        // </editor-fold>
+        init();
+        
+        g = new Game();
+        g.init();
+        g.start();
+        g.join();
+        g.destroy();
+        
+        destroy();
+    }
+    
+    private static void init() {
+        initLOG4J();
+        compile();
+        initGUI();
+    }
+    private static void destroy() {
+        
+    }
+    
+    private static void compile() {
+        //TODO: implement
+    }
+    private static void initLOG4J() {
+        try {
+            FileAppender log4j_file = new FileAppender(new PatternLayout(), new File(dir_log, "client.log").getAbsolutePath());
+            log4j_file.setLayout(new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN));
+            log4j_file.clearFilters();
+            log4j_file.setThreshold(Level.ALL);
+            Logger.getRootLogger().setLevel(Level.ALL);
+            BasicConfigurator.configure(log4j_file);
+            ConsoleAppender log4j_con = new ConsoleAppender(new PatternLayout("%-9r %-5p [%-18t | %15.15c]: %m%n"), "System.err");
+            log4j_con.setThreshold(Options.GLOBAL_LOGLEVEL);
+            BasicConfigurator.configure(log4j_con);
+        } catch (IOException ex) {
+            //TODO: fail
+            System.exit(1);
+        }
+        Logger log = Logger.getLogger("jlink");
+        log.info("logging started");
+    }
+    private static void initGUI() {
+        Logger log = Logger.getLogger("jlink");
+        log.info("changing Swing L&F");
+        try {
+            UIManager.setLookAndFeel(new SubstanceLookAndFeel());
+            SubstanceLookAndFeel.setCurrentTheme(new SubstanceEbonyTheme());
+            SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBinaryWatermark());
+            UIManager.setLookAndFeel(new SubstanceLookAndFeel());
+        } catch (UnsupportedLookAndFeelException ex) {
+            log.debug("change failed", ex);
+            //TODO: fail
+            System.exit(1);
+        }
+        log.debug("change done");
+    }
+    
+    private static File dir_app  = null;
+    private static File dir_home = null;
+    private static File dir_log  = null;
+    
+    private static Frontend modFront = null;
+}

Modified: trunk/Client/src/org/jlink/client/frontend/menu/MainMenu.java
===================================================================
--- trunk/Client/src/org/jlink/client/frontend/menu/MainMenu.java	2006-03-19 17:52:58 UTC (rev 4)
+++ trunk/Client/src/org/jlink/client/frontend/menu/MainMenu.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -25,6 +25,7 @@
 
 //import
 //import::own
+import java.awt.Graphics;
 import org.jlink.resources.FontLoader;
 //import::sys
 import org.apache.log4j.Logger;
@@ -32,6 +33,8 @@
 import java.awt.MediaTracker;
 import javax.swing.ImageIcon;
 import javax.swing.JPanel;
+import org.jvnet.substance.watermark.SubstanceWatermark;
+import org.jvnet.substance.SubstanceLookAndFeel;
 import org.jlink.client.frontend.PasswordLoginWidget;
 import org.jlink.client.frontend.theme.Theme;
 import org.jlink.client.frontend.theme.ThemeManager;
@@ -160,4 +163,10 @@
     private Theme  cur = null;
     private Logger log = null;
     private MainMenuListener list = null;
+
+    protected void printComponent(Graphics g) {
+        super.printComponent(g);
+        SubstanceLookAndFeel.getCurrentWatermark().updateWatermarkImage();
+        SubstanceLookAndFeel.getCurrentWatermark().drawWatermarkImage(g, this, 0, 0,  (int) this.getSize().getWidth(), (int) this.getSize().getHeight());
+    }
 }

Added: trunk/Client/src/org/jlink/controll/SystemController.java
===================================================================
--- trunk/Client/src/org/jlink/controll/SystemController.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/controll/SystemController.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,37 @@
+/*
+ * SystemController.java
+ *
+ * Created on 21. März 2006, 20:41
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.controll;
+
+import org.jlink.Frontend;
+
+/**
+ *
+ * @author tassilo
+ */
+public interface SystemController {
+    public void shutdown();
+    public void fatal(String msg);
+    
+    public Frontend getFrontend();
+}

Added: trunk/Client/src/org/jlink/frontend/MainFrameController.java
===================================================================
--- trunk/Client/src/org/jlink/frontend/MainFrameController.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/MainFrameController.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,37 @@
+/*
+ * MainFrameController.java
+ *
+ * Created on 20. März 2006, 17:09
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.frontend;
+
+/**
+ *
+ * @author tassilo
+ */
+public interface MainFrameController {
+    public void show();
+    public void dispose();
+    
+    public void setLocation(int x, int y);
+    public void setSize(int x, int y);
+    public void setFullscreen(boolean fs);
+}

Added: trunk/Client/src/org/jlink/frontend/Window.java
===================================================================
--- trunk/Client/src/org/jlink/frontend/Window.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/Window.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,37 @@
+/*
+ * Window.java
+ *
+ * Created on 19. März 2006, 15:51
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.frontend;
+
+//import
+//import::sys
+//import::sys::swing
+import javax.swing.JInternalFrame;
+
+/**
+ *
+ * @author tassilo
+ */
+public interface Window {
+    public JInternalFrame getFrame();
+}

Added: trunk/Client/src/org/jlink/frontend/WindowManager.java
===================================================================
--- trunk/Client/src/org/jlink/frontend/WindowManager.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/WindowManager.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,32 @@
+/*
+ * WindowManager.java
+ *
+ * Created on 19. März 2006, 15:48
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.frontend;
+
+/**
+ *
+ * @author tassilo
+ */
+public interface WindowManager {
+    public void addWindow(String id, Window win);
+}

Added: trunk/Client/src/org/jlink/frontend/WindowManagerImpl.java
===================================================================
--- trunk/Client/src/org/jlink/frontend/WindowManagerImpl.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/WindowManagerImpl.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,100 @@
+/*
+ * WindowManagerImpl.java
+ *
+ * Created on 19. März 2006, 15:52
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.frontend;
+
+//import
+//import::own
+//import::sys
+import org.apache.log4j.Logger;
+//import::sys::swing
+import javax.swing.JFrame;
+import javax.swing.JDesktopPane;
+import javax.swing.JInternalFrame;
+//import::sys::util
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * @author tassilo
+ */
+public class WindowManagerImpl implements WindowManager, MainFrameController {
+    
+    
+    
+    public WindowManagerImpl(String title) {
+        log.trace("Object created: org.jlink.frontend.WindowManagerImpl");
+        
+        //create Frame
+        this.root = new JFrame(title);
+        this.desk = new JDesktopPane();
+        this.root.add(this.desk);
+        
+        //create Window-DB
+        this.dbWin = new HashMap<String, Window>();
+    }
+
+    public void addWindow(String id, Window win) {
+        log.trace("entering method addWindow({}, {}", id, win);
+        
+        if(id == null)
+            throw new NullPointerException();
+        if(win == null)
+            throw new NullPointerException();
+        
+        this.dbWin.put(id, win);
+        JInternalFrame iframe = win.getFrame();
+        this.desk.add(iframe);
+        iframe.setVisible(true);
+        
+        log.trace("leaving method");
+    }
+
+    public void show() {
+        this.root.setVisible(true);
+    }
+
+    public void dispose() {
+        this.root.dispose();
+    }
+
+    public void setLocation(int x, int y) {
+        this.root.setLocation(x, y);
+    }
+
+    public void setSize(int x, int y) {
+        this.root.setSize(x, y);
+    }
+
+    public void setFullscreen(boolean fs) {
+        throw new UnsupportedOperationException("not yet implemented");
+    }
+    
+    
+    
+    private JFrame root = null;
+    private JDesktopPane desk = null;
+    private Logger log  = Logger.getLogger("jlink.wm.impl");
+    private Map<String, Window> dbWin = null;
+}

Added: trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.form
===================================================================
--- trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.form	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.form	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
+  <Properties>
+    <Property name="background" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+      <Connection code="new Color(128, 128, 128, 32)" type="code"/>
+    </Property>
+    <Property name="iconifiable" type="boolean" value="true"/>
+    <Property name="maximizable" type="boolean" value="true"/>
+    <Property name="resizable" type="boolean" value="true"/>
+  </Properties>
+  <SyntheticProperties>
+    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+  </SyntheticProperties>
+  <AuxValues>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="jButton3" alignment="1" min="-2" max="-2" attributes="0"/>
+                  <Component id="jButton4" alignment="1" min="-2" max="-2" attributes="0"/>
+                  <Group type="102" alignment="0" attributes="0">
+                      <Group type="103" groupAlignment="1" attributes="0">
+                          <Component id="jButton5" alignment="1" min="-2" max="-2" attributes="0"/>
+                          <Group type="102" alignment="1" attributes="0">
+                              <Group type="103" groupAlignment="0" attributes="0">
+                                  <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+                                  <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
+                              </Group>
+                              <EmptySpace max="-2" attributes="0"/>
+                              <Group type="103" groupAlignment="0" attributes="0">
+                                  <Component id="jTextField1" min="-2" max="-2" attributes="0"/>
+                                  <Component id="jPasswordField1" min="-2" max="-2" attributes="0"/>
+                              </Group>
+                          </Group>
+                      </Group>
+                      <EmptySpace pref="13" max="32767" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Component id="jButton1" alignment="1" min="-2" max="-2" attributes="0"/>
+                          <Component id="jButton2" alignment="1" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" alignment="0" attributes="0">
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="jPasswordField1" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="jButton5" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="102" alignment="0" attributes="0">
+                      <Component id="jButton1" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="jButton2" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="jButton3" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="32767" attributes="0"/>
+                      <Component id="jButton4" min="-2" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JButton" name="jButton1">
+      <Properties>
+        <Property name="toolTipText" type="java.lang.String" value="Opens the &quot;Connect to Server&quot; Dialog"/>
+        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[45, 45]"/>
+        </Property>
+      </Properties>
+      <Events>
+        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clickedServer"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton2">
+      <Properties>
+        <Property name="toolTipText" type="java.lang.String" value="Opens the &quot;Acoount Registration&quot; Wizard"/>
+        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[45, 45]"/>
+        </Property>
+      </Properties>
+      <Events>
+        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clickedAccount"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton3">
+      <Properties>
+        <Property name="toolTipText" type="java.lang.String" value="Opens the &quot;Options&quot; Dialog"/>
+        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[45, 45]"/>
+        </Property>
+      </Properties>
+      <Events>
+        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clickedOptions"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton4">
+      <Properties>
+        <Property name="toolTipText" type="java.lang.String" value="Exits JLink."/>
+        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[45, 45]"/>
+        </Property>
+      </Properties>
+      <Events>
+        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clickedExit"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel1">
+      <Properties>
+        <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+          <Font name="Dialog" size="14" style="1"/>
+        </Property>
+        <Property name="text" type="java.lang.String" value="User-ID"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="jTextField1">
+      <Properties>
+        <Property name="columns" type="int" value="20"/>
+        <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+          <Font name="Dialog" size="14" style="0"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JPasswordField" name="jPasswordField1">
+      <Properties>
+        <Property name="columns" type="int" value="20"/>
+        <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+          <Font name="Dialog" size="14" style="0"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel2">
+      <Properties>
+        <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+          <Font name="Dialog" size="14" style="1"/>
+        </Property>
+        <Property name="text" type="java.lang.String" value="Pass-ID"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton5">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="connect"/>
+      </Properties>
+      <Events>
+        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clickedLogin"/>
+      </Events>
+    </Component>
+  </SubComponents>
+</Form>

Added: trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.java
===================================================================
--- trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/system/MainmenuIFrame.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,212 @@
+/*
+ * MainmenuIFrame.java
+ *
+ * Created on 20. März 2006, 19:10
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.frontend.system;
+
+import java.awt.Color;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author  tassilo
+ */
+public class MainmenuIFrame extends javax.swing.JInternalFrame {
+    
+    /** Creates new form MainmenuIFrame */
+    public MainmenuIFrame(MainmenuWindow l) {
+        log = Logger.getLogger("jlink.frontend.system.MainmenuIFrame");
+        log.trace("Object created: MainmenuIFrame");
+        if(l == null)
+            throw new NullPointerException();
+        this.w = l;
+        initComponents();
+    }
+    
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+    private void initComponents() {
+        jButton1 = new javax.swing.JButton();
+        jButton2 = new javax.swing.JButton();
+        jButton3 = new javax.swing.JButton();
+        jButton4 = new javax.swing.JButton();
+        jLabel1 = new javax.swing.JLabel();
+        jTextField1 = new javax.swing.JTextField();
+        jPasswordField1 = new javax.swing.JPasswordField();
+        jLabel2 = new javax.swing.JLabel();
+        jButton5 = new javax.swing.JButton();
+
+        setBackground(new Color(128, 128, 128, 32));
+        setIconifiable(true);
+        setMaximizable(true);
+        setResizable(true);
+        jButton1.setToolTipText("Opens the \"Connect to Server\" Dialog");
+        jButton1.setPreferredSize(new java.awt.Dimension(45, 45));
+        jButton1.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                clickedServer(evt);
+            }
+        });
+
+        jButton2.setToolTipText("Opens the \"Acoount Registration\" Wizard");
+        jButton2.setPreferredSize(new java.awt.Dimension(45, 45));
+        jButton2.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                clickedAccount(evt);
+            }
+        });
+
+        jButton3.setToolTipText("Opens the \"Options\" Dialog");
+        jButton3.setPreferredSize(new java.awt.Dimension(45, 45));
+        jButton3.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                clickedOptions(evt);
+            }
+        });
+
+        jButton4.setToolTipText("Exits JLink.");
+        jButton4.setPreferredSize(new java.awt.Dimension(45, 45));
+        jButton4.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                clickedExit(evt);
+            }
+        });
+
+        jLabel1.setFont(new java.awt.Font("Dialog", 1, 14));
+        jLabel1.setText("User-ID");
+
+        jTextField1.setColumns(20);
+        jTextField1.setFont(new java.awt.Font("Dialog", 0, 14));
+
+        jPasswordField1.setColumns(20);
+        jPasswordField1.setFont(new java.awt.Font("Dialog", 0, 14));
+
+        jLabel2.setFont(new java.awt.Font("Dialog", 1, 14));
+        jLabel2.setText("Pass-ID");
+
+        jButton5.setText("connect");
+        jButton5.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                clickedLogin(evt);
+            }
+        });
+
+        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(layout.createSequentialGroup()
+                .addContainerGap()
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                    .add(layout.createSequentialGroup()
+                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+                            .add(jButton5)
+                            .add(layout.createSequentialGroup()
+                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                                    .add(jLabel1)
+                                    .add(jLabel2))
+                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                                    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                                    .add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 13, Short.MAX_VALUE)
+                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(layout.createSequentialGroup()
+                .addContainerGap()
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                    .add(layout.createSequentialGroup()
+                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+                            .add(jLabel1)
+                            .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+                            .add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                            .add(jLabel2))
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                        .add(jButton5))
+                    .add(layout.createSequentialGroup()
+                        .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                        .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                        .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .add(jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+                .addContainerGap())
+        );
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void clickedLogin(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clickedLogin
+        log.debug("MainmenuIFrame::Button pressed: login");
+        String u = this.jTextField1.getText();
+        String p = new String(this.jPasswordField1.getPassword());
+        this.w.runLogin(u, p);// TODO: do something with return og runLogin || remove it
+    }//GEN-LAST:event_clickedLogin
+
+    private void clickedOptions(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clickedOptions
+        log.debug("MainmenuIFrame::Button pressed: options");
+        this.w.runOptions();
+    }//GEN-LAST:event_clickedOptions
+
+    private void clickedAccount(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clickedAccount
+        log.debug("MainmenuIFrame::Button pressed: account");
+        this.w.runAccount();
+    }//GEN-LAST:event_clickedAccount
+
+    private void clickedServer(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clickedServer
+        log.debug("MainmenuIFrame::Button pressed: server");
+        this.w.runServer();
+    }//GEN-LAST:event_clickedServer
+
+    private void clickedExit(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clickedExit
+        log.debug("MainmenuIFrame::Button pressed: exit");
+        this.w.runExit();
+    }//GEN-LAST:event_clickedExit
+    
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton jButton1;
+    private javax.swing.JButton jButton2;
+    private javax.swing.JButton jButton3;
+    private javax.swing.JButton jButton4;
+    private javax.swing.JButton jButton5;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JPasswordField jPasswordField1;
+    private javax.swing.JTextField jTextField1;
+    // End of variables declaration//GEN-END:variables
+    private MainmenuWindow w   = null;
+    private Logger         log = null;
+}

Added: trunk/Client/src/org/jlink/frontend/system/MainmenuListener.java
===================================================================
--- trunk/Client/src/org/jlink/frontend/system/MainmenuListener.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/system/MainmenuListener.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,36 @@
+/*
+ * MainmenuListener.java
+ *
+ * Created on 21. März 2006, 21:25
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.frontend.system;
+
+/**
+ *
+ * @author tassilo
+ */
+public interface MainmenuListener {
+    public boolean runLogin(String user, String pass);
+    public void runServer();
+    public void runOptions();
+    public void runAccount();
+    public void runExit();
+}

Added: trunk/Client/src/org/jlink/frontend/system/MainmenuWindow.java
===================================================================
--- trunk/Client/src/org/jlink/frontend/system/MainmenuWindow.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/frontend/system/MainmenuWindow.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,84 @@
+/*
+ * MainmenuWindow.java
+ *
+ * Created on 20. März 2006, 19:08
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.frontend.system;
+
+//import
+//import::own
+//import::own::frontend
+import org.jlink.frontend.Window;
+//import::sys
+//import::sys::swing
+import javax.swing.JInternalFrame;
+
+/**
+ *
+ * @author tassilo
+ */
+public class MainmenuWindow implements Window, MainmenuListener {
+    
+    /** Creates a new instance of MainmenuWindow */
+    public MainmenuWindow() {
+        this.iframe = new MainmenuIFrame(this);
+    }
+
+    public JInternalFrame getFrame() {
+        return this.iframe;
+    }
+    
+    public void setListener(MainmenuListener l) {
+        this.list = l;
+    }
+    
+    //Delegate to Listener
+    public boolean runLogin(String user, String pass) {
+        if(this.list == null)
+            return false;
+        return this.list.runLogin(user, pass);
+    }
+    public void runServer() {
+        if(this.list == null)
+            return;
+        this.list.runServer();
+    }
+    public void runOptions() {
+        if(this.list == null)
+            return;
+        this.list.runOptions();
+    }
+    public void runAccount() {
+        if(this.list == null)
+            return;
+        this.list.runAccount();
+    }
+    public void runExit() {
+        if(this.list == null)
+            return;
+        this.list.runExit();
+    }
+    
+    
+    
+    private MainmenuListener list   = null;
+    private MainmenuIFrame   iframe = null;
+}

Added: trunk/Client/src/org/jlink/gui/JInternalFrameFactory.java
===================================================================
--- trunk/Client/src/org/jlink/gui/JInternalFrameFactory.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/gui/JInternalFrameFactory.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,47 @@
+/*
+ * JInternalFrameFactory.java
+ *
+ * Created on 23. März 2006, 21:51
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.gui;
+
+import javax.swing.JInternalFrame;
+import javax.swing.JPopupMenu;
+import javax.swing.JComponent;
+import javax.swing.plaf.basic.BasicInternalFrameUI;
+
+/**
+ *
+ * @author tassilo
+ */
+public class JInternalFrameFactory {
+    
+    public static void addPUMenuToIFrame(JInternalFrame f, JPopupMenu m) {
+        JComponent c = ((BasicInternalFrameUI) f.getUI()).getNorthPane();
+        c.setComponentPopupMenu(m);
+       
+    }
+    
+    
+    
+    private JInternalFrameFactory() {
+    }
+}

Added: trunk/Client/src/org/jlink/gui/laf/LAFController.java
===================================================================
--- trunk/Client/src/org/jlink/gui/laf/LAFController.java	                        (rev 0)
+++ trunk/Client/src/org/jlink/gui/laf/LAFController.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,47 @@
+/*
+ * LAFController.java
+ *
+ * Created on 18. März 2006, 19:28
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink.gui.laf;
+
+/**
+ *
+ * @author tassilo
+ */
+public class LAFController {
+    public LAFController getInstance() {
+        if(instance == null) {
+            instance = new LAFController();
+        }
+        
+        return instance;
+    }
+    
+    
+    
+    
+    
+    private static LAFController instance = null;
+    
+    private LAFController() {
+    }
+}

Added: trunk/Share/src/org/jlink/Controller.java
===================================================================
--- trunk/Share/src/org/jlink/Controller.java	                        (rev 0)
+++ trunk/Share/src/org/jlink/Controller.java	2006-05-12 18:06:26 UTC (rev 5)
@@ -0,0 +1,36 @@
+/*
+ * Controller.java
+ *
+ * Created on 12. März 2006, 16:40
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.jlink;
+
+/**
+ *
+ * @author tassilo
+ */
+public interface Controller {
+    public void init();
+    public void start();
+    public void join();
+    public void stop();
+    public void destroy();
+}

Added: trunk/Share/src/org/jlink/net/hl/HLConnector.java
===========================================...
 
[truncated message content]

View entire thread

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
✔
✘
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL: