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(); } }
public void resetTo(List<DFAGraphMethod> newNodes, LineGetter lines) { dfaCanvas.setCode(lines); nodes.clear(); for (DFAGraphMethod md : newNodes) { nodes.addElement(new ElementWrapper(md)); } nodeList.setSelectedIndex(0); dfaCanvas.setMethod(newNodes.get(0)); repaint(); } }
/** * Fills list element with given templates list. * * @param userTemplates templates list */ @SuppressWarnings("unchecked") public void resetForm(@NotNull List<IgnoreSettings.UserTemplate> userTemplates) { myListModel.clear(); for (IgnoreSettings.UserTemplate template : userTemplates) { myListModel.addElement(new IgnoreSettings.UserTemplate(template.getName(), template.getContent())); } }
protected void findAnnotation() { Set<Class<? extends GraphBuilderAnnotation>> gbaClasses = Sets.newHashSet(); for (GraphBuilderAnnotation gba : graph.getBuilderAnnotations()) { gbaClasses.add(gba.getClass()); } @SuppressWarnings("unchecked") Class<? extends GraphBuilderAnnotation> variety = (Class<? extends GraphBuilderAnnotation>) JOptionPane .showInputDialog(null, // parentComponent; TODO: set correctly "Select the type of annotation to find", // question "Select annotation", // title JOptionPane.QUESTION_MESSAGE, // message type null, // no icon gbaClasses.toArray(), // options (built above) StopUnlinked.class // default value ); // User clicked cancel if (variety == null) return; // loop over the annotations and save the ones of the requested type annotationMatchesModel.clear(); for (GraphBuilderAnnotation anno : graph.getBuilderAnnotations()) { if (variety.isInstance(anno)) { annotationMatchesModel.addElement(anno); } } System.out.println("Found " + annotationMatchesModel.getSize() + " annotations of type " + variety); }
} else { findButton.setText("Stop"); classesList.clear(); ConfigSaver configSaver = ConfigSaver.getLoadedInstance(); DecompilerSettings settings = configSaver.getDecompilerSettings();
metadataModel.clear(); getMetadata(selected);
@Override public void actionPerformed(ActionEvent ae) { xpathResults.clear(); if (StringUtils.isBlank(xpathQueryArea.getText())) { xpathResults.addElement("XPath query field is empty.");
public void restore() { this.listModel.clear(); for (ItemList path: this.defaultList) { this.listModel.addElement(path); } }
private void loadData() { // load data to datamodel after filter or on startup String filter = choice.getSearchText(); if (filter == null) { filter = ""; } filter = filter.toLowerCase(Locale.ENGLISH); this.dataModel.clear(); for (KeyValueItem item : this.allItems) { if (!choice.isSearchEnabled() || item.Value.toLowerCase(Locale.ENGLISH).contains(filter)) { this.dataModel.addElement(item); } } }
private void setThirdPartyClasspath(final List<String> classpath) { List<String> thirdPartyClasspath; if (classpath == null) { thirdPartyClasspath = new ArrayList<>(); } else { thirdPartyClasspath = classpath; } final DefaultListModel<String> listModel = pathListModel(); listModel.clear(); for (final String classPathFile : thirdPartyClasspath) { if (!Strings.isBlank(classPathFile)) { listModel.addElement(classPathFile); } } }
public void clear() { ((DefaultListModel) getModel()).clear(); myItemMap.clear(); }
private void setContents(List<String> contents) { DefaultListModel<LabelValuePair> model = (DefaultListModel<LabelValuePair>)getModel(); model.clear(); for (String str : contents) { model.addElement(new LabelValuePair(str)); } setVisibleRowCount(Math.min(model.getSize(), 8)); }
private void loadData() { // load data to datamodel after filter or on startup String filter = choice.getSearchText(); if (filter == null) { filter = ""; } filter = filter.toLowerCase(); this.dataModel.clear(); this.m_dataModel.clear(); for (KeyValueItem item : this.allItems) { if (!choice.isSearchEnabled() || item.Value.toLowerCase().contains(filter)) { this.dataModel.addElement(item); this.m_dataModel.addElement(item.getObjectValue()); } } }
private void setupLayersList() { caps = wms.getCapabilities(); model.clear(); for (Layer layer : WMSUtils.getNamedLayers(caps)) { String title = layer.getTitle(); if (title == null) { title = layer.getName(); } model.addElement(layer); } }
if (text.equals(keyword)) { JSONArray jsonArray = jsonObject.getJSONArray("data"); dataSet.clear(); if (!jsonArray.isEmpty()) { for (int i = 0; i < jsonArray.size(); i++) {
this.listModel.clear(); startPosition[0] = 0; endPosition[0] = 0;
/** * Fills the list with the given data. * * @param list */ public void setData(List<String> list) { data.clear(); for (String item : list) { data.addElement(item); } }
public void populateList() { listModel.clear(); for (Iterator i = JTSTestBuilderFrame.instance().getModel().getCases().iterator(); i.hasNext(); ) { Testable testCase = (Testable) i.next(); listModel.addElement(testCase); } } }
public void populateList() { listModel.clear(); LayerList lyrList = JTSTestBuilderFrame.instance().getModel().getLayers(); for (int i = 0; i < lyrList.size(); i++) { Layer lyr = lyrList.getLayer(i); listModel.addElement(lyr); } }