ITeye博客

SWT

共 5 篇文章

自定义Composite

package org.soyatec.windows.azure.jdt.ui; import java.io.File; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.…

2010-06-25 16:00 · SWT · Windows · Eclipse · UI

简单判断所选目录是否是jre_home

public static boolean isValidJre(String path) { File jre = new File(path); if (!jre.exists()) return false; File javaExe = StandardVMType.findJavaExecutable(jre); return (javaExe != null && javaExe.exists()); }

2010-06-25 15:56 · SWT · Java · Blog · JVM

简单判断所选目录是否是tomcat目录

public static boolean isValidTomcat(String path) { Path installPath = new Path(path); String id = "org.eclipse.jst.server.tomcat.60"; IStatus status = TomcatPlugin.getInstance() .verifyInstallPathWithFolderCheck(installPath, id); if (status.isOK()) return true; return false; }

2010-06-25 15:51 · SWT · Eclipse · Tomcat

SWT custom HtmlToolTip

public class HtmlTooltip extends BrowserInformationControl{ public final static String APPEARANCE_JAVADOC_FONT= "org.eclipse.jdt.ui.javadocfont"; //$NON-NLS-1$ private static final String fgStyleSheet= "/* Font definitions */\n" + //$NON-NLS-1$ "body, h1, h2, h3, h4, h5, h6, p, table, td, caption, …

2010-06-09 13:17 · SWT · HTML · CSS · Eclipse · UI

实现可编辑的表格TableViewer

package com.soyatec; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.CellEditor; im…

2010-05-10 14:59 · SWT · Eclipse