List of usage examples for com.google.gwt.event.shared HandlerManager HandlerManager
public HandlerManager(Object source)
From source file:org.rstudio.studio.client.workbench.views.workspace.table.InlineEditor.java
License:Open Source License
public InlineEditor(WorkspaceObjectInfo object, WorkspaceServerOperations server, EventBus events, Display<T> view, GlobalDisplay globalDisplay) { object_ = object;/*w ww . jav a 2s . c om*/ globalDisplay_ = globalDisplay; handlerManager_ = new HandlerManager(this); view_ = view; server_ = server; events_ = events; view.addValueChangeRequestHandler(this); }
From source file:org.sigmah.client.ui.view.pivot.HistorySelector.java
License:Open Source License
public HistorySelector() { prevButton = new Button(null, IconImageBundle.ICONS.back(), new SelectionListener<ButtonEvent>() { @Override/*from ww w . j ava 2 s . c om*/ public void componentSelected(ButtonEvent ce) { prev(); } }); nextButton = new Button(null, IconImageBundle.ICONS.forward(), new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { next(); } }); prevButton.disable(); nextButton.disable(); handlerManager = new HandlerManager(this); }
From source file:org.sigmah.shared.dto.element.FlexibleElementDTO.java
License:Open Source License
/** * Method called just before the {@link FlexibleElementDTO#getElementComponent(ValueResult)} method to ensure the * instantiation of the attributes used by the client-side. * This method can be override by subclasses. *//*from w w w . j av a 2 s .c o m*/ public void init() { // Checks preconditions. assert dispatch != null; assert authenticationProvider != null; assert currentContainerDTO != null; handlerManager = new HandlerManager(this); }
From source file:org.ssgwt.client.ui.datagrid.column.ActionColumn.SSActionCell.java
License:Apache License
/** * The SSActionCell constructor//from w w w . jav a 2 s . c o m * * @author Michael Barnard <michael.barnard@a24group.com> * @since 18 July 2013 * * @param spacerSize - The size to be used between the action items */ public SSActionCell(int spacerSize) { super(MOUSE_UP); this.handlerManager = new HandlerManager(this); if (template == null) { template = GWT.create(Template.class); } this.spacerSize = spacerSize; }
From source file:org.ssgwt.client.ui.datagrid.column.ImageHoverColumn.SSHoverImageCell.java
License:Apache License
/** * The SSBooleanImageCell constructor/*from www. j a v a2s .c o m*/ * * @author Alec Erasmus <alec.erasmus@a24group.com> * @since 31 May 2013 * * @param imageUrl - The url of the image to display in the cell * @param popup - The popup displayed on hover * @param column - The column this */ public SSHoverImageCell(AbstractImageColumnPopup<T> popup) { super(MOUSE_OVER, MOUSE_OUT); if (template == null) { template = GWT.create(Template.class); } this.popup = popup; this.handlerManager = new HandlerManager(this); }
From source file:org.ssgwt.client.ui.datagrid.FilterSortCell.java
License:Apache License
/** * Class constructor that allows the user to use a custom resource * // w w w .ja v a 2s .com * @param resources - The resources object that should be used */ public FilterSortCell(Resources resources) { super("mousedown", "mouseover", "mouseout", "mouseup"); this.resources = resources; if (template == null) { template = GWT.create(Template.class); } handlerManager = new HandlerManager(this); }
From source file:org.ssgwt.client.ui.datagrid.HelpCell.java
License:Apache License
/** * Class constructor that allows the user to use a custom resource * /*from w w w. j ava 2 s . c o m*/ * @author Ruan Naude<ruan.naude@a24group.com> * @since 4 July 2012 * * @param resources - The resources object that should be used */ public HelpCell(Resources resources) { super("mousedown", "mouseover", "mouseout", "mouseup"); this.resources = resources; if (template == null) { template = GWT.create(Template.class); } handlerManager = new HandlerManager(this); }
From source file:org.ssgwt.client.ui.datagrid.SelectAllCell.java
License:Apache License
/** * Class constructor that allows the user to use a custom resource * //from w w w.j a v a 2 s .c om * @param resources - The resources object that should be used */ public SelectAllCell(Resources resources) { super("mousedown", "mouseover", "mouseout", "mouseup"); this.resources = resources; if (template == null) { template = GWT.create(Template.class); } handlerManager = new HandlerManager(this); }
From source file:org.ssgwt.client.ui.menu.LeftMenuItem.java
License:Apache License
/** * Class constructor for menu item and resource * /* w ww . j av a 2 s. c o m*/ * @param menuItem The menu item to create the left menu item details from * @param resources The recource to be used for the LeftMenuItem * * @author Ruan Naude <ruan.naude@a24group.com> * @since 09 July 2012 */ public LeftMenuItem(MenuItemInterface menuItem, LeftMenuItemResources resources) { this.resources = resources; this.resources.leftMenuItemStyle().ensureInjected(); handlerManager = new HandlerManager(this); //if the passed in menuItem is not empty then set styles //on elements and related details in menuItem on elements if (menuItem != null) { this.menuItem = menuItem; //get images from menuItem notSelectedImage = new Image(menuItem.getUnSelectedImage()); selectedImage = new Image(menuItem.getSelectedImage()); this.initWidget(uiBinder.createAndBindUi(this)); leftMenuItem.setStyleName(resources.leftMenuItemStyle().leftMenuItem()); notSelectedPanel.setStyleName(resources.leftMenuItemStyle().notSelectedPanelOutState()); //add click handler to notSelectedPanel to trigger the animation on the menu item //and add the mouse up, out, down and over state notSelectedPanel.addMouseUpHandler(new MouseUpHandler() { /** * Will handle the mouse up event on the panel * * @param event The mouse event */ @Override public void onMouseUp(MouseUpEvent event) { notSelectedPanel.setStyleName( LeftMenuItem.this.resources.leftMenuItemStyle().notSelectedPanelUpState()); if (isClickable) { isClickable = false; setSelected(true); fireEvent(new LeftMenuItemSelectEvent()); } } }); notSelectedPanel.addMouseDownHandler(new MouseDownHandler() { /** * Will handle the mouse down event on the panel * * @param event The mouse event */ @Override public void onMouseDown(MouseDownEvent event) { notSelectedPanel.setStyleName( LeftMenuItem.this.resources.leftMenuItemStyle().notSelectedPanelDownState()); } }); notSelectedPanel.addMouseOverHandler(new MouseOverHandler() { /** * Will handle the mouse over event on the panel * * @param event The mouse event */ @Override public void onMouseOver(MouseOverEvent event) { notSelectedPanel.setStyleName( LeftMenuItem.this.resources.leftMenuItemStyle().notSelectedPanelOverState()); } }); notSelectedPanel.addMouseOutHandler(new MouseOutHandler() { /** * Will handle the mouse out event on the panel * * @param event The mouse event */ @Override public void onMouseOut(MouseOutEvent event) { notSelectedPanel.setStyleName( LeftMenuItem.this.resources.leftMenuItemStyle().notSelectedPanelOutState()); } }); notSelectedImage.setStyleName(resources.leftMenuItemStyle().notSelectedImage()); notSelectedLabel.setStyleName(resources.leftMenuItemStyle().notSelectedLabel()); notSelectedLabel.setText(menuItem.getLabel()); notSelectedNotificationContainer .setStyleName(resources.leftMenuItemStyle().notSelectedNotificationContainer()); notSelectedNotificationCount.setStyleName(resources.leftMenuItemStyle().notSelectedNotificationCount()); selectedImage.setStyleName(resources.leftMenuItemStyle().selectedImage()); selectedLabel.setStyleName(resources.leftMenuItemStyle().selectedLabel()); selectedLabel.setText(menuItem.getLabel()); selectedPanel.setStyleName(resources.leftMenuItemStyle().selectedPanel()); selectedLabelContainer.setStyleName(resources.leftMenuItemStyle().selectedLabelContainer()); selectedNotificationContainer .setStyleName(resources.leftMenuItemStyle().selectedNotificationContainer()); selectedNotificationCount.setStyleName(resources.leftMenuItemStyle().selectedNotificationCount()); removeNotificationCount(); leftMenuItem.forceLayout(); } }
From source file:org.thechiselgroup.biomixer.client.core.command.DefaultCommandManager.java
License:Apache License
public DefaultCommandManager() { this.eventBus = new HandlerManager(this); }