JavaTM 2 Platform
Standard Ed. 6

介面 javax.swing.SingleSelectionModel
的使用

使用 SingleSelectionModel 的軟體套件
javax.swing 提供一組“輕量級”(全部是 Java 語言)元件,盡量讓這些元件在所有平臺上的工作方式都相同。 
 

javax.swing 中 SingleSelectionModel 的使用
 

實作 SingleSelectionModel 的 javax.swing 中的類別
 class DefaultSingleSelectionModel
          SingleSelectionModel 的一般實作。
 

宣告為 SingleSelectionModel 的 javax.swing 中的欄位
protected  SingleSelectionModel JTabbedPane.model
          預設的選擇模型。
 

返回 SingleSelectionModel 的 javax.swing 中的方法
 SingleSelectionModel JTabbedPane.getModel()
          返回與此選項卡窗格關聯的模型。
 SingleSelectionModel JPopupMenu.getSelectionModel()
          返回處理單個選擇的模型物件。
 SingleSelectionModel JMenuBar.getSelectionModel()
          返回處理單個選擇的模型物件。
 

參數型別為 SingleSelectionModel 的 javax.swing 中的方法
 void JTabbedPane.setModel(SingleSelectionModel model)
          設置要用於此選項卡窗格的模型。
 void JPopupMenu.setSelectionModel(SingleSelectionModel model)
          設置處理單個選擇的模型物件。
 void JMenuBar.setSelectionModel(SingleSelectionModel model)
          設置處理單個選擇的模型物件。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。