01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.wicket;
18:
19: import java.util.Locale;
20:
21: /**
22: * A factory which creates resources for a given specification string. The
23: * format of the specification string is determined by the resource factory
24: * subclass. If the resource factory produced button images, the specification
25: * might include settings relevant to buttons such as the width, height and
26: * color of the button, as well as the text to draw on the button.
27: *
28: * @see org.apache.wicket.markup.html.image.resource.LocalizedImageResource
29: * @author Jonathan Locke
30: */
31: public interface IResourceFactory {
32: /**
33: * @param specification
34: * The resource specification string
35: * @param locale
36: * The locale for the resource
37: * @param style
38: * The style of the resource (see {@link org.apache.wicket.Session})
39: * @return The resource
40: */
41: Resource newResource(final String specification,
42: final Locale locale, final String style);
43: }
|