Added code folding and formatted all files

This commit is contained in:
SuspiciousActivity committed 2018-07-08 14:39:06 +02:00
1 parent 11570d6b95
commit 66cd1dbd3e
233 files changed
+82245 -118134

No files matched your search

@@ -1,9 +1,7 @@
/*
* 12/22/2008
*
* CompletionListModel.java - A model that allows bulk addition of elements.
*
* This library is distributed under a modified BSD license. See the included
* This library is distributed under a modified BSD license. See the included
* AutoComplete.License.txt file for details.
*/
package org.fife.ui.autocomplete;
@@ -14,7 +12,6 @@ import java.util.List;
import javax.swing.AbstractListModel;
/**
* A list model implementation that allows the bulk addition of elements.
* This is the only feature missing from <code>DefaultListModel</code> that
@@ -24,36 +21,33 @@ import javax.swing.AbstractListModel;
* @version 1.0
*/
class CompletionListModel extends AbstractListModel {
/**
* Container for items in this model.
*/
private List<Completion> delegate;
/**
* Constructor.
*/
public CompletionListModel() {
delegate = new ArrayList<Completion>();
}
/**
* Removes all of the elements from this list. The list will
* Removes all of the elements from this list. The list will
* be empty after this call returns (unless it throws an exception).
*
* @see #setContents(Collection)
*/
public void clear() {
int end = delegate.size()-1;
int end = delegate.size() - 1;
delegate.clear();
if (end >= 0) {
fireIntervalRemoved(this, 0, end);
}
}
/**
* {@inheritDoc}
*/
@@ -61,8 +55,7 @@ class CompletionListModel extends AbstractListModel {
public Object getElementAt(int index) {
return delegate.get(index);
}
/**
* {@inheritDoc}
*/
@@ -70,21 +63,19 @@ class CompletionListModel extends AbstractListModel {
public int getSize() {
return delegate.size();
}
/**
* Sets the contents of this model. All previous contents are removed.
* Sets the contents of this model. All previous contents are removed.
*
* @param contents The new contents of this model.
* @param contents
* The new contents of this model.
*/
public void setContents(Collection<Completion> contents) {
clear();
int count = contents.size();
if (count>0) {
if (count > 0) {
delegate.addAll(contents);
fireIntervalAdded(this, 0, count-1); // endpoints included (!)
fireIntervalAdded(this, 0, count - 1); // endpoints included (!)
}
}
}
}