Search in sources :

Example 1 with WindowState

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;
}
Also used : WindowState(com.liferay.ide.portlet.core.model.WindowState) CustomWindowState(com.liferay.ide.portlet.core.model.CustomWindowState) CustomWindowState(com.liferay.ide.portlet.core.model.CustomWindowState) ImageData(org.eclipse.sapphire.ImageData) Element(org.eclipse.sapphire.Element)

Aggregations

CustomWindowState (com.liferay.ide.portlet.core.model.CustomWindowState)1 WindowState (com.liferay.ide.portlet.core.model.WindowState)1 Element (org.eclipse.sapphire.Element)1 ImageData (org.eclipse.sapphire.ImageData)1