@Override public void valueChanged(ListSelectionEvent e) { outgoingEdges.clearSelection(); incomingEdges.clearSelection(); @SuppressWarnings("unchecked") JList<State> theList = (JList<State>)e.getSource(); State st = (State)theList.getSelectedValue(); Edge edge = st.getBackEdge(); reactToEdgeSelection( edge, false ); } });
private void refreshQuickOpenPanel(JList<QuickOpenAction> listPanel, List<File> fileList) { DefaultListModel<QuickOpenAction> model = (DefaultListModel<QuickOpenAction>) listPanel.getModel(); model.clear(); for (File file : fileList) { QuickOpenAction action = new QuickOpenAction(file); model.addElement(action); listPanel.clearSelection(); } }
cancel.setToolTipText("Cancel"); cancel.addActionListener(evt -> { fileList.clearSelection(); dialog.setVisible(false); });
private void setSolutionLoaded(Object eventSource) { if (eventSource != quickOpenUnsolvedJList) { quickOpenUnsolvedJList.clearSelection(); } if (eventSource != quickOpenSolvedJList) { quickOpenSolvedJList.clearSelection(); } setTitle(solutionBusiness.getAppName() + " - " + solutionBusiness.getSolutionFileName()); ((CardLayout) middlePanel.getLayout()).show(middlePanel, "solutionPanel"); setSolvingState(false); resetScreen(); }
public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equalsIgnoreCase("cancel")) { list.clearSelection(); } this.setVisible(false); }
private void doCancel() { this.listChoices.clearSelection(); this.choice.clearChoice(); hideDialog(); }
private void doCancel() { this.listChoices.clearSelection(); this.choice.clearChoice(); hideDialog(); }
public void setSelectedValues(JList list, Object... values) { list.clearSelection(); for (Object value : values) { int index = getIndex(list.getModel(), value); if (index >=0) { list.addSelectionInterval(index, index); } } list.ensureIndexIsVisible(list.getSelectedIndex()); } public int getIndex(ListModel model, Object value) { if (value == null) return -1; if (model instanceof DefaultListModel) { return ((DefaultListModel) model).indexOf(value); } for (int i = 0; i < model.getSize(); i++) { if (value.equals(model.getElementAt(i))) return i; } return -1; }
if (list.locationToIndex(e.getPoint()) == -1 && !e.isShiftDown() && !isMenuShortcutKeyDown(e)) { list.clearSelection();
/** * Clears all selections within this group. */ public void clearSelection() { contactItemList.clearSelection(); }
@Override public void actionPerformed(ActionEvent e) { dataSourceList.clearSelection(); } });
/** Get called when state of selected color changes */ public void updateChooser () { SuperColor sc = ce.getSuperColor (); String id; if (sc != null && palette == sc.getPalette () && (id = sc.getID()) != null && names != null) { int i = getIndex (names, id); list.setSelectedIndex (i); } else list.clearSelection (); }
/** Loads the information from the resource list. **/ public void load() { list_.clearSelection(); model_.load(); }
public void sourcePropertyChanged(DesignProperty prop) { if (showingProp == prop) return; showingProp = prop; if (prop != null) { propList.setSelectedValue(prop, true); } else { propList.clearSelection(); } }
public void select (Collection<E> items) { list.clearSelection(); for (int i = 0, iBreak = model.size(); i < iBreak; i++) { E item = model.get(i); if (items.contains(item)) { list.addSelectionInterval(i, i); } } }
private void removeAllButtonActionPerformed() { JList selectedList = getSelectedRobotsList(); SelectedRobotsModel selectedModel = (SelectedRobotsModel) selectedList.getModel(); selectedRobots.clear(); selectedList.clearSelection(); selectedModel.changed(); fireStateChanged(); showInstructions(); }
private void updateListModel() { listModel.filter(); glJList.clearSelection(); glJList.updateUI(); lociJList.updateUI(); }
public void deselect() { int n = getCount(); for (int i=0; i<n; i++) list.clearSelection(); if (record()) Recorder.record("roiManager", "Deselect"); return; }
private void setIgnoreColumns() { ListSelectorDialog jd = new ListSelectorDialog(SwingUtilities.getWindowAncestor(this), m_ignoreKeyList); // Open the dialog int result = jd.showDialog(); if (result != ListSelectorDialog.APPROVE_OPTION) { // clear selected indices m_ignoreKeyList.clearSelection(); } updateCapabilitiesFilter(m_ClustererEditor.getCapabilitiesFilter()); }
private void setSolutionLoaded(Object eventSource) { if (eventSource != quickOpenUnsolvedJList) { quickOpenUnsolvedJList.clearSelection(); } if (eventSource != quickOpenSolvedJList) { quickOpenSolvedJList.clearSelection(); } setTitle(solutionBusiness.getAppName() + " - " + solutionBusiness.getSolutionFileName()); ((CardLayout) middlePanel.getLayout()).show(middlePanel, "solutionPanel"); setSolvingState(false); resetScreen(); }