Examples of ImageResource


Examples of br.com.caelum.tubaina.resources.ImageResource

    } catch (IOException e) {
      throw new TubainaException("Image not existant", e);
    } catch (NullPointerException e) {
      throw new TubainaException(path + " is not a valid image");
    }
    resources.add(new ImageResource(image, matcher.group(2)));
    return new ImageChunk(path, matcher.group(2), width);
  }
View Full Code Here

Examples of ch.entwine.weblounge.common.content.image.ImageResource

      logger.warn("Error searching for image with given subjects.");
      return SKIP_BODY;
    }

    ResourceURI uri = null;
    ImageResource image = null;
    ImageContent imageContent = null;
    String linkToImage = null;
    PrintWriter writer = null;

    try {
      writer = response.getWriter();

      for (int i = 0; i < result.getItems().length; i++) {
        uri = new ImageResourceURIImpl(site, null, result.getItems()[i].getId());
        if (repository.exists(uri)) {
          image = (ImageResource) repository.get(uri);
          language = LanguageUtils.getPreferredLanguage(image, request, site);
          image.switchTo(language);
          imageContent = image.getContent(language);

          linkToImage = UrlUtils.concat("/weblounge-images", image.getIdentifier(), imageContent.getFilename());

          // Find the image style

          writer.write("<a href=\"");
          writer.write(linkToImage + "?style=" + this.styleNormal); // normal
View Full Code Here

Examples of ch.ethz.inf.vs.californium.examples.resources.ImageResource

    server.setExecutor(Executors.newScheduledThreadPool(4));
   
    server.add(new HelloWorldResource("hello"));
    server.add(new FibonacciResource("fibonacci"));
    server.add(new StorageResource("storage"));
    server.add(new ImageResource("image"));
    server.add(new MirrorResource("mirror"));
    server.add(new LargeResource("large"));
   
    server.start();
  }
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.resource.model.ImageResource

  public String getSurveyImageURL(String surveyImageId, String dimension) {
    String URL = null;
    try {
      if (null == surveyImageId) return null;
      if (null == dimension) dimension = "0";
      ImageResource image = (ImageResource) this.getResourceManager().loadResource(surveyImageId);
      if (null != image) {
        URL = image.getImagePath(dimension);
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getSurveyImageURL");
      throw new RuntimeException("Error loading the image for the survey", t);
    }
View Full Code Here

Examples of com.google.gwt.resources.client.ImageResource

            {
               String imageUri = "";
               String imageStyle = style_.expandIcon();
               if (object.canExpand())
               {
                  ImageResource expandImage =
                      object.isExpanding ?
                         CoreResources.INSTANCE.progress() :
                         object.expanded ?
                            EnvironmentResources.INSTANCE.collapseIcon() :
                            EnvironmentResources.INSTANCE.expandIcon();

                  imageUri = expandImage.getSafeUri().asString();
               }
               else if (object.hasTraceInfo())
               {
                  imageUri = EnvironmentResources.INSTANCE
                        .tracedFunction().getSafeUri().asString();
View Full Code Here

Examples of com.google.gwt.resources.client.ImageResource

      // effect to work.
      SimplePanel panel = new SimplePanel();
      panel.getElement().getStyle().setPosition(Position.RELATIVE);

      commands_ = commands;
      ImageResource icon = commands_.interruptR().getImageResource();
      ToolbarButton button = new ToolbarButton(icon,
                                               commands.interruptR());
      width_ = icon.getWidth() + 6;
      height_ = icon.getHeight();
      panel.setWidget(button);

      initWidget(panel);
      setVisible(false);
View Full Code Here

Examples of com.google.gwt.resources.client.ImageResource

         return;
      }
      for (int i = 0; i < environments_.length(); i++)
      {
         final EnvironmentFrame frame = environments_.get(i);
         ImageResource img = imageOfEnvironment(frame.getName(),
                                                frame.isLocal());
         environmentMenu_.addItem(ImageMenuItem.create(img,
                  friendlyNameOfEnvironment(frame.getName()),
                  new Scheduler.ScheduledCommand()
                  {
View Full Code Here

Examples of com.google.gwt.resources.client.ImageResource

   public SafeHtml render(String str)
   {
      if (str.length() != 1)
         return SafeHtmlUtils.fromString(str);

      ImageResource img = imgForStatus(str.charAt(0));

      if (img == null)
         return SafeHtmlUtils.fromString(str);

      SafeHtmlBuilder builder = new SafeHtmlBuilder();
View Full Code Here

Examples of com.google.gwt.resources.client.ImageResource

   {
      Toolbar toolbar = new Toolbar();
     
      fileLabel_ = new ToolbarFileLabel(toolbar, 200);
     
      ImageResource showLogImage = StandardIcons.INSTANCE.show_log();
      if (hasLogs_)
      {
         showLogButton_ = new ToolbarButton("View Log",
                                            showLogImage,
                                            (ClickHandler) null);
View Full Code Here

Examples of com.google.gwt.resources.client.ImageResource

     
      toolbar.addLeftWidget(commands_.printSourceDoc().createToolbarButton());
      toolbar.addLeftSeparator();
      toolbar.addLeftWidget(findReplace_.createFindReplaceButton());
    
      ImageResource icon = ThemeResources.INSTANCE.codeTransform();

      ToolbarPopupMenu menu = new ToolbarPopupMenu();
      menu.addItem(commands_.goToHelp().createMenuItem(false));
      menu.addItem(commands_.goToFunctionDefinition().createMenuItem(false));
      ToolbarButton codeTools = new ToolbarButton("", icon, menu);
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.