Java Code Examples for org.eclipse.swt.widgets.List#setVisible()
The following examples show how to use
org.eclipse.swt.widgets.List#setVisible() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KbdMacroListEditor.java From e4macs with Eclipse Public License 1.0 | 6 votes |
/** * @see Dialog#createDialogArea(Composite) */ protected Control createDialogArea(Composite parent) { Composite result = new Composite(parent, SWT.NONE); result.setLayout(new GridLayout()); result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); macList = new List(result, SWT.BORDER | SWT.MULTI ); macList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); if (macroArray != null){ for (int i=0; i< macroArray.size(); i++){ macList.add(getLabel(macroArray.get(i))); } macList.pack(true); macList.computeSize(SWT.DEFAULT, SWT.DEFAULT); macList.setVisible(true); } result.setVisible(true); macList.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { macList = null; } }); return result; }
Example 2
Source File: CommandCategoryEditor.java From e4macs with Eclipse Public License 1.0 | 6 votes |
/** * @see Dialog#createDialogArea(Composite) */ protected Control createDialogArea(Composite parent) { Composite result = new Composite(parent, SWT.NONE); result.setLayout(new GridLayout()); result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); catList = new List(result, SWT.BORDER | SWT.MULTI ); catList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); if (categoryArray != null){ for (int i=0; i< categoryArray.size(); i++){ catList.add(getLabel(categoryArray.get(i))); } catList.pack(true); catList.computeSize(SWT.DEFAULT, SWT.DEFAULT); catList.setVisible(true); } result.setVisible(true); catList.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { catList = null; } }); return result; }