Code example for Element

Methods: getAttributes

0
            @Override 
            public ViewFactory getViewFactory () {
                return new HTMLFactory() {
                    @Override 
                    public View create(Element elem) {
                        Object o = elem.getAttributes().getAttribute(StyleConstants.NameAttribute);
                        if (o instanceof HTML.Tag) {
                            HTML.Tag kind = (HTML.Tag) o;
                            if (kind == HTML.Tag.IMG) {
                                return new ImageView(elem) {
                                    @Override 
                                    public URL getImageURL() {
                                        URL url = super.getImageURL();
                                        URI uri = null;
                                        try { 
                                            uri = url.toURI();
                                        } catch (URISyntaxException ex) {
                                        } 
                                        // Put an image into the cache to be read by other ImageView methods. 
                                        if (uri != null && imageCache.get(uri) == null) {