1 /*******************************************************************************
2 * Copyright (c) 2007, 2012 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.browsing.ui.swt.widgets;
14 import java.util.concurrent.atomic.AtomicBoolean;
16 import org.eclipse.swt.widgets.Control;
17 import org.eclipse.swt.widgets.Layout;
18 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;
19 import org.simantics.db.management.ISessionContext;
21 public class ScrolledComposite extends WidgetImpl {
23 final private org.eclipse.swt.custom.ScrolledComposite composite;
25 public ScrolledComposite(org.eclipse.swt.widgets.Composite parent, WidgetSupport support, int style) {
27 composite = new org.eclipse.swt.custom.ScrolledComposite(parent, style);
28 support.register(this);
31 public org.eclipse.swt.custom.ScrolledComposite getWidget() {
36 public Control getControl() {
40 private AtomicBoolean inputDisposed;
43 public void setInput(ISessionContext context, Object input) {
45 if (this.inputDisposed != null)
46 this.inputDisposed.set(true);
50 public void setLayout(Layout layout) {
51 composite.setLayout(layout);