<commit_before>/*
 * $Id$ $Revision$
 * $Date$
 * 
 * ==============================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.examples.images;

import java.awt.Graphics2D;

import wicket.examples.WicketExamplePage;
import wicket.markup.html.image.Image;
import wicket.markup.html.image.resource.RenderedDynamicImageResource;
import wicket.model.Model;

/**
 * Demonstrates different flavors of wicket.examples.images.
 * 
 * @author <NAME>
 */
public final class Home extends WicketExamplePage
{
	/**
	 * Constructor
	 */
	public Home()
	{
		// Get our custom application subclass
		final ImagesApplication application = (ImagesApplication)getApplication();
		
		// Image as package resource
		add(new Image("image2"));

		// Dynamically created image.  Will re-render whenever resource is asked for.
		add(new Image("image3", new RenderedDynamicImageResource(100, 100)
		{
			protected void render(Graphics2D graphics)
			{
				application.drawCircle(graphics);
			}
		}));

		// Simple model
		add(new Image("image4", new Model("Image2.gif")));

		// Dynamically created buffered image
		add(new Image("image5", application.getImage5Resource()));
		
		// Add cancel button image
		add(new Image("cancelButton", application.getCancelButtonImageResource()));
	}
}<commit_msg>Fixed example image.<commit_after>/*
 * $Id$ $Revision$
 * $Date$
 * 
 * ==============================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.examples.images;

import java.awt.Graphics2D;

import wicket.examples.WicketExamplePage;
import wicket.markup.html.image.Image;
import wicket.markup.html.image.resource.RenderedDynamicImageResource;
import wicket.model.Model;

/**
 * Demonstrates different flavors of wicket.examples.images.
 * 
 * @author <NAME>
 */
public final class Home extends WicketExamplePage
{
	/**
	 * Constructor
	 */
	public Home()
	{
		// Get our custom application subclass
		final ImagesApplication application = (ImagesApplication)getApplication();
		
		// Image as package resource
		add(new Image("image2"));

		// Dynamically created image.  Will re-render whenever resource is asked for.
		add(new Image("image3", new RenderedDynamicImageResource(100, 100)
		{
			protected boolean render(Graphics2D graphics)
			{
				application.drawCircle(graphics);
				return true;
			}
		}));

		// Simple model
		add(new Image("image4", new Model("Image2.gif")));

		// Dynamically created buffered image
		add(new Image("image5", application.getImage5Resource()));
		
		// Add cancel button image
		add(new Image("cancelButton", application.getCancelButtonImageResource()));
	}
}
{'fraction_non_alphanumeric': 0.14136546184738955, 'fraction_numerical': 0.00963855421686747, 'mean_word_length': 4.306818181818182, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2400994', 'n_tokens_mistral': 1097, 'n_tokens_neox': 974, 'n_words': 334}