Package org.apache.wicket.markup.html

Examples of org.apache.wicket.markup.html.PackageResource


    }

    private void addOrReplaceImage() {
        final ObjectAdapter adapter = getModel().getObject();
        ObjectSpecification typeOfSpec;
        PackageResource imageResource = null;
        if (adapter != null) {
            typeOfSpec = adapter.getSpecification();
            final IconFacet iconFacet = typeOfSpec.getFacet(IconFacet.class);
            if (iconFacet != null) {
                final String iconName = iconFacet.iconName(adapter);
View Full Code Here


        }
        return null;
    }

    private void addOrReplaceImage(final ObjectAdapter adapter) {
        final PackageResource imageResource = determineImageResource(adapter);

        if (imageResource != null) {
            image = new Image(ID_ENTITY_IMAGE, imageResource);
            addOrReplace(image);
        } else {
View Full Code Here

        }
    }

    private PackageResource determineImageResource(final ObjectAdapter adapter) {
        ObjectSpecification typeOfSpec;
        PackageResource imageResource = null;
        if (adapter != null) {
            typeOfSpec = adapter.getSpecification();
            final IconFacet iconFacet = typeOfSpec.getFacet(IconFacet.class);
            if (iconFacet != null) {
                final String iconName = iconFacet.iconName(adapter);
View Full Code Here

   *
   * @return The resource
   */
  protected Resource newResource()
  {
    PackageResource packageResource = PackageResource.get(getScope(), getName(), getLocale(),
      getStyle());
    if (packageResource != null)
    {
      locale = packageResource.getLocale();
    }
    else
    {
      throw new IllegalArgumentException("package resource [scope=" + getScope() + ",name=" +
        getName() + ",locale=" + getLocale() + "style=" + getStyle() + "] not found");
View Full Code Here

       * @see org.apache.wicket.ResourceReference#newResource()
       */
      @Override
      protected Resource newResource()
      {
        PackageResource pr = PackageResource.get(getScope(), getName(),
          LocalizedImageResource.this.locale, style);
        locale = pr.getLocale();
        return pr;
      }
    };
    resourceReference.setLocale(locale);
    resourceReference.setStyle(style);
View Full Code Here

   * @throws Exception
   */
  public void testRenderHomePage_12() throws Exception
  {
      executeTest(HeaderSectionPage_12.class, "HeaderSectionPageExpectedResult_12.html");
      PackageResource res = (PackageResource) tester.getApplication().getSharedResources().get("org.apache.wicket.markup.parser.filter.sub.HeaderSectionBorder/cborder.css");
      assertNotNull(res);
      String absPath = res.getAbsolutePath();
      assertNotNull(absPath);
      IResourceStream stream = res.getResourceStream();
      assertNotNull(stream);
  }
View Full Code Here

 
  /**  Copy of {@link JavascriptResourceReference} from Apache Wicket 1.4.7
   */
  @Override
  protected Resource newResource() {
    PackageResource packageResource = JavascriptPackageResource.newPackageResource(getScope(),
      getName(), getLocale(), getStyle());
    if (packageResource != null)
    {
      locale = packageResource.getLocale();
    }
    else
    {
      throw new IllegalArgumentException("package resource [scope=" + getScope() + ",name=" +
        getName() + ",locale=" + getLocale() + "style=" + getStyle() + "] not found");
View Full Code Here

      /**
       * @see org.apache.wicket.ResourceReference#newResource()
       */
      protected Resource newResource()
      {
        PackageResource pr = PackageResource.get(getScope(), getName(),
          LocalizedImageResource.this.locale, style);
        locale = pr.getLocale();
        return pr;
      }
    };
    resourceReference.setLocale(locale);
    resourceReference.setStyle(style);
View Full Code Here

      /**
       * @see org.apache.wicket.ResourceReference#newResource()
       */
      protected Resource newResource()
      {
        PackageResource pr = PackageResource.get(getScope(), getName(), LocalizedImageResource.this.locale, style);
        locale = pr.getLocale();
        return pr;
      }
    };
    resourceReference.setLocale(locale);
    resourceReference.setStyle(style);
View Full Code Here

          {
            scope = resolver.resolveClass(className);
          }
          String path = resourceKey.substring(ix + 1);

          PackageResource packageResource = PackageResource.get(scope, path);
          if (sharedResources.get(resourceKey) == null)
          {
            sharedResources.add(resourceKey, packageResource);
          }
          resource = packageResource;
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.PackageResource

Copyright © 2018 www.massapicom. 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.