av.setIdWidth(-1); // force recalculation
d = af.alignPanel.calculateIdWidth();
- assertEquals(d.width, Platform.isWin() ? 172 : 166); // 4 + pixel width of "Q93Z60_ARATH/1-118"
+ assertEquals(d.width, Platform.forArch(166).forWin(172).value().intValue()); // 4 + pixel width of "Q93Z60_ARATH/1-118"
assertEquals(d.height, 12);
assertEquals(d.width, av.getIdWidth());
}
* note 4 pixels 'padding' are added to the longest seq name/annotation label
*/
Dimension d = af.alignPanel.calculateIdWidth(2000);
- assertEquals(d.width, Platform.isWin() ? 172 : 166); // 4 + pixel width of "Q93Z60_ARATH/1-118"
+ assertEquals(d.width, Platform.forArch(166).forWin(172).value().intValue()); // 4 + pixel width of "Q93Z60_ARATH/1-118"
assertEquals(d.height, 12); // fixed value (not used?)
assertEquals(av.getIdWidth(), 18); // not changed by this method
String orig = seq.getName();
seq.setName(orig + "MMMMM");
d = af.alignPanel.calculateIdWidth(2000);
- assertEquals(d.width, Platform.isWin() ? 219 : 211); // 4 + pixel width of "Q93Z60_ARATHMMMMM/1-118"
+ assertEquals(d.width, Platform.forArch(211).forWin(219).value().intValue()); // 4 + pixel width of "Q93Z60_ARATHMMMMM/1-118"
assertEquals(d.height, 12);
assertEquals(av.getIdWidth(), 18); // unchanged
// for next test:
*/
int w = af.alignPanel.getVisibleIdWidth(true);
assertEquals(w, af.alignPanel.getIdPanel().getWidth());
- assertEquals(w, Platform.isWin() ? 112 : 115);
+ assertEquals(w, Platform.forArch(115).forWin(112).forMac(115)
+ .forLinux(114).value().intValue());
/*
* width for offscreen rendering is the same
* preference for auto id width overrides fixed width
*/
Cache.setProperty("FIGURE_AUTOIDWIDTH", Boolean.TRUE.toString());
- assertEquals(Platform.isWin() ? 106 : 115, af.alignPanel.getVisibleIdWidth(false));
+ assertEquals(af.alignPanel.getVisibleIdWidth(false),
+ Platform.forArch(115).forWin(106).forMac(115).forLinux(114)
+ .value().intValue());
}
}