]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - swt/org.argeo.cms.swt/src/org/argeo/cms/swt/acr/ContentComposite.java
1 package org
.argeo
.cms
.swt
.acr
;
3 import org
.argeo
.api
.acr
.Content
;
4 import org
.argeo
.api
.acr
.spi
.ProvidedContent
;
5 import org
.argeo
.cms
.ux
.acr
.ContentPart
;
6 import org
.eclipse
.swt
.widgets
.Composite
;
8 /** A composite which can (optionally) manage a content. */
9 public class ContentComposite
extends Composite
implements ContentPart
{
10 private static final long serialVersionUID
= -1447009015451153367L;
12 public ContentComposite(Composite parent
, int style
, Content item
) {
18 public boolean hasContent() {
19 if (getData() == null)
21 return getData() instanceof Content
;
25 public Content
getContent() {
26 return (Content
) getData();
30 public Content
getNode() {
34 protected ProvidedContent
getProvidedContent() {
35 return (ProvidedContent
) getContent();
38 public String
getSessionLocalId() {
39 return getProvidedContent().getSessionLocalId();
42 protected void itemUpdated() {
46 public void setContent(Content content
) {