/** Sets the row 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 row layout constraints as a String representation. <code>null</code> is converted to <code>""</code> for storage. * @throws RuntimeException if the constraint was not valid. */ public void setRowConstraints(Object constr) { if (constr == null || constr instanceof String) { constr = ConstraintParser.prepare((String) constr); rowSpecs = ConstraintParser.parseRowConstraints((String) constr); } else if (constr instanceof AC) { rowSpecs = (AC) constr; } else { throw new IllegalArgumentException("Illegal constraint type: " + constr.getClass().toString()); } rowConstraints = constr; grid = null; }
/** Sets the row 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 row layout constraints as a String or {@link net.miginfocom.layout.AC} representation. <code>null</code> is converted to <code>""</code> for storage. * @throws RuntimeException if the constraint was not valid. */ public void setRowConstraints(Object constr) { if (constr == null || constr instanceof String) { constr = ConstraintParser.prepare((String) constr); rowSpecs = ConstraintParser.parseRowConstraints((String) constr); } else if (constr instanceof AC) { rowSpecs = (AC) constr; } else { throw new IllegalArgumentException("Illegal constraint type: " + constr.getClass().toString()); } rowConstraints = constr; dirty = true; }
/** rows called in FXML on MigPane itself */ public void setRows(String value) { this.fxmlRowConstraints = value; setRowConstraints( ConstraintParser.parseRowConstraints( ConstraintParser.prepare( value ) ) ); } public String getRows() { return fxmlRowConstraints; }
/** * use the string layout constraints */ public MigPane(String layoutConstraints, String colConstraints, String rowConstraints) { super(); setLayoutConstraints(ConstraintParser.parseLayoutConstraint(ConstraintParser.prepare(layoutConstraints))); setColumnConstraints(ConstraintParser.parseColumnConstraints(ConstraintParser.prepare(colConstraints))); setRowConstraints(ConstraintParser.parseRowConstraints(ConstraintParser.prepare(rowConstraints))); construct(); }