public void setColConstraints(String constraint) { colConstraints = constraint; setCC(ConstraintParser.parseColumnConstraints(ConstraintParser.prepare(constraint))); }
public void setRowConstraints(String constraint) { rowConstraints = constraint; setRc(ConstraintParser.parseColumnConstraints(ConstraintParser.prepare(constraint))); }
/** Sets the column 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 column 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 setColumnConstraints(Object constr) { if (constr == null || constr instanceof String) { constr = ConstraintParser.prepare((String) constr); colSpecs = ConstraintParser.parseColumnConstraints((String) constr); } else if (constr instanceof AC) { colSpecs = (AC) constr; } else { throw new IllegalArgumentException("Illegal constraint type: " + constr.getClass().toString()); } colConstraints = constr; grid = null; }
/** Sets the column 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 column 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 setColumnConstraints(Object constr) { if (constr == null || constr instanceof String) { constr = ConstraintParser.prepare((String) constr); colSpecs = ConstraintParser.parseColumnConstraints((String) constr); } else if (constr instanceof AC) { colSpecs = (AC) constr; } else { throw new IllegalArgumentException("Illegal constraint type: " + constr.getClass().toString()); } colConstraints = constr; dirty = true; }
/** cols called in FXML on MigPane itself */ public void setCols(String value) { this.fxmlColumConstraints = value; setColumnConstraints( ConstraintParser.parseColumnConstraints( ConstraintParser.prepare( value ) ) ); } public String getCols() { return fxmlColumConstraints; }
/** * use the string layout constraints */ public MigPane(String layoutConstraints, String colConstraints) { super(); setLayoutConstraints(ConstraintParser.parseLayoutConstraint(ConstraintParser.prepare(layoutConstraints))); setColumnConstraints(ConstraintParser.parseColumnConstraints(ConstraintParser.prepare(colConstraints))); construct(); }
/** * 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(); }