public void addMenus(Menus menus, MenuBuilder menuBuilder) { for (MenuItem menuItem : menus.getItems()) { final Widget result = menuBuilder.makeItem(menuItem, true); if (result != null) { final ButtonGroup bg = new ButtonGroup(); bg.addStyleName(CSS.CSS().dockExpandedContentButton()); bg.add(result); titlePanel.add(bg); } } }
private void setupComponents() { if (position == UberfireDockPosition.SOUTH) { titlePanel.add(collapse); titlePanel.add(title); } else if (position == UberfireDockPosition.WEST) { titlePanel.add(title); titlePanel.add(collapse); } else if (position == UberfireDockPosition.EAST) { titlePanel.add(collapse); titlePanel.add(title); } }
private void setupCSS() { if (position == UberfireDockPosition.SOUTH) { titlePanel.addStyleName(CSS.CSS().dockExpandedContentPanelSouth()); title.addStyleName(CSS.CSS().dockExpandedLabelSouth()); collapse.setIcon(IconType.CHEVRON_DOWN); collapse.addStyleName(CSS.CSS().dockExpandedButtonSouth()); } else if (position == UberfireDockPosition.WEST) { title.addStyleName(CSS.CSS().dockExpandedLabelWest()); collapse.setIcon(IconType.CHEVRON_LEFT); collapse.addStyleName(CSS.CSS().dockExpandedButtonWest()); } else if (position == UberfireDockPosition.EAST) { title.addStyleName(CSS.CSS().dockExpandedLabelEast()); collapse.setIcon(IconType.CHEVRON_RIGHT); collapse.addStyleName(CSS.CSS().dockExpandedButtonEast()); } setupDockContentSize(); }
public void clear() { targetPanel.clear(); titlePanel.clear(); }
public void setPanelSize(int width, int height) { targetPanel.setPixelSize(width, height); }