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

📄 applicationwindow_toolbar.jvt

📁 SWT_designer安装软件
💻 JVT
字号:
import
org.eclipse.jface.action.MenuManager
org.eclipse.jface.action.StatusLineManager
org.eclipse.jface.action.ToolBarManager
org.eclipse.jface.window.ApplicationWindow
org.eclipse.swt.SWT
org.eclipse.swt.graphics.Point
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Display
org.eclipse.swt.widgets.Shell

method
	/**
	 * Create the application window
	 */
	public %TypeName% () {
		super(null);
		createActions();
		addToolBar(SWT.FLAT | SWT.WRAP);
		addMenuBar();
		addStatusLine();
	}

method
	/**
	 * Create contents of the application window
	 * @param parent
	 */
	@Override
	protected Control createContents(Composite parent) {
		Composite container = new Composite(parent, SWT.NONE);
		%SWTContainerLayout%
		return container;
	}

method
	/**
	 * Create the actions
	 */
	private void createActions() {
		// Create the actions
	}

method
	/**
	 * Create the menu manager
	 * @return the menu manager
	 */
	@Override
	protected MenuManager createMenuManager() {
		MenuManager menuManager = new MenuManager("menu");
		return menuManager;
	}

method
	/**
	 * Create the toolbar manager
	 * @return the toolbar manager
	 */
	@Override
	protected ToolBarManager createToolBarManager(int style) {
		ToolBarManager toolBarManager = new ToolBarManager(style);
		return toolBarManager;
	}

method
	/**
	 * Create the status line manager
	 * @return the status line manager
	 */
	@Override
	protected StatusLineManager createStatusLineManager() {
		StatusLineManager statusLineManager = new StatusLineManager();
		statusLineManager.setMessage(null, "");
		return statusLineManager;
	}

method
	/**
	 * Launch the application
	 * @param args
	 */
	public static void main(String args[]) {
		try {
			%TypeName% window = new %TypeName%();
			window.setBlockOnOpen(true);
			window.open();
			Display.getCurrent().dispose();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

method
	/**
	 * Configure the shell
	 * @param newShell
	 */
	@Override
	protected void configureShell(Shell newShell) {
		super.configureShell(newShell);
		newShell.setText("New Application");
	}

method
	/**
	 * Return the initial size of the window
	 */
	@Override
    protected Point getInitialSize() {
        return new Point(%DefaultFormSize%);
    }

⌨️ 快捷键说明

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