-
Notifications
You must be signed in to change notification settings - Fork 556
8294809: ListenerHelper for managing and disconnecting listeners #908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
andy-goryachev-oracle
wants to merge
29
commits into
openjdk:master
from
andy-goryachev-oracle:8294809.listener.helper
Closed
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
199d0ce
8294809: original code
andy-goryachev-oracle 019adac
8294809: relicensed by author
andy-goryachev-oracle 78774f4
8294809: renamed
andy-goryachev-oracle 3b3610a
Merge remote-tracking branch 'origin/master' into 8294809.listener.he…
andy-goryachev-oracle 8ff39da
8294809: null checks
andy-goryachev-oracle 78dfacf
8294809: override
andy-goryachev-oracle 718e255
8294809: cleanup
andy-goryachev-oracle 1044940
8294809: event handlers and filters
andy-goryachev-oracle 0589e78
8294809: whitespace
andy-goryachev-oracle d52802e
8294809: skin base
andy-goryachev-oracle cd6cd5c
8294809: change listener with callback
andy-goryachev-oracle 39e0bd7
8294809: remove
andy-goryachev-oracle 512a63d
8294809: tests
andy-goryachev-oracle af77693
8294809: use weak reference correctly this time
andy-goryachev-oracle 2df4a85
8294809: removed weak listeners support
andy-goryachev-oracle c518cbf
Revert "8294809: removed weak listeners support"
andy-goryachev-oracle e36d328
8294809: is alive
andy-goryachev-oracle 71ca35e
8294809: generics
andy-goryachev-oracle 82c2027
Merge remote-tracking branch 'origin/master' into 8294809.listener.he…
andy-goryachev-oracle 7a1fa62
8294809: map change listener
andy-goryachev-oracle e78ed6d
8294809: no public api
andy-goryachev-oracle e0e0aab
8294809: whitespace
andy-goryachev-oracle 29a67ff
Merge remote-tracking branch 'origin/master' into 8294809.listener.he…
andy-goryachev-oracle 470f42c
8294809: review comments
andy-goryachev-oracle 08f92e2
Merge remote-tracking branch 'origin/master' into 8294809.listener.he…
andy-goryachev-oracle 2a295c2
8294809: review comments
andy-goryachev-oracle 8cef69c
8294809: review comments
andy-goryachev-oracle 00566ed
Merge remote-tracking branch 'origin/master' into 8294809.listener.he…
andy-goryachev-oracle 79ae28c
8294809: review comments
andy-goryachev-oracle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/IDisconnectable.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * | ||
| * This code is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. Oracle designates this | ||
| * particular file as subject to the "Classpath" exception as provided | ||
| * by Oracle in the LICENSE file that accompanied this code. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
| * or visit www.oracle.com if you need additional information or have any | ||
| * questions. | ||
| */ | ||
| // Original code is re-licensed to Oracle by the author. | ||
| // https://github.com/andy-goryachev/FxTextEditor/blob/master/src/goryachev/common/util/Disconnectable.java | ||
| // Copyright © 2021-2022 Andy Goryachev <andy@goryachev.com> | ||
| package com.sun.javafx.scene.control; | ||
|
|
||
| /** | ||
| * A functional interface that provides a {@link #disconnect()} method. | ||
| */ | ||
| @FunctionalInterface | ||
| public interface IDisconnectable { | ||
andy-goryachev-oracle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /** | ||
| * Disconnects what has been connected. May be called multiple times, only the | ||
| * first invocation actually disconnects. | ||
| */ | ||
| public void disconnect(); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.