当前位置: 首页>>代码示例>>Java>>正文


Java JXList.addListSelectionListener方法代码示例

本文整理汇总了Java中org.jdesktop.swingx.JXList.addListSelectionListener方法的典型用法代码示例。如果您正苦于以下问题:Java JXList.addListSelectionListener方法的具体用法?Java JXList.addListSelectionListener怎么用?Java JXList.addListSelectionListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jdesktop.swingx.JXList的用法示例。


在下文中一共展示了JXList.addListSelectionListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initComponents

import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
private void initComponents() {
    setLayout(new BorderLayout(5,5));
    filterField = new JTextField();
    filterField.getDocument().addDocumentListener(this);
    add(filterField, BorderLayout.NORTH);

    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] fontFamilies = env.getAvailableFontFamilyNames();
    fontList = new JXList(fontFamilies);
    fontList.setAutoCreateRowSorter(true);
    fontList.setCellRenderer(new FontCellRenderer());
    fontList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    fontList.addListSelectionListener(this);
    fontList.setFocusable(false);
    add(new JScrollPane(fontList));
}
 
开发者ID:foxerfly,项目名称:Joeffice,代码行数:17,代码来源:FontListTopComponent.java

示例2: addAllPanel

import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
private void addAllPanel(DefaultListModel model) {
    final JXList list = new JXList(model);
    list.addListSelectionListener(this);
    list.setCellRenderer(renderer);

    list.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent mouseEvent) {
            if (mouseEvent.getClickCount() == 2) {
                CallEntry entry = (CallEntry)list.getSelectedValue();
                callHistoryFrame.dispose();
                SoftPhoneManager.getInstance().getDefaultGuiManager().dial(entry.getNumber());
            }
        }
    });

    tabs.addTab(PhoneRes.getIString("phone.all"), null, new JScrollPane(list), PhoneRes.getIString("phone.allcalls"));
}
 
开发者ID:visit,项目名称:spark-svn-mirror,代码行数:18,代码来源:CallHistoryUI.java

示例3: addDialedCalls

import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
private void addDialedCalls(DefaultListModel model) {
    final JXList list = new JXList(model);
    list.addListSelectionListener(this);
    list.setCellRenderer(renderer);
    list.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent mouseEvent) {
            if (mouseEvent.getClickCount() == 2) {
                CallEntry entry = (CallEntry)list.getSelectedValue();
                callHistoryFrame.dispose();
                SoftPhoneManager.getInstance().getDefaultGuiManager().dial(entry.getNumber());
            }
        }
    });
    List<RowFilter<Object,Object>> filters = new ArrayList<RowFilter<Object,Object>>();
    filters.add(RowFilter.regexFilter(CallLog.Type.dialed.toString(), 1));
    filters.add(RowFilter.regexFilter(CallLog.Type.dialed.toString(), 2));
    filters.add(RowFilter.regexFilter(CallLog.Type.dialed.toString(), 3));
    RowFilter<Object,Object> af = RowFilter.orFilter(filters);
    list.setRowFilter(af);           

    tabs.addTab(PhoneRes.getIString("phone.dialed"), null, new JScrollPane(list), PhoneRes.getIString("phone.dialedcalls"));
}
 
开发者ID:visit,项目名称:spark-svn-mirror,代码行数:23,代码来源:CallHistoryUI.java

示例4: addCallsReceived

import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
private void addCallsReceived(DefaultListModel model) {
    final JXList list = new JXList(model);
    list.addListSelectionListener(this);
    list.setCellRenderer(renderer);
    list.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent mouseEvent) {
            if (mouseEvent.getClickCount() == 2) {
                CallEntry entry = (CallEntry)list.getSelectedValue();
                callHistoryFrame.dispose();
                SoftPhoneManager.getInstance().getDefaultGuiManager().dial(entry.getNumber());
            }
        }
    });

    List<RowFilter<Object,Object>> filters = new ArrayList<RowFilter<Object,Object>>();
    filters.add(RowFilter.regexFilter(CallLog.Type.received.toString(), 1));
    filters.add(RowFilter.regexFilter(CallLog.Type.received.toString(), 2));
    filters.add(RowFilter.regexFilter(CallLog.Type.received.toString(), 3));
    RowFilter<Object,Object> af = RowFilter.orFilter(filters);
    list.setRowFilter(af);

    tabs.addTab(PhoneRes.getIString("phone.received"), null, new JScrollPane(list), PhoneRes.getIString("phone.receivedcalls"));
}
 
开发者ID:visit,项目名称:spark-svn-mirror,代码行数:24,代码来源:CallHistoryUI.java

示例5: addCallsMissed

import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
private void addCallsMissed(DefaultListModel model) {
    final JXList list = new JXList(model);
    list.addListSelectionListener(this);
    list.setCellRenderer(renderer);
    list.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent mouseEvent) {
            if (mouseEvent.getClickCount() == 2) {
                CallEntry entry = (CallEntry)list.getSelectedValue();
                callHistoryFrame.dispose();
                SoftPhoneManager.getInstance().getDefaultGuiManager().dial(entry.getNumber());
            }
        }
    });

    List<RowFilter<Object,Object>> filters = new ArrayList<RowFilter<Object,Object>>();
    filters.add(RowFilter.regexFilter(CallLog.Type.missed.toString(), 1));
    filters.add(RowFilter.regexFilter(CallLog.Type.missed.toString(), 2));
    filters.add(RowFilter.regexFilter(CallLog.Type.missed.toString(), 3));
    RowFilter<Object,Object> af = RowFilter.orFilter(filters);
    list.setRowFilter(af);

    tabs.addTab(PhoneRes.getIString("phone.missed"), null, new JScrollPane(list), PhoneRes.getIString("phone.missedcalls"));
}
 
开发者ID:visit,项目名称:spark-svn-mirror,代码行数:24,代码来源:CallHistoryUI.java

示例6: FilterPipeline

import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
public FilterPipeline(JXList pThisList, JXList pRightList) {
    inputList = pThisList;
    outputList = pRightList;
    pThisList.addListSelectionListener(FilterPipeline.this);
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:6,代码来源:VillageSelectionPanel.java


注:本文中的org.jdesktop.swingx.JXList.addListSelectionListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。