Examples of Resources


Examples of org.apache.pivot.util.Resources

        crudSearchButton.getButtonPressListeners().add(new ButtonPressListener() {
             @Override
             public void buttonPressed(Button button) {
                 try {
                     BXMLSerializer wtkxSerializer = new BXMLSerializer();
                     SMDCRUDSearchWindow window = (SMDCRUDSearchWindow) wtkxSerializer.readObject(getClass().getResource("SMDCRUDSearchWindow.bxml"),new Resources(resources,SMDCRUDSearchWindow.class.getName()));
                     window.open(getDisplay(), getWindow());
                 } catch (IOException e) {
                     throw new RuntimeException(e);
                 } catch (SerializationException e) {
                     throw new RuntimeException(e);
                 }
             }
         });

        listViewButton.getButtonPressListeners().add(new ButtonPressListener() {
             @Override
             public void buttonPressed(Button button) {
                 try {
                     BXMLSerializer wtkxSerializer = new BXMLSerializer();
                     SMDListViewWindow window = (SMDListViewWindow) wtkxSerializer.readObject(getClass().getResource("SMDListViewWindow.bxml"),new Resources(resources,SMDListViewWindow.class.getName()));
                     window.open(getDisplay(), getWindow());
                 } catch (IOException e) {
                     throw new RuntimeException(e);
                 } catch (SerializationException e) {
                     throw new RuntimeException(e);
                 }
             }
         });

        preferencesButton.getButtonPressListeners().add(new ButtonPressListener() {
             @Override
             public void buttonPressed(Button button) {
                 try {
                     BXMLSerializer wtkxSerializer = new BXMLSerializer();
                     SMDPreferencesWindow window = (SMDPreferencesWindow) wtkxSerializer.readObject(getClass().getResource("SMDPreferencesWindow.bxml"),new Resources(resources,SMDPreferencesWindow.class.getName()));
                     window.open(getDisplay(), getWindow());
                 } catch (IOException e) {
                     throw new RuntimeException(e);
                 } catch (SerializationException e) {
                     throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.pivot.util.Resources

        String language = properties.get(LANGUAGE_PROPERTY_NAME);
        if (language != null) {
            Locale.setDefault(new Locale(language));
        }
        PropertiesModule.init(properties);
        Resources resources = new Resources(SMDApplicationWindow.class.getName());
        BXMLSerializer wtkxSerializer = new BXMLSerializer();
        window = (SMDApplicationWindow) wtkxSerializer.readObject(getClass().getResource("SMDApplicationWindow.bxml"), resources);
        window.open(display);
    }
View Full Code Here

Examples of org.apache.tomcat.Resources

     *
     * @param file Filename for which to identify a MIME type
     */
    public String getMimeType(String file) {

  Resources resources = host.getResources();
  if (resources == null)
      return (null);
  else
      return (resources.getMimeType(file));

    }
View Full Code Here

Examples of org.apache.tomcat.Resources

     *
     * @param path The path to the desired resource
     */
    public String getRealPath(String path) {

  Resources resources = host.getResources();
  if (resources == null)
      return (null);
  else
      return (resources.getRealPath(path));

    }
View Full Code Here

Examples of org.apache.tomcat.Resources

     * @exception MalformedURLException if the path is not given
     *  in the correct form
     */
    public URL getResource(String path) throws MalformedURLException {

  Resources resources = host.getResources();
  if (resources == null)
      return (null);
  else
      return (resources.getResource(path));

    }
View Full Code Here

Examples of org.apache.tomcat.Resources

     *
     * @param path The path to the desired resource.
     */
    public InputStream getResourceAsStream(String path) {

  Resources resources = host.getResources();
  if (resources == null)
      return (null);
  else
      return (resources.getResourceAsStream(path));

    }
View Full Code Here

Examples of org.apache.tomcat.Resources

     *
     * @param resources The newly associated Resources
     */
    public void setResources(Resources resources) {

  Resources oldResources = this.resources;
  this.resources = resources;
  if (this.resources != null)
      this.resources.setContainer(this);
  support.firePropertyChange("resources", oldResources, this.resources);

View Full Code Here

Examples of org.apache.tomcat.Resources

     *
     * @param file Filename for which to identify a MIME type
     */
    public String getMimeType(String file) {

  Resources resources = context.getResources();
  if (resources == null)
      return (null);
  else
      return (resources.getMimeType(file));

    }
View Full Code Here

Examples of org.apache.tomcat.Resources

     *
     * @param path The path to the desired resource
     */
    public String getRealPath(String path) {

  Resources resources = context.getResources();
  if (resources == null)
      return (null);
  else
      return (resources.getRealPath(path));

    }
View Full Code Here

Examples of org.apache.tomcat.Resources

     * @exception MalformedURLException if the path is not given
     *  in the correct form
     */
    public URL getResource(String path) throws MalformedURLException {

  Resources resources = context.getResources();
  if (resources == null)
      return (null);
  else
      return (resources.getResource(path));

    }
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.