/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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.
*/
/**
* A collection of utility methods for Swing.
* <p>
* <b>WARNING:</b> While this class is public, it should not be treated as
* public API and its API may change in incompatable ways between dot dot
* releases and even patch releases. You should not rely on this class even
* existing.
*
* This is a second part of sun.swing.SwingUtilities2. It is required
* to provide services for JavaFX applets.
*
*/
public class SwingUtilities3 {
/**
* The {@code clientProperty} key for delegate {@code RepaintManager}
*/
new StringBuilder("DelegateRepaintManagerKey");
/**
* Registers delegate RepaintManager for {@code JComponent}.
*/
/* setting up flag in AppContext to speed up lookups in case
* there are no delegate RepaintManagers used.
*/
}
/**
* Sets vsyncRequested state for the {@code rootContainer}. If
* {@code isRequested} is {@code true} then vsynced
* {@code BufferStrategy} is enabled for this {@code rootContainer}.
*
* Note: requesting vsynced painting does not guarantee one. The outcome
* depends on current RepaintManager's RepaintManager.PaintManager
*
* @param rootContainer topmost container. Should be either {@code Window}
* or {@code Applet}
* @param isRequested the value to set vsyncRequested state to
*/
boolean isRequested) {
if (isRequested) {
} else {
}
}
/**
* Checks if vsync painting is requested for {@code rootContainer}
*
* @param rootContainer topmost container. Should be either Window or Applet
* @return {@code true} if vsync painting is requested for {@code rootContainer}
*/
}
/**
* Returns delegate {@code RepaintManager} for {@code component} hierarchy.
*/
component) {
&& ! (component instanceof JComponent)) {
}
((JComponent) component)
}
}
}
return delegate;
}
/*
* We use maps to avoid reflection. Hopefully it should perform better
* this way.
*/
public static void setEventQueueDelegate(
}
private static class EventQueueDelegateFromMap
implements EventQueueDelegate.Delegate {
@SuppressWarnings("unchecked")
}
try {
} catch (InterruptedException e) {
throw e;
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
try {
return beforeDispatchCallable.call();
} catch (InterruptedException e) {
throw e;
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
try {
return getNextEventCallable.call();
} catch (InterruptedException e) {
throw e;
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}