Examples of DemoMarker


Examples of org.xhtmlrenderer.demo.browser.DemoMarker

        if (uri == null) return null;
        if (uri.trim().equals("")) return burl; //jar URLs don't resolve this right

        if (uri.startsWith("demo:")) {
            DemoMarker marker = new DemoMarker();
            String short_url = uri.substring(5);
            if (!short_url.startsWith("/")) {
                short_url = "/" + short_url;
            }
            ref = marker.getClass().getResource(short_url);
            Uu.p("ref = " + ref);
        } else if (uri.startsWith("demoNav:")) {
            DemoMarker marker = new DemoMarker();
            String short_url = uri.substring("demoNav:".length());
            Demo demo = null;
            if (short_url.equalsIgnoreCase("back")) {
                demo = _demos.previous();
            } else if (short_url.equalsIgnoreCase("forward")) {
                demo = _demos.next();
            }
            if (demo != null) {
                try {
                    String duri = demo.getUrl();
                    if (duri.startsWith("demo:")) {
                        ref = new URL(resolveURI(duri));
                    } else {
                        ref = new URL(duri);
                    }
                } catch (MalformedURLException e) {
                    Uu.p("URI/URL is malformed: " + burl + " or " + uri);
                }
            } else {
                if (!short_url.startsWith("/")) {
                    short_url = "/" + short_url;
                }
                ref = marker.getClass().getResource(short_url);
            }
            Uu.p("Demo navigation URI, ref = " + ref);
        } else if (uri.startsWith("javascript")) {
            Uu.p("Javascript URI, ignoring: " + uri);
        } else if (uri.startsWith("news")) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.