Java Code Examples for org.eclipse.swt.widgets.Widget#isDisposed()
The following examples show how to use
org.eclipse.swt.widgets.Widget#isDisposed() .
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: GridTableViewer.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected void doUpdateItem(Widget widget, Object element, boolean fullMap) { super.doUpdateItem(widget, element, fullMap); updateRowHeader(widget); if (autoPreferredHeight && !widget.isDisposed()) ((GridItem) widget).pack(); }
Example 2
Source File: GridTableViewer.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** {@inheritDoc} */ protected void doUpdateItem(Widget widget, Object element, boolean fullMap) { super.doUpdateItem(widget, element, fullMap); updateRowHeader(widget); if (autoPreferredHeight && !widget.isDisposed()) ((GridItem) widget).pack(); }
Example 3
Source File: GridTableViewer.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void doUpdateItem(Widget widget, Object element, boolean fullMap) { super.doUpdateItem(widget, element, fullMap); updateRowHeader(widget); if (autoPreferredHeight && !widget.isDisposed()) ((GridItem) widget).pack(); }
Example 4
Source File: GridTableViewer.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void doUpdateItem(Widget widget, Object element, boolean fullMap) { super.doUpdateItem(widget, element, fullMap); updateRowHeader(widget); if (autoPreferredHeight && !widget.isDisposed()) ((GridItem) widget).pack(); }
Example 5
Source File: ContractInputController.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override public void run() { if (viewer != null && viewer.getControl() != null && !viewer.getControl().isDisposed()) { viewer.setSelection(new StructuredSelection(input), false); final Widget item = viewer.testFindItem(input); if(item != null && !item.isDisposed()){ viewer.reveal(input); viewer.editElement(input, NAME_COLUMN_INDEX); } } }
Example 6
Source File: JobGraph.java From pentaho-kettle with Apache License 2.0 | 5 votes |
private boolean controlDisposed( XulToolbarbutton button ) { if ( button.getManagedObject() instanceof Widget ) { Widget widget = (Widget) button.getManagedObject(); return widget.isDisposed(); } return false; }
Example 7
Source File: TransGraph.java From pentaho-kettle with Apache License 2.0 | 5 votes |
private boolean controlDisposed( XulToolbarbutton button ) { if ( button.getManagedObject() instanceof Widget ) { Widget widget = (Widget) button.getManagedObject(); return widget.isDisposed(); } return false; }
Example 8
Source File: Utilities.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public static boolean okToUse(Widget widget) { return widget != null && !widget.isDisposed(); }
Example 9
Source File: WidgetHelper.java From swt-bling with MIT License | 4 votes |
public static boolean isWidgetSafe(Widget widget) { return widget != null && !widget.isDisposed(); }
Example 10
Source File: UIUtils.java From n4js with Eclipse Public License 1.0 | 2 votes |
/** * Disposes the widget argument. Has no effect if the widget argument is either {@code null} or already * {@link Widget#isDisposed() disposed}. * * @param widget * the widget to dispose. Optional, can be {@code null}. */ public static void dispose(final Widget widget) { if (null != widget && !widget.isDisposed()) { widget.dispose(); } }
Example 11
Source File: Helper.java From APICloud-Studio with GNU General Public License v3.0 | 2 votes |
/** * Returns whether the widget is <code>null</code> or disposed. * * @param widget the widget to check * @return <code>true</code> if the widget is neither <code>null</code> nor disposed */ public static boolean okToUse(Widget widget) { return (widget != null && !widget.isDisposed()); }