use of com.liferay.ide.portlet.core.model.WindowState in project liferay-ide by liferay.
the class WindowStateImageService method compute.
@Override
protected ImageData compute() {
String strWindowState = null;
Element element = context(Element.class);
ImageData imageData = null;
if (element instanceof CustomWindowState) {
CustomWindowState customWindowState = (CustomWindowState) element;
strWindowState = String.valueOf(customWindowState.getWindowState().content());
} else if (element instanceof WindowState) {
WindowState windowState = (WindowState) element;
strWindowState = windowState.getWindowState().content();
}
if ("MAXIMIZED".equalsIgnoreCase(strWindowState)) {
imageData = IMG_MAXIMIZED;
} else if ("MINIMIZED".equalsIgnoreCase(strWindowState)) {
imageData = IMG_MINIMIZED;
}
if (imageData == null) {
imageData = IMG_DEFAULT;
}
return imageData;
}
Aggregations