1 /* 2 * File: SWTInfoProvider.java 3 * Copyright (c) 2004-2007 Peter Kliem (Peter.Kliem@jaret.de) 4 * A commercial license is available, see http://www.jaret.de. 5 * 6 * All rights reserved. This program and the accompanying materials 7 * are made available under the terms of the Common Public License v1.0 8 * which accompanies this distribution, and is available at 9 * http://www.eclipse.org/legal/cpl-v10.html 10 */ 11 package de.jaret.util.ui.infoprovider; 12 13 import java.util.ArrayList; 14 import java.util.List; 15 16 import org.eclipse.swt.SWT; 17 18 import de.jaret.util.infoprovider.JaretInfoProvider; 19 import de.jaret.util.infoprovider.SysInfoEntry; 20 21 /** 22 * Info provider for swt 23 * 24 * @author Peter Kliem 25 * @version $Id: SWTInfoProvider.java 242 2007-02-11 21:05:07Z olk $ 26 */ 27 public class SWTInfoProvider implements JaretInfoProvider { 28 /* 29 * (non-Javadoc) 30 * 31 * @see de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider#getInfoProviderName() 32 */ 33 public String getInfoProviderName() { 34 return "SWT"; 35 } 36 37 /* 38 * (non-Javadoc) 39 * 40 * @see de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider#getAccess() 41 */ 42 public int getAccess() { 43 return SysInfoEntry.ACCESS_PUBLIC; 44 } 45 46 /* 47 * (non-Javadoc) 48 * 49 * @see de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider#getSysInfoEntries() 50 */ 51 public List<SysInfoEntry> getSysInfoEntries() { 52 List<SysInfoEntry> entries = new ArrayList<SysInfoEntry>(); 53 entries.add(new SysInfoEntry("Platform", SWT.getPlatform())); 54 entries.add(new SysInfoEntry("Version", Integer.toString(SWT.getVersion()))); 55 return entries; 56 } 57 58 /* 59 * (non-Javadoc) 60 * 61 * @see de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider#getSubInfoProviders() 62 */ 63 public List<JaretInfoProvider> getSubInfoProviders() { 64 return null; 65 } 66 67 /* 68 * (non-Javadoc) 69 * 70 * @see de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider#addSubInfoProvider(de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider) 71 */ 72 public void addSubInfoProvider(JaretInfoProvider infoProvider) { 73 throw new RuntimeException("Not implemented"); 74 } 75 76 /* 77 * (non-Javadoc) 78 * 79 * @see de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider#remSubInfoProvider(de.jaret.app.swt.InfoProvider.JaretSystemInfoProvider) 80 */ 81 public void remSubInfoProvider(JaretInfoProvider infoProvider) { 82 } 83 }