本文整理了Java中org.eclipse.swt.widgets.MenuItem.notifyListeners()
方法的一些代码示例,展示了MenuItem.notifyListeners()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MenuItem.notifyListeners()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.MenuItem
类名称:MenuItem
方法名:notifyListeners
暂无
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
public void handleNotifyHelp( MenuItem item ) {
item.notifyListeners( SWT.Help, new Event() );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
void handleAcceleratorActivation() {
if( ( style & SWT.CHECK ) != 0 ) {
selection = !selection;
} else if ( ( style & SWT.RADIO ) != 0 ) {
deselectOtherRadios();
selection = true;
}
notifyListeners( SWT.Selection, new Event() );
}
代码示例来源:origin: org.eclipse.egit/ui
public void handleEvent(Event event) {
if (event.detail == SWT.ARROW) {
Rectangle itemBounds = prefsItem.getBounds();
Point point = toolBar.toDisplay(itemBounds.x, itemBounds.y
+ itemBounds.height);
prefsMenu.setLocation(point);
prefsMenu.setVisible(true);
} else {
switch (store.getInt(UIPreferences.FINDTOOLBAR_FIND_IN)) {
case PREFS_FINDIN_COMMENTS:
commentsItem.notifyListeners(SWT.Selection, null);
break;
case PREFS_FINDIN_AUTHOR:
authorItem.notifyListeners(SWT.Selection, null);
break;
case PREFS_FINDIN_COMMITID:
commitIdItem.notifyListeners(SWT.Selection, null);
break;
case PREFS_FINDIN_COMMITTER:
committerItem.notifyListeners(SWT.Selection, null);
break;
}
}
}
});
代码示例来源:origin: com.eclipsesource.tabris/tabris
private void notifyMenuItemSelected( PageDescriptor pageDescriptor ) {
for( MenuItem item : pageSwitcherMenu.getItems() ) {
Object itemData = item.getData();
if( itemData == pageDescriptor ) {
Event event = new Event();
event.data = DATA_ACTIVATED;
item.notifyListeners( SWT.Selection, event );
break;
}
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
public void handleNotifySelection( MenuItem item, JsonObject properties ) {
Event event = createSelectionEvent( SWT.Selection, properties );
if( ( item.getStyle() & SWT.RADIO ) != 0 && !item.getSelection() ) {
event.time = -1;
}
item.notifyListeners( SWT.Selection, event );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
public void handleNotifyShow( Menu menu ) {
menu.notifyListeners( SWT.Show, new Event() );
for( MenuItem item : menu.getItems() ) {
if( isArmingMenuItem( item ) ) {
item.notifyListeners( SWT.Arm, new Event() );
}
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
private void deselectOtherRadios() {
for( MenuItem item : parent.getItems() ) {
if( item != this && ( item.getStyle() & SWT.RADIO ) != 0 && item.getSelection() ) {
item.setSelection( false );
item.notifyListeners( SWT.Selection, new Event() );
}
}
}
内容来源于网络,如有侵权,请联系作者删除!