@Override public Composant getValue() { Composant composant = composantPropertiesWidget.getValue(); if (composant != null) { composant.setViews(viewListWidget.getValue()); } return composant; }
@Override public void setValue(Composant value) { if (composantPropertiesWidget != null && viewListWidget != null && value != null) { composantPropertiesWidget.setValue(value); viewListWidget.setValue(value.getViews()); isModified = false; } }
@Override public void init() { mainPanel = new FlowPanel(); composantPropertiesWidget = new ComposantPropertiesWidget(); composantPropertiesWidget.addValueChangeHandler( new ValueChangeHandler<Composant>() { @Override public void onValueChange(ValueChangeEvent<Composant> event) { isModified = true; } }); mainPanel.add(composantPropertiesWidget); GroupBoxPanel blocBox = new GroupBoxPanel(); blocBox.setHtml("<b>Liste des blocs qui r\u00e9f\u00e9rencent ce composant</b>"); mainPanel.add(blocBox); FlowPanel blocsPanel = new FlowPanel(); blocsPanel.addStyleName("BlocUsedComposnant-Panel"); blocBox.add(blocsPanel); composantsBlocsListWidget = new ComposantsBlocsListWidget(); blocsPanel.add(composantsBlocsListWidget); GroupBoxPanel regionsBox = new GroupBoxPanel(); regionsBox.setHtml("<b>Liste des vues</b>"); mainPanel.add(regionsBox); viewListWidget = new ViewListWidget(); viewListWidget.addValueChangeHandler( new ValueChangeHandler<List<View>>() { @Override public void onValueChange(ValueChangeEvent<List<View>> event) { isModified = true; } }); regionsBox.add(viewListWidget); FlowPanel actionsPanel = new FlowPanel(); mainPanel.add(actionsPanel); save = new AnchorButton("Sauvegarder"); actionsPanel.add(save); save.addStyleName("button_ok"); save.setTitle("Sauvegarder les modifications"); }
@Override public void addDeleteClickHandler(ClickHandler deleteClickHandler) { if (viewListWidget != null) { viewListWidget.addDeletedClickHandler(deleteClickHandler); } }
@Override public void setPageBlocViewList(List<ViewBean> value) { if (viewListWidget != null) viewListWidget.setPageBlocViewList(value); }
@Override public void deleteSelectedView() { if (viewListWidget != null) viewListWidget.deleteSelectedView(); }
@Override public View getSeletedView() { return viewListWidget.getSelectedView(); }
@Override public void addUpdateClickHandler(ClickHandler updateClickHandler) { if (viewListWidget != null) { viewListWidget.addUpdateClickHandler(updateClickHandler); } }
@Override public void addSelectionClickHandler(ClickHandler clickHandler) { if (viewListWidget != null) { viewListWidget.addSelectionClickHandler(clickHandler); } }