⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idetailspage.jvt

📁 SWT_designer安装软件
💻 JVT
字号:
import
org.eclipse.jface.viewers.ISelection
org.eclipse.jface.viewers.IStructuredSelection
org.eclipse.swt.SWT
org.eclipse.swt.layout.GridData
org.eclipse.swt.layout.GridLayout
org.eclipse.swt.widgets.Composite
org.eclipse.ui.forms.IDetailsPage
org.eclipse.ui.forms.IFormPart
org.eclipse.ui.forms.IManagedForm
org.eclipse.ui.forms.widgets.ExpandableComposite
org.eclipse.ui.forms.widgets.FormToolkit
org.eclipse.ui.forms.widgets.Section

field
	private IManagedForm managedForm;


method
	/**
	 * Create the details page
	 */
	public %TypeName% () {
		// Create the details page
	}

method
	/**
	 * Initialize the details page
	 * @param form
	 */
	public void initialize(IManagedForm form) {
		%this%managedForm = form;
	}

method
	/**
	 * Create contents of the details page
	 * @param parent
	 */
	public void createContents(Composite parent) {
		FormToolkit toolkit = %this%managedForm.getToolkit();
		final GridLayout gridLayout = new GridLayout();
		gridLayout.marginWidth = 0;
		gridLayout.marginHeight = 0;
		parent.setLayout(gridLayout);
		
		final Section section = toolkit.createSection(parent, 
			ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR);
		section.setLayoutData(new GridData(GridData.FILL_BOTH));
		section.setText("Empty Section");
	
		final Composite composite = toolkit.createComposite(section, SWT.NONE);
		toolkit.paintBordersFor(composite);
		section.setClient(composite);
	}

method
	public void dispose() {
		// Dispose
	}

method
	public void setFocus() {
		// Set focus
	}

method
	private void update() {
		// Update
	}

method
	public boolean setFormInput(Object input) {
		return false;
	}

method
	public void selectionChanged(IFormPart part, ISelection selection) {
		IStructuredSelection structuredSelection = (IStructuredSelection) selection;
		update();
	}

method
	public void commit(boolean onSave) {
		// Commit
	}

method
	public boolean isDirty() {
		return false;
	}

method
	public boolean isStale() {
		return false;
	}

method
	public void refresh() {
		update();
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -