X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2Fwidgets%2FComposite.java;h=90a95d84608ea0e6d73ab419d0294c9fbf9a5602;hp=6737c524c2da990163e5cb3ada4d667a838f6718;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/Composite.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/Composite.java index 6737c524c..90a95d846 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/Composite.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/widgets/Composite.java @@ -1,54 +1,54 @@ -/******************************************************************************* - * Copyright (c) 2007, 2012 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.browsing.ui.swt.widgets; - -import java.util.concurrent.atomic.AtomicBoolean; - -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Layout; -import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; -import org.simantics.db.management.ISessionContext; - -public class Composite extends WidgetImpl { - - final private org.eclipse.swt.widgets.Composite composite; - - public Composite(org.eclipse.swt.widgets.Composite parent, WidgetSupport support, int style) { - super(support); - composite = new org.eclipse.swt.widgets.Composite(parent, style); - support.register(this); - } - - public org.eclipse.swt.widgets.Composite getWidget() { - return composite; - } - - @Override - public Control getControl() { - return composite; - } - - private AtomicBoolean inputDisposed; - - @Override - public void setInput(ISessionContext context, Object input) { - - if (this.inputDisposed != null) - this.inputDisposed.set(true); - - } - - public void setLayout(Layout layout) { - composite.setLayout(layout); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2012 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.browsing.ui.swt.widgets; + +import java.util.concurrent.atomic.AtomicBoolean; + +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Layout; +import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; +import org.simantics.db.management.ISessionContext; + +public class Composite extends WidgetImpl { + + final private org.eclipse.swt.widgets.Composite composite; + + public Composite(org.eclipse.swt.widgets.Composite parent, WidgetSupport support, int style) { + super(support); + composite = new org.eclipse.swt.widgets.Composite(parent, style); + support.register(this); + } + + public org.eclipse.swt.widgets.Composite getWidget() { + return composite; + } + + @Override + public Control getControl() { + return composite; + } + + private AtomicBoolean inputDisposed; + + @Override + public void setInput(ISessionContext context, Object input) { + + if (this.inputDisposed != null) + this.inputDisposed.set(true); + + } + + public void setLayout(Layout layout) { + composite.setLayout(layout); + } + +}