public void setLayoutConstraints(String constraint) { layoutConstraints = constraint; setLc(ConstraintParser.parseLayoutConstraint(ConstraintParser.prepare(constraint))); }
/** 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 or {@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; dirty = true; }
/** 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 s The 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 setLayoutConstraints(Object s) { if (s == null || s instanceof String) { s = ConstraintParser.prepare((String) s); lc = ConstraintParser.parseLayoutConstraint((String) s); } else if (s instanceof LC) { lc = (LC) s; } else { throw new IllegalArgumentException("Illegal constraint type: " + s.getClass().toString()); } layoutConstraints = s; grid = null; }
/** layout called in FXML on MigPane itself */ public void setLayout(String value) { this.fxmLayoutConstraints = value; setLayoutConstraints( ConstraintParser.parseLayoutConstraint( ConstraintParser.prepare( value ) ) ); } public String getLayout() { return fxmLayoutConstraints; }
/** * use the string layout constraints */ public MigPane(String layoutConstraints) { super(); setLayoutConstraints(ConstraintParser.parseLayoutConstraint(ConstraintParser.prepare(layoutConstraints))); construct(); }
/** * 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(); }