Auto-format spaces to tabs (#2)

This commit is contained in:
mezz committed 2016-10-27 02:49:49 -07:00
1 parent 25be7fd254
commit 5bb4b5d9a5
756 files changed
+49198 -48489

No files matched your search

@@ -18,66 +18,66 @@ import java.util.List;
import java.util.Map;
public class ControlGeneScroll extends Control implements IControlValue<BreedingSystem> {
private String filter;
private BreedingSystem system;
private String filter;
private BreedingSystem system;
protected ControlGeneScroll(final IWidget parent, final float x, final float y, final float w, final float h) {
super(parent, x, y, w, h);
this.filter = "";
this.system = null;
}
protected ControlGeneScroll(final IWidget parent, final float x, final float y, final float w, final float h) {
super(parent, x, y, w, h);
this.filter = "";
this.system = null;
}
public void setFilter(final String filter) {
this.filter = filter.toLowerCase();
this.refresh();
}
public void setFilter(final String filter) {
this.filter = filter.toLowerCase();
this.refresh();
}
public void setGenes(final BreedingSystem system) {
this.system = system;
this.refresh();
}
public void setGenes(final BreedingSystem system) {
this.system = system;
this.refresh();
}
public void refresh() {
this.deleteAllChildren();
final GeneTracker tracker = GeneTracker.getTracker(Window.get(this).getWorld(), Window.get(this).getUsername());
final Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(this.system.getSpeciesRoot());
int x = 0;
int y = 0;
final boolean isNEI = ((WindowGeneBank) Window.get(this)).isNei;
for (final Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
final List<IAllele> discovered = new ArrayList<>();
for (final IAllele allele : entry.getValue()) {
final Gene gene = new Gene(allele, entry.getKey(), this.system.getSpeciesRoot());
if ((isNEI || tracker.isSequenced(new Gene(allele, entry.getKey(), this.system.getSpeciesRoot()))) && gene.getName().toLowerCase().contains(this.filter)) {
discovered.add(allele);
}
}
if (discovered.size() == 0) {
continue;
}
x = 0;
new ControlText(this, new IPoint(x, y), this.system.getChromosomeName(entry.getKey()));
y += 12;
for (final IAllele allele : discovered) {
if (x + 18 > this.getSize().x()) {
y += 20;
x = 0;
}
new ControlGene(this, x, y).setValue(new Gene(allele, entry.getKey(), this.system.getSpeciesRoot()));
x += 18;
}
y += 24;
}
this.setSize(new IPoint(this.getSize().x(), y));
}
public void refresh() {
this.deleteAllChildren();
final GeneTracker tracker = GeneTracker.getTracker(Window.get(this).getWorld(), Window.get(this).getUsername());
final Map<IChromosomeType, List<IAllele>> genes = Binnie.Genetics.getChromosomeMap(this.system.getSpeciesRoot());
int x = 0;
int y = 0;
final boolean isNEI = ((WindowGeneBank) Window.get(this)).isNei;
for (final Map.Entry<IChromosomeType, List<IAllele>> entry : genes.entrySet()) {
final List<IAllele> discovered = new ArrayList<>();
for (final IAllele allele : entry.getValue()) {
final Gene gene = new Gene(allele, entry.getKey(), this.system.getSpeciesRoot());
if ((isNEI || tracker.isSequenced(new Gene(allele, entry.getKey(), this.system.getSpeciesRoot()))) && gene.getName().toLowerCase().contains(this.filter)) {
discovered.add(allele);
}
}
if (discovered.size() == 0) {
continue;
}
x = 0;
new ControlText(this, new IPoint(x, y), this.system.getChromosomeName(entry.getKey()));
y += 12;
for (final IAllele allele : discovered) {
if (x + 18 > this.getSize().x()) {
y += 20;
x = 0;
}
new ControlGene(this, x, y).setValue(new Gene(allele, entry.getKey(), this.system.getSpeciesRoot()));
x += 18;
}
y += 24;
}
this.setSize(new IPoint(this.getSize().x(), y));
}
@Override
public void setValue(final BreedingSystem system) {
this.setGenes(system);
}
@Override
public void setValue(final BreedingSystem system) {
this.setGenes(system);
}
@Override
public BreedingSystem getValue() {
return this.system;
}
@Override
public BreedingSystem getValue() {
return this.system;
}
}