本文整理了Java中java.awt.List.removeAll()
方法的一些代码示例,展示了List.removeAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。List.removeAll()
方法的具体详情如下:
包路径:java.awt.List
类名称:List
方法名:removeAll
暂无
代码示例来源:origin: wildfly/wildfly
private void showAll() {
if(listbox.getItemCount() > 0)
listbox.removeAll();
if(map.isEmpty())
return;
clearMsg();
String key;
Float val;
for(Map.Entry<String,Float> entry: map.entrySet()) {
key=entry.getKey();
val=entry.getValue();
if(val == null)
continue;
listbox.add(key + ": " + val.toString());
}
}
代码示例来源:origin: wildfly/wildfly
break;
case "All":
listbox.removeAll();
showMsg("Getting all stocks:");
RspList<Object> rsp_list=disp.callRemoteMethods(null, "getAllStocks",
listbox.removeAll();
all_stocks.entrySet().stream().filter(entry -> entry.getValue() != null)
.forEach(entry -> listbox.add(entry.getKey() + ": " + entry.getValue().toString()));
代码示例来源:origin: magefree/mage
private boolean open() {
String path = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SOUNDS_MATCH_MUSIC_PATH, "true");
filepath = path + File.separator;
if (path == null) {
filepath = Constants.BASE_MUSICS_PATH;
}
filelist.removeAll();
File filedir = new File(filepath);
File[] fileread = filedir.listFiles();
if (fileread == null) {
return false;
}
if (fileread.length == 0) {
return false;
}
String filename;
for (File f : fileread) {
filename = f.getName().toLowerCase(Locale.ENGLISH);
if (filename.endsWith(".mp3") || filename.endsWith(".wav")) {
filelist.add(filename);
}
}
if (filelist.getItemCount() == 0) {
return false;
}
return true;
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void setSelectedItems(String selected[]) {
// Remove any prev set items:
list.removeAll();
// Refill the list:
if ( selected != null ) {
for (int i = 0 ; i < selected.length ; i++)
if ( selected[i] != null )
list.addItem(selected[i]);
}
}
代码示例来源:origin: io.snappydata/gemfire-jgroups
void setMembers(Vector members) {
list.removeAll();
for(int i=0; i < members.size(); i++)
list.add(members.elementAt(i).toString());
this.members=members;
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void setSelectedItems(String selected[]) {
// Remove any prev set items:
wselected.removeAll();
// Refill the list:
if ( selected != null ) {
for (int i = 0 ; i < selected.length ; i++)
if ( selected[i] != null )
wselected.addItem(selected[i]);
}
}
代码示例来源:origin: imagej/ImageJA
public void populateList(String matchingSubstring) {
String substring = matchingSubstring.toLowerCase();
functions.removeAll();
try {
for(int i=0; i<commands.length; ++i) {
String commandName = commands[i];
if (commandName.length()==0)
continue;
String lowerCommandName = commandName.toLowerCase();
if( lowerCommandName.indexOf(substring) >= 0 ) {
functions.add(commands[i]);
}
}
} catch (Exception e){}
}
代码示例来源:origin: net.imagej/ij
public void populateList(String matchingSubstring) {
String substring = matchingSubstring.toLowerCase();
functions.removeAll();
try {
for(int i=0; i<commands.length; ++i) {
String commandName = commands[i];
if (commandName.length()==0)
continue;
String lowerCommandName = commandName.toLowerCase();
if( lowerCommandName.indexOf(substring) >= 0 ) {
functions.add(commands[i]);
}
}
} catch (Exception e){}
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void setDefaultItems(EditorFeeder feeder) {
witems.removeAll();
String items[] = feeder.getDefaultItems();
if (items != null) {
for (int i = 0 ; i < items.length ; i++)
if ( items[i] != null )
witems.addItem(items[i]);
}
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void setDefaultItems() {
list.removeAll();
String items[] = feeder.getDefaultItems();
if (items != null) {
for (int i = 0 ; i < items.length ; i++)
if ( items[i] != null )
list.addItem(items[i]);
}
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void setTable(ArrayDictionary table) {
if (table == null) {
hashtable = new ArrayDictionary(5);
return;
}
hashtable = table;
Enumeration keys = table.keys();
list.removeAll();
while (keys.hasMoreElements())
list.addItem((String)keys.nextElement());
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void updateKeys() {
tkey.setText("");
tvalue.setText("");
keys.removeAll();
Enumeration e = table.keys();
while (e.hasMoreElements())
keys.addItem((String)e.nextElement());
}
代码示例来源:origin: apache/activemq-artemis
private void showAll() {
if(listbox.getItemCount() > 0)
listbox.removeAll();
if(map.isEmpty())
return;
clearMsg();
String key;
Float val;
for(Map.Entry<String,Float> entry: map.entrySet()) {
key=entry.getKey();
val=entry.getValue();
if(val == null)
continue;
listbox.add(key + ": " + val.toString());
}
}
代码示例来源:origin: apache/activemq-artemis
private void showAll() {
if(listbox.getItemCount() > 0)
listbox.removeAll();
if(map.isEmpty())
return;
clearMsg();
String key;
Float val;
for(Map.Entry<String,Float> entry: map.entrySet()) {
key=entry.getKey();
val=entry.getValue();
if(val == null)
continue;
listbox.add(key + ": " + val.toString());
}
}
代码示例来源:origin: com.bbossgroups.rpc/bboss-rpc
private void showAll() {
if(listbox.getItemCount() > 0)
listbox.removeAll();
if(map.isEmpty())
return;
clearMsg();
String key;
Float val;
for(Map.Entry<String,Float> entry: map.entrySet()) {
key=entry.getKey();
val=entry.getValue();
if(val == null)
continue;
listbox.add(key + ": " + val.toString());
}
}
代码示例来源:origin: sc.fiji/Trainable_Segmentation
/**
* Update the example lists in the GUI
*/
protected void updateExampleLists()
{
final int currentSlice = displayImage.getCurrentSlice();
for(int i = 0; i < wekaSegmentation.getNumOfClasses(); i++)
{
exampleList[i].removeAll();
for(int j=0; j<wekaSegmentation.getExamples(i, currentSlice).size(); j++)
exampleList[i].add("trace " + j + " (Z=" + currentSlice+")");
}
}
代码示例来源:origin: org.apache.activemq/artemis-jms-client-all
private void showAll() {
if(listbox.getItemCount() > 0)
listbox.removeAll();
if(map.isEmpty())
return;
clearMsg();
String key;
Float val;
for(Map.Entry<String,Float> entry: map.entrySet()) {
key=entry.getKey();
val=entry.getValue();
if(val == null)
continue;
listbox.add(key + ": " + val.toString());
}
}
代码示例来源:origin: fiji/Trainable_Segmentation
/**
* Update the example lists in the GUI
*/
protected void updateExampleLists()
{
final int currentSlice = displayImage.getCurrentSlice();
for(int i = 0; i < wekaSegmentation.getNumOfClasses(); i++)
{
exampleList[i].removeAll();
for(int j=0; j<wekaSegmentation.getExamples(i, currentSlice).size(); j++)
exampleList[i].add("trace " + j + " (Z=" + currentSlice+")");
}
}
代码示例来源:origin: org.junit/com.springsource.junit
protected void reset() {
setLabelValue(fNumberOfErrors, 0);
setLabelValue(fNumberOfFailures, 0);
setLabelValue(fNumberOfRuns, 0);
fProgressIndicator.reset();
fRerunButton.setEnabled(false);
fFailureList.removeAll();
fExceptions= new Vector(10);
fFailedTests= new Vector(10);
fTraceArea.setText("");
}
代码示例来源:origin: bedatadriven/activityinfo
private void updateStepList(Observable<FormMapping> formMapping) {
steps.clear();
steps.add(new MatchStep(viewModel));
if (!formMapping.isLoading()) {
for (ReferenceFieldMapping referenceFieldMapping : formMapping.get().getReferenceFieldMappings()) {
steps.add(new LookupStep(viewModel, referenceFieldMapping));
}
}
stepList.removeAll();
for (Step step : steps) {
stepList.add(step.getLabel());
}
}
内容来源于网络,如有侵权,请联系作者删除!