/** This is where the actual layout happens */ protected void layoutChildren() { // System.out.println("layoutChildren"); super.layoutChildren(); // validate if the grid should be recreated validateMigLayoutGrid(); // here the actual layout happens // this will use FX2ComponentWrapper.setBounds to actually place the components int[] lBounds = new int[] {0, 0, (int) Math.ceil(getWidth()), (int) Math.ceil(getHeight())}; this.grid.layout(lBounds, lc.getAlignX(), lc.getAlignY(), iDebug, true); // paint debug if (iDebug) { clearDebug(); this.grid.paintDebug(); } }
@Test public void testTotal() { int total = 0; int result = 0; DocApplication test = new DocApplication(); test.doc = new UTF8Document(); test.NewDocument("WomenData.csv"); try { total = test.doc.Read(); result = testNum.TestSize(); } catch (Exception e) { e.printStackTrace(); } assertEquals(total, result); }
/** * Sets the layout constraints for the layout manager instance as a String. * * <p>See the class JavaDocs for information on how this string is formatted. * * @param constr The layout constraints as a String pr {@link net.miginfocom.layout.LC} * representation. <code>null</code> is converted to <code>""</code> for storage. * @throws RuntimeException if the constraint was not valid. */ public void setLayoutConstraints(Object constr) { if (constr == null || constr instanceof String) { constr = ConstraintParser.prepare((String) constr); lc = ConstraintParser.parseLayoutConstraint((String) constr); } else if (constr instanceof LC) { lc = (LC) constr; } else { throw new IllegalArgumentException( "Illegal constraint type: " + constr.getClass().toString()); } layoutConstraints = constr; // if debug is set, do it if (lc != null && lc.getDebugMillis() > 0) { iDebug = true; } }