Skip to content

Commit

Permalink
Tree setHeight* methods to workaround vaadin/framework#9629
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonni Nakari committed Jul 14, 2017
1 parent d431318 commit ce60321
Showing 1 changed file with 24 additions and 8 deletions.
Expand Up @@ -5,13 +5,29 @@
import com.vaadin.ui.TreeGrid;

public class TreeWithContextMenu<T> extends Tree<T> {
private GridContextMenu<T> gridContextMenu;
private GridContextMenu<T> gridContextMenu;

public GridContextMenu<T> getContextMenu() {
if (gridContextMenu == null) {
TreeGrid<T> treegrid = (TreeGrid) getCompositionRoot();
gridContextMenu = new GridContextMenu<>(treegrid);
}
return gridContextMenu;
public GridContextMenu<T> getContextMenu() {
if (gridContextMenu == null) {
TreeGrid<T> treegrid = (TreeGrid) getCompositionRoot();
gridContextMenu = new GridContextMenu<>(treegrid);
}
}
return gridContextMenu;
}

// setHeight* methods to workaround vaadin/framework#9629
@Override
public void setHeight(float height, Unit unit) {
getCompositionRoot().setHeight(height, unit);
}

@Override
public void setHeight(String height) {
getCompositionRoot().setHeight(height);
}

@Override
public void setHeightUndefined() {
getCompositionRoot().setHeightUndefined();
}
}

0 comments on commit ce60321

Please sign in to comment.