From 4afd9fc71fb19a511e9a2d17dbac1592eade1630 Mon Sep 17 00:00:00 2001 From: hansonr Date: Mon, 29 Jul 2019 10:34:57 +0200 Subject: [PATCH 1/1] JAL-3380 allows JalviewJS to get embedded div attributes --- src/jalview/util/Platform.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index e53d2a9..aaadbb9 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -832,4 +832,25 @@ public class Platform */ } + public final static String EMBEDDED_DIM = "dim"; + + /** + * + * If this frame Is this frame embedded in a web page, return a known type. + * + * @param frame + * a JFrame or JInternalFrame + * @param type + * @return null if frame is not embedded. + */ + public static Object getEmbeddedAttribute(Object frame, String type) + { + if (!isJS()) + { + return null; + } + return (/** swingjs@j2sNative || frame.ui.getEmbedded(type) */ + null); + } + } -- 1.7.10.2