Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 5bdf5dfa4220640ae7857f0f770314a98d88169c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*****************************************************************************
 * Copyright (c) 2011 CEA LIST.
 *    
 * 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:
 *  Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
 *****************************************************************************/
package org.eclipse.papyrus.properties.widgets;

import org.eclipse.swt.widgets.Composite;


public class StringFileSelector extends AbstractPropertyEditor {

	protected org.eclipse.papyrus.widgets.editors.StringFileSelector selector;

	protected String[] filterExtensions, filterNames;

	protected boolean allowWorkspace = true, allowFileSystem = true;

	public StringFileSelector(Composite parent, int style) {
		selector = new org.eclipse.papyrus.widgets.editors.StringFileSelector(parent, style);
		super.setEditor(selector);
	}

	public void setFilterExtensions(String[] filterExtensions) {
		this.filterExtensions = filterExtensions;
		checkFilters();
	}

	public void setFilterNames(String[] filterNames) {
		this.filterNames = filterNames;
		checkFilters();
	}

	protected void checkFilters() {
		if(filterExtensions != null && filterNames != null) {

		}
	}

	public void setAllowWorkspace(boolean allowWorkspace) {
		this.allowWorkspace = allowWorkspace;
		selector.setAllowWorkspace(allowWorkspace);
	}

	public boolean getAllowWorkspace() {
		return allowWorkspace;
	}

	public void setAllowFileSystem(boolean allowFileSystem) {
		this.allowFileSystem = allowFileSystem;
		selector.setAllowFileSystem(allowFileSystem);
	}

	public boolean getAllowFileSystem() {
		return allowFileSystem;
	}
}

Back to the top