ResourceReference defaultImgRR = new ResourceReference(AnimSelectSettings.class, defaultImg.getFileName());
ResourceReference defaultImgOverRR = new ResourceReference(AnimSelectSettings.class, defaultImgOver.getFileName());
ResourceReference selectedImgRR = new ResourceReference(AnimSelectSettings.class, selectedImg.getFileName());
ResourceReference selectedImgOverRR = new ResourceReference(AnimSelectSettings.class, selectedImgOver.getFileName());
ImageResourceInfo defaultImgInfo = new ImageResourceInfo(defaultImgRR);
int defaultImgWidth = defaultImgInfo.getWidth();
int defaultImgHeight = defaultImgInfo.getHeight();
ImageResourceInfo defaultImgOverInfo = new ImageResourceInfo(defaultImgOverRR);
int defaultImgOverWidth = defaultImgOverInfo.getWidth();
int defaultImgOverHeight = defaultImgOverInfo.getHeight();
ImageResourceInfo selectedImgInfo = new ImageResourceInfo(selectedImgRR);
int selectedImgWidth = selectedImgInfo.getWidth();
int selectedImgHeight = selectedImgInfo.getHeight();
ImageResourceInfo selectedImgOverInfo = new ImageResourceInfo(selectedImgOverRR);
int selectedImgOverWidth = selectedImgOverInfo.getWidth();
int selectedImgOverHeight = selectedImgOverInfo.getHeight();
CSSInlineStyle defaultImgStyle = new CSSInlineStyle();
defaultImgStyle.add("background", "url(" + RequestCycle.get().urlFor(defaultImgRR) + ")");
defaultImgStyle.add("width", defaultImgWidth + "px");
defaultImgStyle.add("height", defaultImgHeight + "px");