本文整理汇总了Java中org.jdesktop.swingx.JXList.addMouseListener方法的典型用法代码示例。如果您正苦于以下问题:Java JXList.addMouseListener方法的具体用法?Java JXList.addMouseListener怎么用?Java JXList.addMouseListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXList
的用法示例。
在下文中一共展示了JXList.addMouseListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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"));
}
示例2: 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"));
}
示例3: 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"));
}
示例4: 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"));
}
示例5: initUI
import org.jdesktop.swingx.JXList; //导入方法依赖的package包/类
private void initUI() {
final ImageIcon icon = IconCache.getInstance().getIcon("msg", 16);
dataModel = new DefaultListModel<FIXMessageListItem>();
jList = new JXList(dataModel);
jList.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.isPopupTrigger()) {
}
}
});
jList.setCellRenderer(new DefaultListCellRenderer() {
private static final long serialVersionUID = 1L;
@Override
public Component getListCellRendererComponent(JList<?> list,
Object value, int index, boolean isSelected,
boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected,
cellHasFocus);
setIcon(icon);
return this;
}
});
JScrollPane scrollPane = new JScrollPane(jList,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JToolBar toolBar = new JToolBar();
toolBar.add(new ClearAction());
toolBar.add(new LoadMessageFileAction());
toolBar.setFloatable(false);
setLayout(new BorderLayout(5, 5));
add(toolBar, BorderLayout.NORTH);
add(scrollPane);
}