use of org.guvnor.m2repo.client.widgets.ArtifactListView in project kie-wb-common by kiegroup.
the class ArtifactSelectorView method init.
@Override
public void init(final ArtifactSelectorPresenter presenter) {
this.presenter = presenter;
final ArtifactListView artifactListView = presenter.getArtifactListView();
artifactListView.addColumn(buildSelectColumn(), getSelectColumnLabel());
artifactListView.setContentHeight("200px");
final Style style = artifactListView.asWidget().getElement().getStyle();
style.setMarginLeft(0, Style.Unit.PX);
style.setMarginRight(0, Style.Unit.PX);
artifactListContainer.add(artifactListView);
}
use of org.guvnor.m2repo.client.widgets.ArtifactListView in project kie-wb-common by kiegroup.
the class ArtifactListWidgetView method init.
@Override
public void init(final ArtifactListWidgetPresenter presenter) {
this.presenter = presenter;
search.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.search(filter.getText());
}
});
final ArtifactListView artifactListView = presenter.getArtifactListView();
artifactListView.addColumn(buildSelectColumn(), getSelectColumnLabel());
artifactListView.setContentHeight("200px");
final Style style = artifactListView.asWidget().getElement().getStyle();
style.setMarginLeft(0, Style.Unit.PX);
style.setMarginRight(0, Style.Unit.PX);
panel.add(artifactListView);
}
use of org.guvnor.m2repo.client.widgets.ArtifactListView in project kie-wb-common by kiegroup.
the class DependencyListWidget method init.
@PostConstruct
public void init() {
dependencyPagedJarTable = IOC.getBeanManager().lookupBean(ArtifactListPresenter.class).getInstance();
dependencyPagedJarTable.setup(ColumnType.NAME, ColumnType.GAV, ColumnType.LAST_MODIFIED);
// Column to view KJAR's pom
final Column<JarListPageRow, String> openColumn = new Column<JarListPageRow, String>(new ButtonCell(ButtonSize.EXTRA_SMALL)) {
@Override
public String getValue(JarListPageRow row) {
return M2RepoEditorConstants.INSTANCE.Open();
}
};
openColumn.setFieldUpdater(new FieldUpdater<JarListPageRow, String>() {
@Override
public void update(int index, JarListPageRow row, String value) {
dependencyPagedJarTable.onOpenPom(row.getPath());
}
});
// Column to allow selection of dependency
final Column<JarListPageRow, String> selectColumn = new Column<JarListPageRow, String>(new ButtonCell(ButtonSize.EXTRA_SMALL)) {
@Override
public String getValue(JarListPageRow row) {
return ProjectEditorResources.CONSTANTS.Select();
}
};
selectColumn.setFieldUpdater(new FieldUpdater<JarListPageRow, String>() {
@Override
public void update(final int index, final JarListPageRow row, final String value) {
onPathSelect.execute(row.getPath());
}
});
final ArtifactListView artifactListView = dependencyPagedJarTable.getView();
artifactListView.addColumn(openColumn, M2RepoEditorConstants.INSTANCE.Open(), false, 100.0, Style.Unit.PX);
artifactListView.addColumn(selectColumn, ProjectEditorResources.CONSTANTS.Select(), 100.0, Style.Unit.PX);
artifactListView.setContentHeight("200px");
artifactListView.asWidget().getElement().getStyle().setMarginLeft(0, Style.Unit.PX);
artifactListView.asWidget().getElement().getStyle().setMarginRight(0, Style.Unit.PX);
panel.add(artifactListView);
}
Aggregations