⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clienttestform.java

📁 Java mulitplayer strategy game. Adaptation of KDE Galaxy Conquest. (rules are changed - but still th
💻 JAVA
字号:
/*
 * ClientTestForm.java
 *
 * Created on 1 pa焏ziernik 2005, 13:47
 */

package net.sf.jawp.gui.client;

import net.sf.jawp.api.service.JAWPGameService;
import net.sf.jawp.client.GameData;
import net.sf.jawp.util.BuildHelper;

/**
 *
 * @author  jarek
 */
public class ClientTestForm extends javax.swing.JFrame
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private final Object finishMonitor;

	private final ClientPanel clientPanel;

	/** Creates new form ClientTestForm */
	public ClientTestForm(final JAWPGameService service, final Object monitor)
	{
		final GameData gd = new GameData(service);
		//System.out.println("gc:" + getGraphicsConfiguration());
		this.clientPanel = new ClientPanel(gd, getGraphicsConfiguration());
		//System.out.println("panel created");
		// this.clientPanel.setGameDataManager( gd);
		initComponents();
		this.finishMonitor = monitor;
		
		this.setTitle("Sample client test - " + BuildHelper.getBuildDesc());
	}
    //CHECKSTYLE:OFF
    /**
	 * 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()
    {
        clientPanelView = this.clientPanel;

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        addWindowListener(new java.awt.event.WindowAdapter()
        {
            public void windowClosed(java.awt.event.WindowEvent evt)
            {
                formWindowClosed(evt);
            }
        });

        getContentPane().add(clientPanelView, java.awt.BorderLayout.CENTER);

        pack();
    }
    // </editor-fold>//GEN-END:initComponents

    private void formWindowClosed(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosed
    {//GEN-HEADEREND:event_formWindowClosed
		this.dispose();
		if ( this.finishMonitor != null)
		{
			synchronized ( this.finishMonitor)
			{
				this.finishMonitor.notifyAll();
			}
		}
    }//GEN-LAST:event_formWindowClosed
    
 
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel clientPanelView;
    // End of variables declaration//GEN-END:variables
    //CHECKSTYLE:ON
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -