mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 19:59:49 +00:00
start 1.10.2
This commit is contained in:
1 parent
f969f63b66
commit
6a7c4bf67d
826 files changed
+60550
-63758
No files matched your search
@@ -1,49 +1,45 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.craftgui.mod.database;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import binnie.craftgui.controls.ControlTextCentered;
|
||||
import java.util.LinkedHashMap;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.controls.ControlText;
|
||||
import binnie.craftgui.controls.ControlTextCentered;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IClassification;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class PageSpeciesClassification extends PageSpecies
|
||||
{
|
||||
private Map<IClassification.EnumClassLevel, ControlText> levels;
|
||||
private ControlText genus;
|
||||
public class PageSpeciesClassification extends PageSpecies {
|
||||
private Map<IClassification.EnumClassLevel, ControlText> levels;
|
||||
private ControlText genus;
|
||||
|
||||
public PageSpeciesClassification(final IWidget parent, final DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
this.levels = new LinkedHashMap<IClassification.EnumClassLevel, ControlText>();
|
||||
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<IClassification.EnumClassLevel, ControlText>();
|
||||
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