/**
* Simple RowIdChangeEvent implementation.
*/
- public class RowIdChangeEvent extends EventObject implements
+ public static class RowIdChangeEvent extends EventObject implements
QueryDelegate.RowIdChangeEvent {
private final RowId oldId;
private final RowId newId;
* @since 6.2
*/
@SuppressWarnings("serial")
- public class FocusEvent extends Component.Event {
+ public static class FocusEvent extends Component.Event {
/**
* Identifier for event that can be used in {@link EventRouter}
* @since 6.2
*/
@SuppressWarnings("serial")
- public class BlurEvent extends Component.Event {
+ public static class BlurEvent extends Component.Event {
/**
* Identifier for event that can be used in {@link EventRouter}
* @since 6.5
*/
public static abstract class TextChangeEvent extends Component.Event {
+
public TextChangeEvent(Component source) {
super(source);
}
* @see ClickListener
* @since 6.2
*/
- public class ClickEvent extends Component.Event {
+ public static class ClickEvent extends Component.Event {
public static final int BUTTON_LEFT = MouseEventDetails.BUTTON_LEFT;
public static final int BUTTON_MIDDLE = MouseEventDetails.BUTTON_MIDDLE;
public static final int BUTTON_RIGHT = MouseEventDetails.BUTTON_RIGHT;
* @author Vaadin Ltd.
* @since 6.2
*/
- public class DoubleClickEvent extends Component.Event {
+ public static class DoubleClickEvent extends Component.Event {
public DoubleClickEvent(Component source) {
super(source);
/**
* Event that is fired when a browser window containing a uI is resized.
*/
- public class BrowserWindowResizeEvent extends EventObject {
+ public static class BrowserWindowResizeEvent extends EventObject {
private final int width;
private final int height;
/**
* Event fired when uri fragment changes.
*/
- public class FragmentChangedEvent extends EventObject {
+ public static class FragmentChangedEvent extends EventObject {
/**
* The new uri fragment
import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
+import java.util.EventObject;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
protected void firePropertySetChange() {
if (propertySetEventListeners != null
&& !propertySetEventListeners.isEmpty()) {
- final Container.PropertySetChangeEvent event = new PropertySetChangeEvent();
+ final Container.PropertySetChangeEvent event = new PropertySetChangeEvent(
+ this);
final Object[] listeners = propertySetEventListeners.toArray();
for (int i = 0; i < listeners.length; i++) {
((Container.PropertySetChangeListener) listeners[i])
*/
protected void fireItemSetChange() {
if (itemSetEventListeners != null && !itemSetEventListeners.isEmpty()) {
- final Container.ItemSetChangeEvent event = new ItemSetChangeEvent();
+ final Container.ItemSetChangeEvent event = new ItemSetChangeEvent(
+ this);
final Object[] listeners = itemSetEventListeners.toArray();
for (int i = 0; i < listeners.length; i++) {
((Container.ItemSetChangeListener) listeners[i])
/**
* Implementation of item set change event.
*/
- private class ItemSetChangeEvent implements Serializable,
- Container.ItemSetChangeEvent {
+ private static class ItemSetChangeEvent extends EventObject implements
+ Serializable, Container.ItemSetChangeEvent {
+
+ private ItemSetChangeEvent(Container source) {
+ super(source);
+ }
/**
* Gets the Property where the event occurred.
*/
@Override
public Container getContainer() {
- return AbstractSelect.this;
+ return (Container) getSource();
}
}
/**
* Implementation of property set change event.
*/
- private class PropertySetChangeEvent implements
+ private static class PropertySetChangeEvent extends EventObject implements
Container.PropertySetChangeEvent, Serializable {
+ private PropertySetChangeEvent(Container source) {
+ super(source);
+ }
+
/**
* Retrieves the Container whose contents have been modified.
*
*/
@Override
public Container getContainer() {
- return AbstractSelect.this;
+ return (Container) getSource();
}
}
* Allowed units are UNITS_PERCENTAGE and UNITS_PIXELS
*/
public void setMaxSplitPosition(float pos, Unit unit) {
- setSplitPositionLimits(getSplitterState().minPosition, posMinUnit,
- pos, unit);
+ setSplitPositionLimits(getSplitterState().minPosition, posMinUnit, pos,
+ unit);
}
/**
public void splitterClick(SplitterClickEvent event);
}
- public class SplitterClickEvent extends ClickEvent {
+ public static class SplitterClickEvent extends ClickEvent {
public SplitterClickEvent(Component source,
MouseEventDetails mouseEventDetails) {
return textChangeEventTimeout;
}
- public class TextChangeEventImpl extends TextChangeEvent {
+ public static class TextChangeEventImpl extends TextChangeEvent {
private String curText;
private int cursorPosition;
* @author Vaadin Ltd.
* @since 3.0
*/
- public class ClickEvent extends Component.Event {
+ public static class ClickEvent extends Component.Event {
private final MouseEventDetails details;
* @see Component.Listener
*/
@SuppressWarnings("serial")
- public class Event extends EventObject {
+ public static class Event extends EventObject {
/**
* Constructs a new event with the specified source component.
* </p>
*/
@SuppressWarnings("serial")
- public class ErrorEvent extends Event {
+ public static class ErrorEvent extends Event {
private final ErrorMessage message;
* Component attach event sent when a component is attached to container.
*/
@SuppressWarnings("serial")
- public class ComponentAttachEvent extends Component.Event {
+ public static class ComponentAttachEvent extends Component.Event {
private final Component component;
* Component detach event sent when a component is detached from container.
*/
@SuppressWarnings("serial")
- public class ComponentDetachEvent extends Component.Event {
+ public static class ComponentDetachEvent extends Component.Event {
private final Component component;
String value = (parameters.get(key))[0];
params.put(key, value);
}
- LoginEvent event = new LoginEvent(params);
+ LoginEvent event = new LoginEvent(LoginForm.this, params);
fireEvent(event);
return true;
}
/**
* This event is sent when login form is submitted.
*/
- public class LoginEvent extends Event {
+ public static class LoginEvent extends Event {
private Map<String, String> params;
- private LoginEvent(Map<String, String> params) {
- super(LoginForm.this);
+ private LoginEvent(Component source, Map<String, String> params) {
+ super(source);
this.params = params;
}
import java.util.Iterator;
import java.util.Map;
+import com.vaadin.server.LegacyComponent;
import com.vaadin.server.LegacyPaint;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
-import com.vaadin.server.LegacyComponent;
/**
*
* event with {@link #getPopupView()}.
*
*/
- public class PopupVisibilityEvent extends Event {
+ public static class PopupVisibilityEvent extends Event {
public PopupVisibilityEvent(PopupView source) {
super(source);
import com.vaadin.event.FieldEvents.FocusNotifier;
import com.vaadin.server.ErrorMessage;
import com.vaadin.server.KeyMapper;
+import com.vaadin.server.LegacyComponent;
import com.vaadin.server.LegacyPaint;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.Resource;
-import com.vaadin.server.LegacyComponent;
import com.vaadin.shared.ui.tabsheet.TabsheetBaseConstants;
import com.vaadin.shared.ui.tabsheet.TabsheetConstants;
import com.vaadin.ui.Component.Focusable;
* @author Vaadin Ltd.
* @since 3.0
*/
- public class SelectedTabChangeEvent extends Component.Event {
+ public static class SelectedTabChangeEvent extends Component.Event {
/**
* New instance of selected tab change event
}
}
- public class CloseEvent extends Component.Event {
+ public static class CloseEvent extends Component.Event {
/**
*
* (e.g. the browser window is resized). The frequency may vary across
* browsers.
*/
- public class ResizeEvent extends Component.Event {
+ public static class ResizeEvent extends Component.Event {
/**
*
navigator.navigateTo("test");
control.replay();
- FragmentChangedEvent event = page.new FragmentChangedEvent(page,
- "oldtest");
+ FragmentChangedEvent event = new FragmentChangedEvent(page, "oldtest");
manager.fragmentChanged(event);
}
}