All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencms.ui.client.CmsExternalLayout Maven / Gradle / Ivy

Go to download

OpenCms is an enterprise-ready, easy to use website content management system based on Java and XML technology. Offering a complete set of features, OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.

There is a newer version: 18.0
Show newest version

package org.opencms.ui.client;

import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * Client-side implementation for the ExternalLayout addon. A simple, single-component panel
 * that renders the contained component in the given element.

* * @author Risto Yrjänä / Vaadin Ltd. */ public class CmsExternalLayout extends SimplePanel { /** The CSS class name. */ private static final String CLASSNAME = "v-externallayout"; /** The target element. */ private Element m_renderTargetElement; /** * Constructor.

*/ public CmsExternalLayout() { m_renderTargetElement = getElement(); } /** * Returns the target element.

* * @return the target element */ public Element getRenderTargetElement() { return m_renderTargetElement; } /** * Sets the target element.

* * @param renderTargetElement the target element */ public void setRenderTargetElement(Element renderTargetElement) { this.m_renderTargetElement = renderTargetElement; renderTargetElement.setClassName(CLASSNAME); } /** * This is overridden so that {@link #setWidget(Widget)} uses the specified * external element. */ @Override @SuppressWarnings("deprecation") //have to use old Element here because of superclass protected com.google.gwt.user.client.Element getContainerElement() { return DOM.asOld(getRenderTargetElement()); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy