本文整理汇总了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));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例6: FilterPipeline
import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
public FilterPipeline(JXList pThisList, JXList pRightList) {
inputList = pThisList;
outputList = pRightList;
pThisList.addListSelectionListener(FilterPipeline.this);
}