private final MovieAnimation doInitialize() { if (null != m_video) { setErrorHandler(this, m_video.getVideoElement()); String url = getURL(); if ((null == url) || ((url = url.trim()).isEmpty()) || (url.startsWith("#"))) { throw new NullPointerException("null or empty or invalid url"); } url = UriUtils.fromString(url).asString(); if ((null == url) || ((url = url.trim()).isEmpty()) || (url.startsWith("#"))) { throw new NullPointerException("null or empty or invalid url"); } m_video.setSrc(url); m_video.setLoop(isLoop()); m_video.setVisible(false); m_video.setPlaybackRate(getPlaybackRate()); m_video.setPreload(MediaElement.PRELOAD_AUTO); if (getAttributes().isDefined(Attribute.VOLUME)) { m_video.setVolume(getVolume()); } setSizes(); return new MovieAnimation(this, m_video); } else { return null; } }
/** * @param fileName of user defined tool * @return {@link SafeUri} of Icon with fileName */ SafeUri getIconFile(String fileName) { if (!fileName.isEmpty()) { String imageURL = app.getImageManager().getExternalImageSrc(fileName); if (imageURL != null) { return UriUtils.fromString(imageURL); } } return ((ImageResource) GGWToolBar.getMyIconResourceBundle().mode_tool_32()).getSafeUri(); }