use of org.eclipse.che.ide.ui.toolbar.PopupMenu in project che by eclipse.
the class DropDownWidgetImpl method show.
/**
* Shows a content menu and moves it to specified position.
*
* @param left
* horizontal position
* @param top
* vertical position
* @param width
* header width
*/
private void show(int left, int top, int width) {
hide();
updateActions();
lockLayer = new MenuLockLayer();
popupMenu = new PopupMenu(actions, actionManager, managerProvider, presentationFactory, lockLayer, this, keyBindingAgent, actionGroupId, true);
popupMenu.addStyleName(resources.dropdownListCss().dropDownListMenu());
popupMenu.getElement().getStyle().setTop(top, PX);
popupMenu.getElement().getStyle().setLeft(left, PX);
popupMenu.getElement().getStyle().setWidth(width, PX);
lockLayer.add(popupMenu);
}
use of org.eclipse.che.ide.ui.toolbar.PopupMenu in project che by eclipse.
the class ContextMenu method show.
/**
* Shows a content menu and moves it to specified position.
*
* @param x
* x coordinate
* @param y
* y coordinate
*/
public void show(final int x, final int y) {
hide();
ActionGroup actions = updateActions();
lockLayer = new MenuLockLayer(this);
popupMenu = new PopupMenu(actions, actionManager, managerProvider, presentationFactory, lockLayer, this, keyBindingAgent, "contextMenu");
popupMenu.getElement().getStyle().setProperty("opacity", "0");
popupMenu.getElement().getStyle().setProperty("transition", "opacity 0.5s ease");
lockLayer.add(popupMenu);
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
popupMenu.getElement().getStyle().setProperty("opacity", "1");
updateMenuPosition(popupMenu, x, y);
}
});
}
use of org.eclipse.che.ide.ui.toolbar.PopupMenu in project che by eclipse.
the class MenuBarItem method openPopupMenu.
/**
* Open sub Popup Menu
*
* @param menuLockLayer
* - lock layer which will receive PopupMenu visual component and
*/
public void openPopupMenu(MenuLockLayer menuLockLayer) {
int x = element.getAbsoluteLeft();
int y = 0;
popupMenu = new PopupMenu(group, actionManager, managerProvider, presentationFactory, menuLockLayer, this, keyBindingAgent, "topmenu/" + title);
menuLockLayer.add(popupMenu, x, y);
}
Aggregations