2 * Copyright (c) 2018-2019. Developed by Hedgecode.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.hedgecode.chess.img;
24 * @author Dmitry Samoshin aka gotty
26 public abstract class AbstractImageLoader implements ImageLoader {
28 protected static final File IMAGES_PATH = new File(
29 ImageLoader.class.getResource(
30 ImageConstants.RESOURCE_ROOT_DIR + ImageConstants.RESOURCE_IMAGES_DIR
34 private Type loadType;
36 public AbstractImageLoader() {
37 this.loadType = Type.STATELESS;
40 protected abstract void clear();
43 public Type loadType() {
47 protected void setLoadType(Type loadType) {
48 if (Type.STATELESS.equals(loadType)) {
51 this.loadType = loadType;