Java Code Examples for org.eclipse.nebula.widgets.grid.GridItem#fireEvent()
The following examples show how to use
org.eclipse.nebula.widgets.grid.GridItem#fireEvent() .
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: CellRenderer.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ public boolean notify(int event, Point point, Object value) { GridItem item = (GridItem) value; if (isCheck()) { if (event == IInternalWidget.MouseMove) { if (overCheck(item, point)) { setHoverDetail("check"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overCheck(item, point)) { if (!item.getCheckable(getColumn())) { return false; } item.setChecked(getColumn(), !item.getChecked(getColumn())); item.getParent().redraw(); item.fireCheckEvent(getColumn()); return true; } } } if (isTree() && item.hasChildren()) { if (event == IInternalWidget.MouseMove) { if (overToggle(item, point)) { setHoverDetail("toggle"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overToggle(item, point)) { item.setExpanded(!item.isExpanded()); item.getParent().redraw(); if (item.isExpanded()) { item.fireEvent(SWT.Expand); } else { item.fireEvent(SWT.Collapse); } return true; } } } return false; }
Example 2
Source File: TBSearchCellRenderer.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ public boolean notify(int event, Point point, Object value) { GridItem item = (GridItem) value; if (isCheck()) { if (event == IInternalWidget.MouseMove) { if (overCheck(item, point)) { setHoverDetail("check"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overCheck(item, point)) { if (!item.getCheckable(getColumn())) { return false; } item.setChecked(getColumn(), !item.getChecked(getColumn())); item.getParent().redraw(); item.fireCheckEvent(getColumn()); return true; } } } if (isTree() && item.hasChildren()) { if (event == IInternalWidget.MouseMove) { if (overToggle(item, point)) { setHoverDetail("toggle"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overToggle(item, point)) { item.setExpanded(!item.isExpanded()); item.getParent().redraw(); if (item.isExpanded()) { item.fireEvent(SWT.Expand); } else { item.fireEvent(SWT.Collapse); } return true; } } } return false; }
Example 3
Source File: DefaultCellRenderer.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ public boolean notify(int event, Point point, Object value) { GridItem item = (GridItem)value; if (isCheck()) { if (event == IInternalWidget.MouseMove) { if (overCheck(item, point)) { setHoverDetail("check"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overCheck(item, point)) { if (!item.getCheckable(getColumn())) { return false; } item.setChecked(getColumn(), !item.getChecked(getColumn())); item.getParent().redraw(); item.fireCheckEvent(getColumn()); return true; } } } if (isTree() && item.hasChildren()) { if (event == IInternalWidget.MouseMove) { if (overToggle(item, point)) { setHoverDetail("toggle"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overToggle(item, point)) { item.setExpanded(!item.isExpanded()); item.getParent().redraw(); if (item.isExpanded()) { item.fireEvent(SWT.Expand); } else { item.fireEvent(SWT.Collapse); } return true; } } } return false; }
Example 4
Source File: CellRenderer.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ public boolean notify(int event, Point point, Object value) { GridItem item = (GridItem) value; if (isCheck()) { if (event == IInternalWidget.MouseMove) { if (overCheck(item, point)) { setHoverDetail("check"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overCheck(item, point)) { if (!item.getCheckable(getColumn())) { return false; } item.setChecked(getColumn(), !item.getChecked(getColumn())); item.getParent().redraw(); item.fireCheckEvent(getColumn()); return true; } } } if (isTree() && item.hasChildren()) { if (event == IInternalWidget.MouseMove) { if (overToggle(item, point)) { setHoverDetail("toggle"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overToggle(item, point)) { item.setExpanded(!item.isExpanded()); item.getParent().redraw(); if (item.isExpanded()) { item.fireEvent(SWT.Expand); } else { item.fireEvent(SWT.Collapse); } return true; } } } return false; }
Example 5
Source File: TBSearchCellRenderer.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ public boolean notify(int event, Point point, Object value) { GridItem item = (GridItem) value; if (isCheck()) { if (event == IInternalWidget.MouseMove) { if (overCheck(item, point)) { setHoverDetail("check"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overCheck(item, point)) { if (!item.getCheckable(getColumn())) { return false; } item.setChecked(getColumn(), !item.getChecked(getColumn())); item.getParent().redraw(); item.fireCheckEvent(getColumn()); return true; } } } if (isTree() && item.hasChildren()) { if (event == IInternalWidget.MouseMove) { if (overToggle(item, point)) { setHoverDetail("toggle"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overToggle(item, point)) { item.setExpanded(!item.isExpanded()); item.getParent().redraw(); if (item.isExpanded()) { item.fireEvent(SWT.Expand); } else { item.fireEvent(SWT.Collapse); } return true; } } } return false; }
Example 6
Source File: DefaultCellRenderer.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ public boolean notify(int event, Point point, Object value) { GridItem item = (GridItem)value; if (isCheck()) { if (event == IInternalWidget.MouseMove) { if (overCheck(item, point)) { setHoverDetail("check"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overCheck(item, point)) { if (!item.getCheckable(getColumn())) { return false; } item.setChecked(getColumn(), !item.getChecked(getColumn())); item.getParent().redraw(); item.fireCheckEvent(getColumn()); return true; } } } if (isTree() && item.hasChildren()) { if (event == IInternalWidget.MouseMove) { if (overToggle(item, point)) { setHoverDetail("toggle"); return true; } } if (event == IInternalWidget.LeftMouseButtonDown) { if (overToggle(item, point)) { item.setExpanded(!item.isExpanded()); item.getParent().redraw(); if (item.isExpanded()) { item.fireEvent(SWT.Expand); } else { item.fireEvent(SWT.Collapse); } return true; } } } return false; }