@Test public void testCreateComponentValueSetterComponentWrapper() { VisibleAspectDefinition aspectDefinition = new VisibleAspectDefinition( VisibleType.VISIBLE); Consumer<Boolean> setter = aspectDefinition.createComponentValueSetter(componentWrapper); assertThat(componentWrapper.getComponent().isVisible(), is(false)); setter.accept(true); assertThat(componentWrapper.getComponent().isVisible(), is(true)); }
@Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } VisibleAspectDefinition(VisibleType visibleType); }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } VisibleAspectDefinition(VisibleType visibleType); @Override Aspect<Boolean> createAspect(); @Override Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper); }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } VisibleAspectDefinition(VisibleType visibleType); @Override Aspect<Boolean> createAspect(); @Override Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper); static final String NAME; }