@Test public void styleTest() { StringField s = Field.ofStringType("test").styleClass("test"); SimpleTextControl t = new SimpleTextControl(); t.setField(s); Assert.assertEquals(3, t.getStyleClass().size()); s.styleClass("hello", "world"); Assert.assertEquals(4, t.getStyleClass().size()); s.styleClass("hi", "world"); Assert.assertEquals(4, t.getStyleClass().size()); Assert.assertEquals("world", t.getStyleClass().get(3)); }
public void setField(F field) { if (this.field != null) { throw new IllegalStateException("Cannot change a control's field once set."); } this.field = field; init(); }
SimpleControl extends GridPane implements ViewMixin { public void setField(F field) { if (this.field != null) { throw new IllegalStateException("Cannot change a control's field once set."); } this.field = field; init(); } }
SimpleControl extends GridPane implements ViewMixin { public void setField(F field) { if (this.field != null) { throw new IllegalStateException("Cannot change a control's field once set."); } this.field = field; init(); }  }
SimpleControl extends GridPane implements ViewMixin { public void setField(F field) { if (this.field != null) { throw new IllegalStateException("Cannot change a control's field once set."); } this.field = field; init(); }  void setField(F field); @Override void initializeParts(); @Override void layoutParts(); void setupBindings(); @Override void setupValueChangedListeners(); void addStyleClass(String name); void removeStyleClass(String name); }
SimpleControl extends GridPane implements ViewMixin { public void setField(F field) { if (this.field != null) { throw new IllegalStateException("Cannot change a control's field once set."); } this.field = field; init(); }  void setField(F field); @Override void initializeParts(); @Override void layoutParts(); void setupBindings(); @Override void setupValueChangedListeners(); void addStyleClass(String name); void removeStyleClass(String name);  }