Java Class Loader loadStyleSheet(Class type)

Here you can find the source of loadStyleSheet(Class type)

Description

load Style Sheet

License

Open Source License

Declaration

static public String loadStyleSheet(Class<?> type) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.net.URL;

public class Main {
    static public String loadStyleSheet(Class<?> type) {
        String name = type.getSimpleName();
        URL url = type.getResource(name);
        if (url == null)
            url = type.getResource(name + ".css");
        return url.toExternalForm();
    }/*  w  w  w . j a va 2 s .  c o  m*/
}

Related

  1. loadForClass(final Class clazz, final String filename)
  2. loadManifest(Class manifestFileClass)
  3. loadManifest(Class theClass)
  4. loadManifestFrom(Class c)
  5. loadProperties(final Properties properties, final String fileName, final ClassLoader cl)
  6. loadTextFile(Class relToThisClass, String relFileName)
  7. pathFromLoaders(final Class clazz)
  8. print(ClassLoader loader)
  9. readAll(ClassLoader cl, String path)