Java Code Examples for org.jdesktop.swingx.JXList

The following examples show how to use org.jdesktop.swingx.JXList. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Spark   Source File: CallHistoryUI.java    License: Apache License 2.0 6 votes vote down vote up
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"));
}
 
Example 2
Source Project: Spark   Source File: CallHistoryUI.java    License: Apache License 2.0 6 votes vote down vote up
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"));
}
 
Example 3
Source Project: Spark   Source File: CallHistoryUI.java    License: Apache License 2.0 6 votes vote down vote up
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"));
}
 
Example 4
Source Project: Spark   Source File: CallHistoryUI.java    License: Apache License 2.0 6 votes vote down vote up
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"));
}
 
Example 5
Source Project: ganttproject   Source File: GanttURLChooser.java    License: GNU General Public License v3.0 5 votes vote down vote up
protected void tryEnterCollection(JXList table, FilesTableModel tableModel) {
  WebDavResource resource = (WebDavResource) table.getSelectedValue();
  try {
    if (resource.isCollection()) {
      new ReloadWorker(resource).execute();
    }
  } catch (WebDavException e) {
    showError(e);
  }
}
 
Example 6
Source Project: Spark   Source File: CallHistoryUI.java    License: Apache License 2.0 5 votes vote down vote up
public void valueChanged(ListSelectionEvent listSelectionEvent) {
    if (listSelectionEvent.getValueIsAdjusting()) {
        return;
    }

    final JXList list = (JXList)listSelectionEvent.getSource();
    activeList = list;
    CallEntry callEntry = (CallEntry)list.getSelectedValue();
    callButton.setEnabled(callEntry != null);
    deleteButton.setEnabled(callEntry != null);
}
 
Example 7
Source Project: dsworkbench   Source File: VillageSelectionPanel.java    License: Apache License 2.0 4 votes vote down vote up
private void changeSelectionElementVisibility(JScrollPane pScrollPane, JXList pList, boolean pShow) {
    pScrollPane.setVisible(pShow);
    pList.setVisible(pShow);
}
 
Example 8
Source Project: dsworkbench   Source File: VillageSelectionPanel.java    License: Apache License 2.0 4 votes vote down vote up
public FilterPipeline(JXList pThisList, JXList pRightList) {
    inputList = pThisList;
    outputList = pRightList;
    pThisList.addListSelectionListener(FilterPipeline.this);
}
 
Example 9
Source Project: dsworkbench   Source File: VillageSelectionPanel.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * Special constructor for group list, as selection handling is managed by the list itself
 */
public FilterPipeline(GroupSelectionList pThisList, JXList pRightList) {
    inputList = pThisList;
    outputList = pRightList;
}
 
Example 10
Source Project: dsworkbench   Source File: VillageSelectionPanel.java    License: Apache License 2.0 4 votes vote down vote up
public JXList getInputList() {
    return inputList;
}
 
Example 11
Source Project: dsworkbench   Source File: VillageSelectionPanel.java    License: Apache License 2.0 4 votes vote down vote up
public JXList getOutputList() {
    return outputList;
}
 
Example 12
Source Project: gameserver   Source File: WeaponAndItemPanel.java    License: Apache License 2.0 4 votes vote down vote up
public JXList getList() {
	return this.list;
}
 
Example 13
Source Project: gameserver   Source File: ListSelectDialog.java    License: Apache License 2.0 4 votes vote down vote up
public JXList getList() {
	return list;
}
 
Example 14
Source Project: Spark   Source File: GroupChatParticipantList.java    License: Apache License 2.0 2 votes vote down vote up
protected JXList getParticipantsList() {

        return participantsList;

    }