Skip to content

Commit

Permalink
small code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Sep 5, 2018
1 parent 6ed8e1b commit b8ea6b4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
Expand Up @@ -45,7 +45,6 @@
* @author honchar
* @author Viliam Repan (lazyman)
* <p>
* TODO Still needs more cleanup. Why button column has to understand activation, focus objects or handle modal windows? That should not be here definitely.
*/
public class InlineMenuButtonColumn<T extends Serializable> extends AbstractColumn<T, String> {

Expand Down
Expand Up @@ -78,7 +78,7 @@ public FocusListInlineMenuHelper(@NotNull Class<F> objectClass, @NotNull PageBas
this.focusListComponent = focusListComponent;
}

public List<InlineMenuItem> createRowActions(boolean isHeader) {
public List<InlineMenuItem> createRowActions() {
List<InlineMenuItem> menu = new ArrayList<>();
menu.add(new ButtonInlineMenuItem(parentPage.createStringResource("FocusListInlineMenuHelper.menu.enable")) {
private static final long serialVersionUID = 1L;
Expand Down
Expand Up @@ -104,7 +104,7 @@ private void initLayout() {

@Override
protected List<InlineMenuItem> createInlineMenu() {
return listInlineMenuHelper.createRowActions(false);
return listInlineMenuHelper.createRowActions();
}

@Override
Expand Down
Expand Up @@ -396,13 +396,13 @@ public Object getObject() {
columns.add(check);
columns.add(new PropertyColumn(createStringResource("pageTasks.node.statusMessage"), "statusMessage"));

IColumn<NodeDto, String> menuColumn = new InlineMenuButtonColumn<NodeDto>(createNodesInlineMenu(false), PageTasks.this);
IColumn<NodeDto, String> menuColumn = new InlineMenuButtonColumn<NodeDto>(createNodesInlineMenu(), PageTasks.this);
columns.add(menuColumn);

return columns;
}

private List<InlineMenuItem> createNodesInlineMenu(boolean isHeader) {
private List<InlineMenuItem> createNodesInlineMenu() {
List<InlineMenuItem> items = new ArrayList<>();
items.add(new ButtonInlineMenuItem(createStringResource("pageTasks.button.startScheduler")) {
private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -1971,7 +1971,7 @@ private void addInlineMenuToNodeRow(final NodeDto dto) {
return;
}

items.addAll(createNodesInlineMenu(false));
items.addAll(createNodesInlineMenu());
}

private IModel<String> getTaskConfirmationMessageModel(ColumnMenuAction action, String actionName){
Expand Down
Expand Up @@ -106,7 +106,7 @@ protected List<IColumn<SelectableBean<ServiceType>, String>> createColumns() {

@Override
protected List<InlineMenuItem> createInlineMenu() {
return listInlineMenuHelper.createRowActions(false);
return listInlineMenuHelper.createRowActions();
}

@Override
Expand Down
Expand Up @@ -178,7 +178,7 @@ protected List<IColumn<SelectableBean<UserType>, String>> createColumns() {

@Override
protected List<InlineMenuItem> createInlineMenu() {
return createRowActions(false);
return createRowActions();
}

@Override
Expand Down Expand Up @@ -255,7 +255,7 @@ public IModel<String> getDataModel(IModel<SelectableBean<UserType>> rowModel) {
return columns;
}

private List<InlineMenuItem> createRowActions(boolean isHeader) {
private List<InlineMenuItem> createRowActions() {
List<InlineMenuItem> menu = new ArrayList<>();
menu.add(new ButtonInlineMenuItem(createStringResource("pageUsers.menu.enable")) {
private static final long serialVersionUID = 1L;
Expand Down

0 comments on commit b8ea6b4

Please sign in to comment.