diff options
author | Henri Sara <henri.sara@gmail.com> | 2017-06-29 10:18:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-29 10:18:33 +0300 |
commit | b2c0ac2bac558a4bc497fa3a6d29b8f030511e1a (patch) | |
tree | 54661aff762131fe847da8e20f5e70f2c5f2bfe0 /server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java | |
parent | b0d109fe1d1ad856bc04d2a358065fb2935e75ad (diff) | |
download | vaadin-framework-b2c0ac2bac558a4bc497fa3a6d29b8f030511e1a.tar.gz vaadin-framework-b2c0ac2bac558a4bc497fa3a6d29b8f030511e1a.zip |
Use HasUserOriginated interface where appropriate (#9608)
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java index 898a25674f..fea45200b0 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java @@ -24,6 +24,7 @@ import java.util.Iterator; import org.jsoup.nodes.Element; import com.vaadin.event.ConnectorEventListener; +import com.vaadin.event.HasUserOriginated; import com.vaadin.event.MouseEvents.ClickEvent; import com.vaadin.server.SizeWithUnit; import com.vaadin.server.Sizeable; @@ -68,8 +69,9 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { getSplitterState().position = position; - fireEvent(new SplitPositionChangeEvent(AbstractSplitPanel.this, true, - oldPosition, getSplitPositionUnit(), position, getSplitPositionUnit())); + fireEvent(new SplitPositionChangeEvent(AbstractSplitPanel.this, + true, oldPosition, getSplitPositionUnit(), position, + getSplitPositionUnit())); } }; @@ -563,7 +565,8 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { * * @since 7.5.0 */ - public static class SplitPositionChangeEvent extends Component.Event { + public static class SplitPositionChangeEvent extends Component.Event + implements HasUserOriginated { private final float oldPosition; private final Unit oldUnit; @@ -574,9 +577,8 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { private final boolean userOriginated; public SplitPositionChangeEvent(final Component source, - final boolean userOriginated, - final float oldPosition, final Unit oldUnit, - final float position, final Unit unit) { + final boolean userOriginated, final float oldPosition, + final Unit oldUnit, final float position, final Unit unit) { super(source); this.userOriginated = userOriginated; this.oldUnit = oldUnit; @@ -588,8 +590,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { /** * Returns the new split position that triggered this change event. * - * @since 7.5.0 - * * @return the new value of split position */ public float getSplitPosition() { @@ -599,8 +599,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { /** * Returns the new split position unit that triggered this change event. * - * @since 7.5.0 - * * @return the new value of split position */ public Unit getSplitPositionUnit() { @@ -624,22 +622,14 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { * * @since 8.1 * - * @return the split position unit previously set to the source of - * this event + * @return the split position unit previously set to the source of this + * event */ public Unit getOldSplitPositionUnit() { return oldUnit; } - /** - * Returns whether this event was triggered by user interaction, on the - * client side, or programmatically, on the server side. - * - * @since 8.1 - * - * @return {@code true} if this event originates from the client, - * {@code false} otherwise. - */ + @Override public boolean isUserOriginated() { return userOriginated; } |