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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? winedemo.java

?? clips源代碼
?? JAVA
字號:
import javax.swing.*; import javax.swing.border.*; import javax.swing.table.*;import java.awt.*; import java.awt.event.*;  import java.util.Iterator;import java.util.List; import CLIPSJNI.*;/* TBD module qualifier with find-all-facts */class WineDemo implements ActionListener  {     DefaultTableModel wineList;     JComboBox preferredColor;    JComboBox preferredBody;    JComboBox preferredSweetness;    JComboBox mainCourse;    JComboBox sauce;    JComboBox flavor;       JLabel jlab;     String preferredColorChoices[] = { "Don't Care", "Red", "White" };    String preferredBodyChoices[] = { "Don't Care", "Light", "Medium", "Full" };    String preferredSweetnessChoices[] = { "Don't Care", "Dry", "Medium", "Sweet" };       String mainCourseChoices[] = { "Don't Know", "Beef", "Pork", "Lamb", "Turkey", "Chicken", "Duck", "Fish", "Other" };   String sauceChoices[] = { "Don't Know", "None", "Spicy", "Sweet", "Cream", "Other" };   String flavorChoices[] = { "Don't Know", "Delicate", "Average", "Strong" };   Environment clips;   class WeightCellRenderer extends JProgressBar implements TableCellRenderer      {      public WeightCellRenderer()         {         super(JProgressBar.HORIZONTAL,0,100);         setStringPainted(false);        }        public Component getTableCellRendererComponent(        JTable table,         Object value,        boolean isSelected,         boolean hasFocus,         int row,         int column)         {          setValue(((Number) value).intValue());         return WeightCellRenderer.this;         }     }         WineDemo()     {        /*================================*/      /* Create a new JFrame container. */      /*================================*/           JFrame jfrm = new JFrame("Wine Demo");         /*=============================*/      /* Specify FlowLayout manager. */      /*=============================*/              jfrm.getContentPane().setLayout(new FlowLayout());         /*=================================*/      /* Give the frame an initial size. */      /*=================================*/           jfrm.setSize(480,390);          /*=============================================================*/      /* Terminate the program when the user closes the application. */      /*=============================================================*/           jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         /*===============================*/      /* Create the preferences panel. */      /*===============================*/            JPanel preferencesPanel = new JPanel();       GridLayout theLayout = new GridLayout(3,2);      preferencesPanel.setLayout(theLayout);         preferencesPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),                                                                 "Preferences",                                                                 TitledBorder.CENTER,                                                                 TitledBorder.ABOVE_TOP));       preferencesPanel.add(new JLabel("Color:"));      preferredColor = new JComboBox(preferredColorChoices);       preferencesPanel.add(preferredColor);      preferredColor.addActionListener(this);           preferencesPanel.add(new JLabel("Body:"));      preferredBody = new JComboBox(preferredBodyChoices);       preferencesPanel.add(preferredBody);      preferredBody.addActionListener(this);      preferencesPanel.add(new JLabel("Sweetness:"));      preferredSweetness = new JComboBox(preferredSweetnessChoices);       preferencesPanel.add(preferredSweetness);      preferredSweetness.addActionListener(this);      /*========================*/      /* Create the meal panel. */      /*========================*/           JPanel mealPanel = new JPanel();       theLayout = new GridLayout(3,2);      mealPanel.setLayout(theLayout);         mealPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),                                                                 "Meal",                                                                 TitledBorder.CENTER,                                                                 TitledBorder.ABOVE_TOP));       mealPanel.add(new JLabel("Main Course:"));      mainCourse = new JComboBox(mainCourseChoices);       mealPanel.add(mainCourse);      mainCourse.addActionListener(this);          mealPanel.add(new JLabel("Sauce:"));      sauce = new JComboBox(sauceChoices);       mealPanel.add(sauce);      sauce.addActionListener(this);      mealPanel.add(new JLabel("Flavor:"));      flavor = new JComboBox(flavorChoices);       mealPanel.add(flavor);      flavor.addActionListener(this);            /*==================================*/      /* Create the recommendation panel. */      /*==================================*/      wineList = new DefaultTableModel();      wineList.setDataVector(new Object[][] { },                             new Object[] { "Wine", "Recommendation Weight"});               JTable table =          new JTable(wineList)           {            public boolean isCellEditable(int rowIndex,int vColIndex)               { return false; }           };      table.setCellSelectionEnabled(false);       WeightCellRenderer renderer = this.new WeightCellRenderer();       renderer.setBackground(table.getBackground());      table.getColumnModel().getColumn(1).setCellRenderer(renderer);      JScrollPane pane = new JScrollPane(table);          table.setPreferredScrollableViewportSize(new Dimension(450,210));               /*==================================================*/      /* Add the two ComboBox panels to the content pane. */      /*==================================================*/            jfrm.getContentPane().add(preferencesPanel);       jfrm.getContentPane().add(mealPanel);       jfrm.getContentPane().add(pane);       /*===================================================*/      /* Initially select the first item in each ComboBox. */      /*===================================================*/             preferredColor.setSelectedIndex(0);       preferredBody.setSelectedIndex(0);       preferredSweetness.setSelectedIndex(0);       mainCourse.setSelectedIndex(0);      sauce.setSelectedIndex(0);      flavor.setSelectedIndex(0);      /*========================*/      /* Load the wine program. */      /*========================*/            clips = new Environment();            clips.load("winedemo.clp");            runWine();             /*====================*/      /* Display the frame. */      /*====================*/            jfrm.setVisible(true);       }       /*########################*/   /* ActionListener Methods */   /*########################*/      /*******************/   /* actionPerformed */   /*******************/     public void actionPerformed(     ActionEvent ae)      {       if (clips == null) return;            runWine();     }        /*******************/   /* runWine */   /*******************/     private void runWine()      {       String item;      clips.reset();                        item = (String) preferredColor.getSelectedItem();      if (item.equals("Red"))           { clips.assertString("(attribute (name preferred-color) (value red))"); }      else if (item.equals("White"))           { clips.assertString("(attribute (name preferred-color) (value white))"); }      else        { clips.assertString("(attribute (name preferred-color) (value unknown))"); }      item = (String) preferredBody.getSelectedItem();      if (item.equals("Light"))           { clips.assertString("(attribute (name preferred-body) (value light))"); }      else if (item.equals("Medium"))           { clips.assertString("(attribute (name preferred-body) (value medium))"); }      else if (item.equals("Full"))           { clips.assertString("(attribute (name preferred-body) (value full))"); }      else        { clips.assertString("(attribute (name preferred-body) (value unknown))"); }       item = (String) preferredSweetness.getSelectedItem();      if (item.equals("Dry"))           { clips.assertString("(attribute (name preferred-sweetness) (value dry))"); }      else if (item.equals("Medium"))           { clips.assertString("(attribute (name preferred-sweetness) (value medium))"); }      else if (item.equals("Sweet"))           { clips.assertString("(attribute (name preferred-sweetness) (value sweet))"); }      else        { clips.assertString("(attribute (name preferred-sweetness) (value unknown))"); }      item = (String) mainCourse.getSelectedItem();      if (item.equals("Beef") ||          item.equals("Pork") ||          item.equals("Lamb"))        {          clips.assertString("(attribute (name main-component) (value meat))");          clips.assertString("(attribute (name has-turkey) (value no))");        }      else if (item.equals("Turkey"))           {          clips.assertString("(attribute (name main-component) (value poultry))");          clips.assertString("(attribute (name has-turkey) (value yes))");        }      else if (item.equals("Chicken") ||               item.equals("Duck"))           {          clips.assertString("(attribute (name main-component) (value poultry))");          clips.assertString("(attribute (name has-turkey) (value no))");        }      else if (item.equals("Fish"))           {          clips.assertString("(attribute (name main-component) (value fish))");          clips.assertString("(attribute (name has-turkey) (value no))");        }      else if (item.equals("Other"))           {          clips.assertString("(attribute (name main-component) (value unknown))");          clips.assertString("(attribute (name has-turkey) (value no))");        }      else        {          clips.assertString("(attribute (name main-component) (value unknown))");          clips.assertString("(attribute (name has-turkey) (value unknown))");        }      item = (String) sauce.getSelectedItem();      if (item.equals("None"))           { clips.assertString("(attribute (name has-sauce) (value no))"); }      else if (item.equals("Spicy"))           {          clips.assertString("(attribute (name has-sauce) (value yes))");         clips.assertString("(attribute (name sauce) (value spicy))");        }      else if (item.equals("Sweet"))           {          clips.assertString("(attribute (name has-sauce) (value yes))");         clips.assertString("(attribute (name sauce) (value sweet))");        }      else if (item.equals("Cream"))           {          clips.assertString("(attribute (name has-sauce) (value yes))");         clips.assertString("(attribute (name sauce) (value cream))");        }      else if (item.equals("Other"))           {          clips.assertString("(attribute (name has-sauce) (value yes))");         clips.assertString("(attribute (name sauce) (value unknown))");        }      else        {          clips.assertString("(attribute (name has-sauce) (value unknown))");         clips.assertString("(attribute (name sauce) (value unknown))");        }      item = (String) flavor.getSelectedItem();      if (item.equals("Delicate"))           { clips.assertString("(attribute (name tastiness) (value delicate))"); }      else if (item.equals("Average"))           { clips.assertString("(attribute (name tastiness) (value average))"); }      else if (item.equals("Strong"))           { clips.assertString("(attribute (name tastiness) (value strong))"); }      else        { clips.assertString("(attribute (name tastiness) (value unknown))"); }            clips.run();            String evalStr = "(WINES::get-wine-list)";                                                   MultifieldValue pv = (MultifieldValue) clips.eval(evalStr);                  List theList = pv.listValue();            wineList.setRowCount(0);            for (Iterator itr = theList.iterator(); itr.hasNext(); )         {         FactAddressValue fv = (FactAddressValue) itr.next();         int certainty = ((FloatValue) fv.getFactSlot("certainty")).intValue();                   String wineName = ((StringValue) fv.getFactSlot("value")).stringValue();                           wineList.addRow(new Object[] { wineName, new Integer(certainty) });        }           }        public static void main(String args[])     {        // Create the frame on the event dispatching thread.        SwingUtilities.invokeLater(        new Runnable()           {             public void run() { new WineDemo(); }            });        }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日本一道本| 肉肉av福利一精品导航| 国产精品白丝jk白祙喷水网站| 制服丝袜成人动漫| 美女一区二区在线观看| 欧美成人a∨高清免费观看| 久88久久88久久久| 中文字幕不卡在线| 色婷婷国产精品久久包臀| 亚洲天堂av老司机| 欧美性色黄大片手机版| 美女高潮久久久| 久久影视一区二区| 成人在线一区二区三区| 17c精品麻豆一区二区免费| 一本色道亚洲精品aⅴ| 亚洲制服丝袜一区| 在线播放亚洲一区| 久久激情综合网| 欧美激情中文不卡| 色伊人久久综合中文字幕| 一区二区三区四区在线| 91精品国产色综合久久| 国产a精品视频| 一区二区三区精密机械公司| 日韩欧美黄色影院| 91在线视频观看| 青娱乐精品在线视频| 国产精品免费看片| 欧美男男青年gay1069videost| 国产一区二区三区四区在线观看| 亚洲天堂久久久久久久| 国产精品传媒入口麻豆| 高清av一区二区| 欧美一区二区播放| 精品少妇一区二区三区视频免付费 | 国产精品理伦片| 欧美日韩在线播放| 国产揄拍国内精品对白| 亚洲人成在线观看一区二区| 欧美一区二区免费视频| 国产乱码精品一区二区三 | 天堂在线一区二区| 久久午夜国产精品| 欧美日韩一区二区在线观看| 成人免费黄色在线| 狠狠色狠狠色综合系列| 偷拍自拍另类欧美| 亚洲欧洲99久久| 久久嫩草精品久久久久| 欧美丝袜丝nylons| youjizz国产精品| 久久99国产精品久久| 亚洲综合另类小说| 中文字幕亚洲电影| 日韩免费福利电影在线观看| 欧美性猛片aaaaaaa做受| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品久久久久久久久久久免费看| 在线电影一区二区三区| 在线中文字幕不卡| voyeur盗摄精品| 国产成人免费9x9x人网站视频| 免费高清在线视频一区·| 亚洲一卡二卡三卡四卡五卡| 国产精品久久久久婷婷二区次| 久久久亚洲综合| 91精品国产欧美一区二区成人| 91高清视频在线| 成人av在线播放网址| 麻豆成人久久精品二区三区红 | 久久网这里都是精品| 69堂成人精品免费视频| 99精品在线观看视频| 菠萝蜜视频在线观看一区| 国产精品一区二区在线观看不卡| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲mv在线观看| 亚洲午夜免费电影| 亚洲成人一区二区在线观看| 亚洲一区二区三区小说| 亚洲一区二区视频在线| 亚洲综合无码一区二区| 亚洲影院在线观看| 亚洲成av人片在线| 秋霞国产午夜精品免费视频| 美日韩一区二区| 精品在线一区二区| 国产精品一区免费在线观看| 国产成人免费9x9x人网站视频| 成人性生交大片免费看视频在线| 成人午夜又粗又硬又大| 91在线播放网址| 在线一区二区三区做爰视频网站| 欧美三级日韩三级| 91精品国产综合久久精品| 精品成人一区二区| 久久久三级国产网站| 亚洲国产高清aⅴ视频| 亚洲精品日产精品乱码不卡| 香蕉久久夜色精品国产使用方法| 日韩电影在线观看网站| 男人的天堂亚洲一区| 久久国内精品视频| 成人中文字幕合集| 91成人免费在线视频| 在线电影一区二区三区| 久久精品亚洲乱码伦伦中文| 亚洲欧美日韩人成在线播放| 亚洲小说欧美激情另类| 美女诱惑一区二区| 成人黄页毛片网站| 欧洲视频一区二区| 亚洲精品一区二区三区影院| 日本一区二区电影| 亚洲mv大片欧洲mv大片精品| 精久久久久久久久久久| 91在线视频播放| 日韩美女主播在线视频一区二区三区| 中文字幕乱码一区二区免费| 亚洲高清免费在线| 国产99久久久精品| 欧美日韩电影在线播放| 国产日产欧美一区二区视频| 亚洲成人第一页| 成人精品一区二区三区四区| 3d成人h动漫网站入口| 国产精品毛片久久久久久| 亚洲r级在线视频| eeuss影院一区二区三区 | 91福利在线观看| 久久欧美一区二区| 同产精品九九九| 亚洲男人的天堂在线观看| 五月天一区二区三区| 国产伦精品一区二区三区视频青涩 | 国产欧美中文在线| 丝袜国产日韩另类美女| 国产成人小视频| 欧美一区二区三区四区久久| 亚洲精品欧美综合四区| 粉嫩欧美一区二区三区高清影视| 欧美猛男超大videosgay| 国产精品福利一区二区三区| 国产在线不卡一区| 日韩一级大片在线| 亚洲一二三专区| 91浏览器打开| 国产精品乱子久久久久| 国产一区二区三区日韩| 欧美一区二区人人喊爽| 亚洲国产精品久久人人爱| 91美女在线看| 中文字幕在线不卡视频| 风间由美中文字幕在线看视频国产欧美| 欧美一区二区三区四区久久| 一区二区三区波多野结衣在线观看| 成人一区二区三区视频| 久久精品夜色噜噜亚洲a∨| 激情成人综合网| 欧美网站一区二区| 亚洲一区在线视频| 91在线小视频| 国产色爱av资源综合区| 国产精品一区二区久久不卡| 精品日韩在线观看| 久久激情五月婷婷| www国产精品av| 国产老妇另类xxxxx| 精品少妇一区二区三区日产乱码 | 欧美激情一区在线观看| 国产精品主播直播| 国产日韩综合av| 成人精品高清在线| 亚洲欧洲一区二区三区| 91欧美一区二区| 亚洲综合av网| 91麻豆精品国产91久久久资源速度| 日本不卡在线视频| 日韩免费视频一区二区| 精品亚洲成a人| 国产欧美视频在线观看| 成人国产精品免费观看动漫| 亚洲欧洲日韩av| 在线一区二区观看| 日韩电影在线观看一区| 欧美成人综合网站| 国产成人精品三级| 亚洲欧美日韩成人高清在线一区| 91视频www| 午夜精品123| 亚洲精品国产精品乱码不99| 欧美亚洲尤物久久| 日本欧美韩国一区三区| 久久久精品国产免费观看同学| 波多野结衣中文一区| 亚洲在线免费播放| 日韩精品一区在线| youjizz久久| 天堂精品中文字幕在线|