void initTable() { getTable().enableColumnResizing(); QuotaDcStatusColumn dcStatusColumn = new QuotaDcStatusColumn(); dcStatusColumn.setContextMenuTitle(constants.dcStatusQuota()); getTable().addColumn(dcStatusColumn, constants.empty(), "30px"); // $NON-NLS-1$ AbstractTextColumn<Quota> nameColumn = new AbstractTextColumn<Quota>() { @Override public String getValue(Quota object) { return object.getQuotaName() == null ? "" : object.getQuotaName(); // $NON-NLS-1$ } }; nameColumn.makeSortable(); getTable().addColumn(nameColumn, constants.nameQuota(), "400px"); // $NON-NLS-1$ AbstractTextColumn<Quota> descriptionColumn = new AbstractTextColumn<Quota>() { @Override public String getValue(Quota object) { return object.getDescription() == null ? "" : object.getDescription(); // $NON-NLS-1$ } }; descriptionColumn.makeSortable(); getTable().addColumn(descriptionColumn, constants.descriptionQuota(), "400px"); // $NON-NLS-1$ getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.addQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getCreateCommand(); } }); getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.editQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getEditCommand(); } }); getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.copyQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getCloneCommand(); } }); getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.removeQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getRemoveCommand(); } }); }
void initTable(ApplicationConstants constants) { getTable().enableColumnResizing(); getTable().addColumn(new QuotaDcStatusColumn(), constants.empty(), "30px"); // $NON-NLS-1$ getTable() .addColumn( new TextColumnWithTooltip<Quota>() { @Override public String getValue(Quota object) { return object.getQuotaName() == null ? "" : object.getQuotaName(); // $NON-NLS-1$ } }, constants.nameQuota(), "400px"); //$NON-NLS-1$ getTable() .addColumn( new TextColumnWithTooltip<Quota>() { @Override public String getValue(Quota object) { return object.getDescription() == null ? "" : object.getDescription(); // $NON-NLS-1$ } }, constants.descriptionQuota(), "400px"); //$NON-NLS-1$ getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.addQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getCreateCommand(); } }); getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.editQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getEditCommand(); } }); getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.copyQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getCloneCommand(); } }); getTable() .addActionButton( new WebAdminButtonDefinition<Quota>(constants.removeQuota()) { @Override protected UICommand resolveCommand() { return getDetailModel().getRemoveCommand(); } }); }