亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? life3dconfig.java

?? 使用Java3D編寫的生命棋游戲。可拖拽鼠標(biāo)改變視角。
?? JAVA
字號(hào):
// Life3DConfig.java// Andrew Davison, July 2006, ad@fivedots.coe.psu.ac.th/* A set of controls for modifying the 7 properties managed by   the LifeProperties object, lifeProps:     * fullscreen: whether the Life3D appl is full-screen     * width, height: the dimensions of the window if not full-screen     * bgColour: the background colour used in Life3D;                 it may be blue, green, white, or black     * speed: the speed that the balls grid rotates;              it may be slow, medium, or fast     * the birth and die ranges used by the Life rules in CellsGrid.        A range is a series of numbers separated by spaces, each        number representing the number of neighbours that will trigger       the cell's birth/death.    The GUI uses:      * a group of RadioButtons for the speed values      * a combo box for the background colours      * a group of two radio buttons for fullscreen and window      * two textfields for the window's width and height      * two textfields for the birth and die ranges*/import javax.swing.*;import javax.swing.border.*;import java.awt.*;import java.awt.event.*;import java.util.*;import java.io.*;public class Life3DConfig extends JPanel						         implements ActionListener{  // the GUI elements  private JRadioButton slowButton, mediumButton, fastButton;   // for speed  private JComboBox bgSelection;   // for background colours  private JRadioButton fullButton, winButton;   // fullscreen or window  private JTextField widthTF, heightTF;         // window dimensions  private JTextField birthTF, dieTF;            // birth and die ranges  private JButton okButton, cancelButton;  // properties data displayed and modified via the GUI  private int speed;  private int bgColour;  private boolean isFullScreen;  private int width, height;  private String birthRange, dieRange;  private LifeProperties lifeProps;  public Life3DConfig(LifeProperties lps)   {    lifeProps = lps;    initData();    initGUI();  } // end of Life3DConfig()  private void initData()  /* load speed, bgColour, fullscreen, width, height,     and the birth and die ranges properties      for populating the GUI */  {    speed = lifeProps.getSpeed();    bgColour = lifeProps.getBGColour();    isFullScreen = lifeProps.isFullScreen();    width = lifeProps.getWidth();    height = lifeProps.getHeight();    birthRange = lifeProps.getBirthStr();    dieRange = lifeProps.getDieStr();  }  // end of initData()  private void initGUI()  {    this.setLayout( new BorderLayout() );    JPanel ctrlPanel = new JPanel();    ctrlPanel.setLayout( new BorderLayout() );    this.add(ctrlPanel, BorderLayout.CENTER);    Border blackline = BorderFactory.createLineBorder(Color.black);    // ------------ data input controls at top of panel ------------------    JPanel inputTopPanel = new JPanel();    inputTopPanel.setLayout( new BorderLayout() );    ctrlPanel.add(inputTopPanel, BorderLayout.CENTER);    // ------------------------ speed area ------------------------------    // speed can be slow, medium, or fast    TitledBorder speedTitle = BorderFactory.createTitledBorder(                                                   blackline, "Speed");    // speed control panel on left    JPanel speedPanel = new JPanel();    speedPanel.setLayout( new BoxLayout(speedPanel, BoxLayout.Y_AXIS));  // vertical    speedPanel.setBorder(speedTitle);     inputTopPanel.add(speedPanel, BorderLayout.WEST);        // the speed radio buttons    slowButton = new JRadioButton("Slow");    slowButton.addActionListener(this);    speedPanel.add(slowButton);    mediumButton = new JRadioButton("Medium");    mediumButton.addActionListener(this);    speedPanel.add(mediumButton);    fastButton = new JRadioButton("Fast");    fastButton.addActionListener(this);    speedPanel.add(fastButton);    // group the radio buttons    ButtonGroup speedGroup = new ButtonGroup();    speedGroup.add(slowButton);    speedGroup.add(mediumButton);    speedGroup.add(fastButton);    // set selection using initial data    switch (speed) {       case LifeProperties.SLOW: slowButton.setSelected(true); break;      case LifeProperties.MEDIUM: mediumButton.setSelected(true); break;      case LifeProperties.FAST: fastButton.setSelected(true); break;      default: mediumButton.setSelected(true); break;    }    // ----------- input controls in the middle  of the panel -------------    JPanel middlePanel = new JPanel();    middlePanel.setLayout( new BorderLayout() );    inputTopPanel.add(middlePanel, BorderLayout.CENTER);    // ------------------ background colours area ---------------------    // background controls at top of middle panel    JPanel bgPanel = new JPanel();    bgPanel.setLayout( new BoxLayout(bgPanel, BoxLayout.X_AXIS));  // horizontal    middlePanel.add(bgPanel, BorderLayout.NORTH);    bgPanel.add( new JLabel("Background: ") );    bgSelection = new JComboBox(LifeProperties.bgColours);    bgSelection.addActionListener(this);    bgPanel.add(bgSelection);    // set selection using initial data    bgSelection.setSelectedIndex(bgColour);    // ------------------------ window size area ------------------------------    TitledBorder sizeTitle = BorderFactory.createTitledBorder(                                                   blackline, "Size");    // size control panel in center of middle panel    JPanel sizePanel = new JPanel();    sizePanel.setLayout( new BoxLayout(sizePanel, BoxLayout.Y_AXIS));  // vertical    sizePanel.setBorder(sizeTitle);     middlePanel.add(sizePanel, BorderLayout.CENTER);        // ----------------- type of window ---------------------------------    JPanel winTypePanel = new JPanel();    winTypePanel.setLayout( new BoxLayout(winTypePanel, BoxLayout.X_AXIS));  // horizontal    sizePanel.add(winTypePanel);    // the size radio buttons    fullButton = new JRadioButton("Full Screen");    fullButton.addActionListener(this);    winTypePanel.add(fullButton);    winButton = new JRadioButton("Window");    winButton.addActionListener(this);    winTypePanel.add(winButton);    // group the radio buttons    ButtonGroup sizeGroup = new ButtonGroup();    sizeGroup.add(fullButton);    sizeGroup.add(winButton);    // set selection using initial data    if (isFullScreen)      fullButton.setSelected(true);    else      winButton.setSelected(true);    // ----------------- window size dimensions -----------------------------    JPanel dimPanel = new JPanel();    dimPanel.setLayout( new BoxLayout(dimPanel, BoxLayout.X_AXIS));  // horizontal    sizePanel.add(dimPanel);    // width field    dimPanel.add( new JLabel("Width: ") );    widthTF = new JTextField(5);    widthTF.setText(""+width);    if (isFullScreen)      widthTF.setEnabled(false);    dimPanel.add(widthTF);        // height field    dimPanel.add( new JLabel("  Height: ") );    heightTF = new JTextField(5);    heightTF.setText(""+height);    if (isFullScreen)      heightTF.setEnabled(false);    dimPanel.add(heightTF);    // ------------ data input controls at bottom ----------------------------    JPanel inputBotPanel = new JPanel();    inputBotPanel.setLayout( new BorderLayout() );    ctrlPanel.add(inputBotPanel, BorderLayout.SOUTH);    // ------------------------ rules area ------------------------------    TitledBorder rulesTitle = BorderFactory.createTitledBorder(                                                   blackline, "Rules");    // rules control panel in center of input bottom panel    JPanel rulesPanel = new JPanel();    rulesPanel.setLayout( new BoxLayout(rulesPanel, BoxLayout.X_AXIS));  // horizontal    rulesPanel.setBorder(rulesTitle);     inputBotPanel.add(rulesPanel, BorderLayout.CENTER);    // birth ranges    rulesPanel.add( new JLabel("Birth: ") );    birthTF = new JTextField(10);    birthTF.setText(birthRange);    // birthTF.addActionListener(this);    rulesPanel.add(birthTF);        // die ranges    rulesPanel.add( new JLabel("  Die: ") );    dieTF = new JTextField(10);    dieTF.setText(dieRange);    // dieTF.addActionListener(this);    rulesPanel.add(dieTF);    // --------------------- finishing buttons -----------------------    JPanel finPanel = new JPanel();    this.add(finPanel, BorderLayout.SOUTH);    okButton = new JButton("Ok");    okButton.addActionListener(this);    finPanel.add(okButton);    cancelButton = new JButton("Cancel");    cancelButton.addActionListener(this);    finPanel.add(cancelButton);  }  // end of initGUI()  public void actionPerformed(ActionEvent e)  {    // speed radio buttons    if (e.getSource() == slowButton)      speed = LifeProperties.SLOW;    else if (e.getSource() == mediumButton)      speed = LifeProperties.MEDIUM;    else if (e.getSource() == fastButton)      speed = LifeProperties.FAST;    // background colours combo box    else if (e.getSource() == bgSelection)      bgColour = bgSelection.getSelectedIndex();    // window size radio buttons    else if (e.getSource() == fullButton) {      isFullScreen = true;      widthTF.setEnabled(false);    // disable width and height fields      heightTF.setEnabled(false);    }    else if (e.getSource() == winButton) {      isFullScreen = false;      widthTF.setEnabled(true);    // enable width and height fields      heightTF.setEnabled(true);    }    // finishing buttons    else if (e.getSource() == okButton) {      System.out.println("Pressed ok");      saveProperties();      System.exit(0);    }    else if (e.getSource() == cancelButton) {      System.out.println("Pressed cancel");      System.exit(0);    }    else      System.out.println("Unknown GUI Source");  }  // end of actionPerformed()  private void saveProperties()  /* save speed, bgColour, fullscreen, width, height,     and the birth and die ranges properties */  {    lifeProps.setSpeed(speed);    lifeProps.setBGColour(bgColour);    lifeProps.setFullScreen(isFullScreen);    // store current width and height values    lifeProps.setWidth( widthTF.getText() );     lifeProps.setHeight( heightTF.getText() );    // store current birth and die ranges    lifeProps.setBirth( birthTF.getText() );     lifeProps.setDie( dieTF.getText() );    lifeProps.saveProperties();  }  // end of saveProperties()} // end of Life3DConfig class

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女www一区二区| 欧美日韩精品福利| 26uuu国产电影一区二区| 国产美女久久久久| 国产亚洲成av人在线观看导航| 美女免费视频一区二区| 久久久综合视频| 波多野结衣中文一区| 亚洲欧美激情一区二区| 色婷婷精品大在线视频| 丝袜脚交一区二区| 久久久久久久网| 99在线精品一区二区三区| 亚洲精品欧美综合四区| 欧美伦理视频网站| 国产成人在线观看| 亚洲一区在线观看免费 | 精品亚洲成a人| 国产日产欧美一区二区三区| 91麻豆产精品久久久久久| 亚洲电影在线播放| 欧美tickle裸体挠脚心vk| 成人午夜精品在线| 亚洲成人激情社区| 久久免费国产精品| 欧美性色综合网| 国产乱国产乱300精品| 亚洲欧美aⅴ...| 欧美日韩综合色| 国产一区二区三区免费观看| 亚洲精品亚洲人成人网在线播放| 7777精品伊人久久久大香线蕉| 国产美女久久久久| 天天做天天摸天天爽国产一区| 久久综合九色综合欧美98| 91视频在线看| 国产一区美女在线| 亚洲成人黄色小说| 亚洲日穴在线视频| 久久婷婷国产综合国色天香| 在线观看日韩一区| 国产成人精品三级| 美女视频一区二区三区| 亚洲精品一二三| 国产欧美一区二区精品性色| 欧美日韩亚洲丝袜制服| www.欧美日韩国产在线| 精品一二三四区| 天堂午夜影视日韩欧美一区二区| 国产日韩欧美一区二区三区综合| 91精品在线观看入口| 色老汉av一区二区三区| 粉嫩在线一区二区三区视频| 日本视频中文字幕一区二区三区| 一区二区在线免费观看| 中文一区二区完整视频在线观看| 欧美成人精品高清在线播放| 欧美日精品一区视频| 99re视频精品| 成人精品免费视频| 国产一区二区成人久久免费影院| 日本不卡中文字幕| 婷婷夜色潮精品综合在线| 亚洲欧美日韩电影| 国产精品免费aⅴ片在线观看| 精品成人一区二区三区四区| 这里是久久伊人| 3atv一区二区三区| 欧美丰满嫩嫩电影| 91麻豆精品国产91久久久资源速度 | 欧美成人高清电影在线| 欧美日韩在线电影| 日本精品裸体写真集在线观看| 成人午夜在线视频| 9久草视频在线视频精品| 成人精品高清在线| 91视频.com| 色先锋资源久久综合| 97se亚洲国产综合自在线| 99久久国产综合精品色伊| 99综合电影在线视频| 色综合天天视频在线观看| 色老汉一区二区三区| 欧洲一区二区三区免费视频| 欧美综合一区二区| 欧美男男青年gay1069videost| 欧美日产国产精品| 日韩一级片网址| 精品国产髙清在线看国产毛片| 精品理论电影在线观看| 久久综合色之久久综合| 久久久91精品国产一区二区精品| 国产亚洲一区二区三区在线观看| 中文字幕免费观看一区| 综合久久国产九一剧情麻豆| 亚洲欧美另类在线| 日韩二区三区四区| 国产一区二区不卡在线| 国产不卡高清在线观看视频| 99精品久久免费看蜜臀剧情介绍| 在线一区二区三区四区五区| 欧美视频一区在线观看| 欧美一区二区三区电影| 久久九九久精品国产免费直播| 中文字幕一区二区三区在线播放 | caoporn国产精品| 在线免费av一区| 欧美mv日韩mv亚洲| 中文字幕一区二区三| 亚洲v精品v日韩v欧美v专区| 久久精品国产99| 本田岬高潮一区二区三区| 欧美日韩在线播放三区四区| 欧美va天堂va视频va在线| 国产精品白丝在线| 日韩激情在线观看| 成人精品视频一区二区三区尤物| 欧美日韩不卡视频| 国产精品你懂的| 日韩电影一二三区| 99re热视频精品| 欧美成人一区二区三区| 亚洲免费av在线| 国内精品国产三级国产a久久| 欧美亚洲精品一区| 奇米一区二区三区av| 蜜桃av一区二区| 懂色中文一区二区在线播放| 色老汉av一区二区三区| 免播放器亚洲一区| 一本大道久久a久久综合| 欧美电视剧在线观看完整版| 亚洲激情图片一区| 国产精品中文字幕日韩精品| 在线看日韩精品电影| 国产欧美日韩麻豆91| 热久久一区二区| 亚洲免费高清视频在线| 亚洲成av人片一区二区梦乃| 国产乱对白刺激视频不卡| 欧美日韩亚洲国产综合| 国产欧美日韩不卡免费| 欧美aaaaaa午夜精品| 欧美性一二三区| 中文字幕在线观看不卡视频| 极品美女销魂一区二区三区免费| 欧美在线一区二区| 成人欧美一区二区三区在线播放| 精品一区二区三区的国产在线播放| 欧美性大战久久久久久久 | 精品国产免费视频| 午夜婷婷国产麻豆精品| 91成人在线精品| 亚洲女厕所小便bbb| 成人福利电影精品一区二区在线观看| 日韩免费高清av| 奇米精品一区二区三区在线观看 | 国产精品理论在线观看| 国产一区二区三区观看| 日韩欧美成人午夜| 男女男精品视频| 欧美一区二区三区精品| 久久国产精品72免费观看| 欧美一区二区黄色| 日韩和欧美一区二区三区| 欧美精品久久久久久久久老牛影院| 一区二区三区不卡视频在线观看| 99精品久久只有精品| 日韩毛片视频在线看| av在线这里只有精品| 亚洲欧美日韩国产中文在线| 色噜噜狠狠一区二区三区果冻| 亚洲欧美激情小说另类| 91国偷自产一区二区三区成为亚洲经典| 一区免费观看视频| 欧美亚洲动漫另类| 石原莉奈在线亚洲三区| 日韩一级免费一区| 激情图区综合网| 日本一区二区动态图| 99久久99久久久精品齐齐| 一区二区三区四区五区视频在线观看 | 91精品国产乱| 精品在线一区二区| 久久网站热最新地址| www.久久久久久久久| 一区二区三区欧美视频| 欧美高清视频www夜色资源网| 日韩福利视频导航| 国产亚洲综合av| 日本精品视频一区二区三区| 天堂成人国产精品一区| 精品国产一区二区三区忘忧草 | 日韩电影在线观看网站| 久久久久久久久一| 91麻豆视频网站| 奇米精品一区二区三区在线观看一| 久久品道一品道久久精品| 一本大道久久a久久精品综合| 蜜臀91精品一区二区三区|