@Test public void testSetTypeButtonCSSClassWhenIsReadOnlyDiagram() { when(readOnlyProvider.isReadOnlyDiagram()).thenReturn(true); picker.setTypeButtonCSSClass(); verify(typeButtonClassList).add(READ_ONLY_CSS_CLASS); verify(typeButtonClassList, never()).remove(READ_ONLY_CSS_CLASS); }
void setTypeButtonCSSClass() { if (readOnlyProvider.isReadOnlyDiagram()) { typeButton.getClassList().add(READ_ONLY_CSS_CLASS); } else { typeButton.getClassList().remove(READ_ONLY_CSS_CLASS); } }
DataTypePickerWidget extends Composite implements HasValue<QName>,
                                                               HasEnabled { void setTypeButtonCSSClass() { if (readOnlyProvider.isReadOnlyDiagram()) { typeButton.getClassList().add(READ_ONLY_CSS_CLASS); } else { typeButton.getClassList().remove(READ_ONLY_CSS_CLASS); } } }
DataTypePickerWidget extends Composite implements HasValue<QName>,
                                                               HasEnabled { void setTypeButtonCSSClass() { if (readOnlyProvider.isReadOnlyDiagram()) { typeButton.getClassList().add(READ_ONLY_CSS_CLASS); } else { typeButton.getClassList().remove(READ_ONLY_CSS_CLASS); } } DataTypePickerWidget(); @Inject  DataTypePickerWidget(final Anchor typeButton,
                                final Div manageContainer,
                                final Span manageLabel,
                                final TranslationService translationService,
                                final QNameConverter qNameConverter,
                                final DMNGraphUtils dmnGraphUtils,
                                final Event<DataTypePageTabActiveEvent> dataTypePageActiveEvent,
                                final ItemDefinitionUtils itemDefinitionUtils,
                                final @DMNEditor ReadOnlyProvider readOnlyProvider); }
DataTypePickerWidget extends Composite implements HasValue<QName>,
                                                               HasEnabled { void setTypeButtonCSSClass() { if (readOnlyProvider.isReadOnlyDiagram()) { typeButton.getClassList().add(READ_ONLY_CSS_CLASS); } else { typeButton.getClassList().remove(READ_ONLY_CSS_CLASS); } } DataTypePickerWidget(); @Inject  DataTypePickerWidget(final Anchor typeButton,
                                final Div manageContainer,
                                final Span manageLabel,
                                final TranslationService translationService,
                                final QNameConverter qNameConverter,
                                final DMNGraphUtils dmnGraphUtils,
                                final Event<DataTypePageTabActiveEvent> dataTypePageActiveEvent,
                                final ItemDefinitionUtils itemDefinitionUtils,
                                final @DMNEditor ReadOnlyProvider readOnlyProvider); @PostConstruct void init(); void setDMNModel(final DMNModelInstrumentedBase dmnModel); @SuppressWarnings("unused") void onDataTypePageNavTabActiveEvent(final @Observes DataTypeChangedEvent event); @EventHandler("typeButton") @SuppressWarnings("unused") void onClickTypeButton(final ClickEvent clickEvent); void showManageLabel(); void hideManageLabel(); @Override QName getValue(); @Override void setValue(final QName value); @Override void setValue(final QName value,
                         final boolean fireEvents); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<QName> handler); @Override boolean isEnabled(); @Override void setEnabled(final boolean enabled); }
DataTypePickerWidget extends Composite implements HasValue<QName>,
                                                               HasEnabled { void setTypeButtonCSSClass() { if (readOnlyProvider.isReadOnlyDiagram()) { typeButton.getClassList().add(READ_ONLY_CSS_CLASS); } else { typeButton.getClassList().remove(READ_ONLY_CSS_CLASS); } } DataTypePickerWidget(); @Inject  DataTypePickerWidget(final Anchor typeButton,
                                final Div manageContainer,
                                final Span manageLabel,
                                final TranslationService translationService,
                                final QNameConverter qNameConverter,
                                final DMNGraphUtils dmnGraphUtils,
                                final Event<DataTypePageTabActiveEvent> dataTypePageActiveEvent,
                                final ItemDefinitionUtils itemDefinitionUtils,
                                final @DMNEditor ReadOnlyProvider readOnlyProvider); @PostConstruct void init(); void setDMNModel(final DMNModelInstrumentedBase dmnModel); @SuppressWarnings("unused") void onDataTypePageNavTabActiveEvent(final @Observes DataTypeChangedEvent event); @EventHandler("typeButton") @SuppressWarnings("unused") void onClickTypeButton(final ClickEvent clickEvent); void showManageLabel(); void hideManageLabel(); @Override QName getValue(); @Override void setValue(final QName value); @Override void setValue(final QName value,
                         final boolean fireEvents); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<QName> handler); @Override boolean isEnabled(); @Override void setEnabled(final boolean enabled);  }