• 大小: 306KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-14
  • 语言: Java
  • 标签: java  跳棋源码  swing  

资源简介

java 跳棋源码 swing java 跳棋源码 swing

资源截图

代码片段和文件信息

package org.yushang.jumpchess.app;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Text;
import org.yushang.jumpchess.Interface.*;
import org.yushang.jumpchess.image.ImageLoader;
import org.eclipse.swt.widgets.Canvas;

public class AppJumpChess {

private Shell sShell = null;  //  @jve:decl-index=0:visual-constraint=“1010“

private JumpChessControl jumpChessControl = null;

private Canvas canvas = null;
private Label lblClose = null;
private Label lbltitle = null;
private Label lblBegin = null;
private Label lblExit = null;

private Canvas setCanvas = null;
private Label lblOK = null;
private Label lblCancel = null;

private Label[] lblType = new Label[6];
private Text[] txt = new Text[6];

private boolean mouseDown = false;
private Point lastMousePoint = null;

/**
 * This method initializes canvas
 *
 */
private void createCanvas() {
canvas = new Canvas(sShell SWT.NO_BACKGROUND);
canvas.setBounds(new org.eclipse.swt.graphics.Rectangle(00800600));
}

private void createClose(Composite parent) {
final ImageLoader imageClose1 = new ImageLoader(sShell.getDisplay() “Close1.jpg“);
final ImageLoader imageClose2 = new ImageLoader(sShell.getDisplay() “Close2.jpg“);
final ImageLoader imageClose3 = new ImageLoader(sShell.getDisplay() “Close3.jpg“);

lblClose = new Label(parent SWT.NO_BACKGROUND);

        lblClose.addMouseListener(new MouseAdapter() {
            public void mouseDown(MouseEvent e) {
             if (e.button == 1) {
             lblClose.setImage(imageClose3.getImage());                
}            
            }
            
            public void mouseUp(MouseEvent e) {
             if (e.button == 1) {
             lblClose.setImage(imageClose2.getImage());
             sShell.dispose();
}            
            }            
        });

        lblClose.addMouseTrackListener(new MouseTrackAdapter() {
            public void mouseEnter(MouseEvent e) {
                lblClose.setImage(imageClose2.getImage());
            }
            public void mouseExit(MouseEvent e) {
             lblClose.setImage(imageClose1.getImage());
            }
        });
        
        lblClose.setImage(imageClose1.getImage());
        lblClose.setBounds(765 4 26 20);
}

private void createtitle (Composite parent) {
final ImageLoader imagetitle = new ImageLoader(sShell.getDispl

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     目录          0  2003-05-27 06:16  org.yushang.jumpchess

     文件        517  2004-11-17 11:16  org.yushang.jumpchess\.project

     文件        287  2003-05-27 06:16  org.yushang.jumpchess\.classpath

     目录          0  2003-05-27 06:16  org.yushang.jumpchess\org

     目录          0  2003-05-27 06:16  org.yushang.jumpchess\org\yushang

     目录          0  2003-05-27 06:16  org.yushang.jumpchess\org\yushang\jumpchess

     目录          0  2003-05-27 09:01  org.yushang.jumpchess\org\yushang\jumpchess\app

     文件      14042  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess.java

    ..A.SH.     25600  2003-05-27 12:39  org.yushang.jumpchess\org\yushang\jumpchess\app\Thumbs.db

     文件       1357  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$2.class

     文件      10636  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess.class

     文件       1355  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$8.class

     文件       1357  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$6.class

     文件       1565  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$3.class

     文件       1601  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$1.class

     文件       1614  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$5.class

     文件       1135  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$4.class

     文件       1813  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$7.class

     文件       1619  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$10.class

     文件       1021  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$9.class

     文件       1511  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$12.class

     文件       1362  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$11.class

     文件       1354  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$13.class

     文件       1477  2004-11-17 19:52  org.yushang.jumpchess\org\yushang\jumpchess\app\AppJumpChess$14.class

     目录          0  2003-05-27 08:08  org.yushang.jumpchess\org\yushang\jumpchess\Interface

     文件      11181  2004-11-17 18:54  org.yushang.jumpchess\org\yushang\jumpchess\Interface\JumpChessControl.class

     文件       1703  2004-11-17 18:54  org.yushang.jumpchess\org\yushang\jumpchess\Interface\JumpChessControl$1.class

     文件        974  2004-11-17 18:54  org.yushang.jumpchess\org\yushang\jumpchess\Interface\JumpChessControl$4.class

     文件       1322  2004-11-17 18:54  org.yushang.jumpchess\org\yushang\jumpchess\Interface\JumpChessControl$3.class

     文件        934  2004-11-17 18:54  org.yushang.jumpchess\org\yushang\jumpchess\Interface\JumpChessControl$2.class

............此处省略93个文件信息

评论

共有 条评论