mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-25 22:44:38 +00:00
Auto-format spaces to tabs (#2)
This commit is contained in:
1 parent
25be7fd254
commit
5bb4b5d9a5
756 files changed
+49198
-48489
No files matched your search
@@ -10,36 +10,36 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class PageSpeciesClassification extends PageSpecies {
|
||||
private Map<IClassification.EnumClassLevel, ControlText> levels;
|
||||
private ControlText genus;
|
||||
private Map<IClassification.EnumClassLevel, ControlText> levels;
|
||||
private ControlText genus;
|
||||
|
||||
public PageSpeciesClassification(final IWidget parent, final DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
this.levels = new LinkedHashMap<>();
|
||||
int y = 16;
|
||||
for (final IClassification.EnumClassLevel level : IClassification.EnumClassLevel.values()) {
|
||||
final ControlText text = new ControlTextCentered(this, y, "");
|
||||
text.setColour(level.getColour());
|
||||
this.levels.put(level, text);
|
||||
y += 12;
|
||||
}
|
||||
(this.genus = new ControlTextCentered(this, y, "")).setColour(16759415);
|
||||
}
|
||||
public PageSpeciesClassification(final IWidget parent, final DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
this.levels = new LinkedHashMap<>();
|
||||
int y = 16;
|
||||
for (final IClassification.EnumClassLevel level : IClassification.EnumClassLevel.values()) {
|
||||
final ControlText text = new ControlTextCentered(this, y, "");
|
||||
text.setColour(level.getColour());
|
||||
this.levels.put(level, text);
|
||||
y += 12;
|
||||
}
|
||||
(this.genus = new ControlTextCentered(this, y, "")).setColour(16759415);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onValueChanged(final IAlleleSpecies species) {
|
||||
if (species != null) {
|
||||
for (final ControlText text : this.levels.values()) {
|
||||
text.setValue("- - -");
|
||||
}
|
||||
this.genus.setValue(species.getBinomial());
|
||||
for (IClassification classification = species.getBranch(); classification != null; classification = classification.getParent()) {
|
||||
final IClassification.EnumClassLevel level = classification.getLevel();
|
||||
String text2 = "";
|
||||
final int n = level.ordinal();
|
||||
text2 += classification.getScientific();
|
||||
this.levels.get(level).setValue(text2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onValueChanged(final IAlleleSpecies species) {
|
||||
if (species != null) {
|
||||
for (final ControlText text : this.levels.values()) {
|
||||
text.setValue("- - -");
|
||||
}
|
||||
this.genus.setValue(species.getBinomial());
|
||||
for (IClassification classification = species.getBranch(); classification != null; classification = classification.getParent()) {
|
||||
final IClassification.EnumClassLevel level = classification.getLevel();
|
||||
String text2 = "";
|
||||
final int n = level.ordinal();
|
||||
text2 += classification.getScientific();
|
||||
this.levels.get(level).setValue(text2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user