org.eclipse.swt.widgets.MenuItem.getStyle()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.eclipse.swt.widgets.MenuItem.getStyle()方法的一些代码示例,展示了MenuItem.getStyle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MenuItem.getStyle()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.MenuItem
类名称:MenuItem
方法名:getStyle

暂无

代码示例

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

private static boolean isArmingMenuItem( MenuItem item ) {
 return ( item.getStyle() & ( SWT.PUSH | SWT.CASCADE | SWT.CHECK | SWT.RADIO ) ) != 0;
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07

private static MenuItemDelegateLCA getDelegateLCA( final MenuItem menuItem ) 
 {
  MenuItemDelegateLCA result;
  if( isTopLevelMenuBarItem( menuItem ) ) {
   result = BAR_MENU_ITEM_LCA;
  } else if( ( menuItem.getStyle() & ( SWT.PUSH | SWT.CASCADE ) ) != 0 ) { 
   result = PUSH_MENU_ITEM_LCA;
  } else if( ( menuItem.getStyle() & SWT.CHECK ) != 0 ) {
   result = CHECK_MENU_ITEM_LCA;
  } else if( ( menuItem.getStyle() & SWT.RADIO ) != 0 ) {
   result = RADIO_MENU_ITEM_LCA;
  } else if( ( menuItem.getStyle() & SWT.SEPARATOR ) != 0 ) {
   result = SEPARATOR_MENU_ITEM_LCA;
  } else {
   throw new IllegalStateException( "Unknown menu item type." );
  }
  return result;
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07

void renderInitialization( final MenuItem menuItem ) throws IOException {
 String type = ( menuItem.getStyle() & SWT.CASCADE ) != 0 ? ITEM_TYPE_CASCADE : ITEM_TYPE_PUSH;
 MenuItemLCAUtil.newItem( menuItem, "org.eclipse.rwt.widgets.MenuItem", type );
}

代码示例来源: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: BiglySoftware/BiglyBT

protected void addMenuItemListener(Menu menu, Listener l) {
  for (MenuItem item : menu.getItems()) {
    if (item.getStyle() == SWT.CASCADE) {
      addMenuItemListener(item.getMenu(), l);
    } else {
      item.addListener(SWT.Selection, l);
    }
  }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

private static void renderMnemonicIndex( MenuItem item ) {
 if( ( item.getStyle() & SWT.SEPARATOR ) == 0 ) {
  String text = item.getText();
  if( WidgetLCAUtil.hasChanged( item, PROP_TEXT, text, "" ) ) {
   int mnemonicIndex = MnemonicUtil.findMnemonicCharacterIndex( text );
   if( mnemonicIndex != -1 ) {
    getRemoteObject( item ).set( PROP_MNEMONIC_INDEX, mnemonicIndex );
   }
  }
 }
}

代码示例来源: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() );
  }
 }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

int /*long*/ createShellLink (MenuItem item, String directory) {
  int style = item.getStyle ();
  if ((style & SWT.CASCADE) != 0) return 0;
  int /*long*/ [] ppv = new int /*long*/ [1];

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

if ((item.getStyle () & SWT.CASCADE) != 0) {
  Menu subMenu = item.getMenu ();
  if (subMenu != null) {

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

for (int i = 0; i < items.length; i++) {
  final MenuItem realItem = items[i];
  final MenuItem proxyItem = new MenuItem(proxy, realItem.getStyle());
  proxyItem.setData(realItem);
  proxyItem.setAccelerator(realItem.getAccelerator());

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

final MenuItem proxyItem = new MenuItem(proxy, realItem.getStyle());
proxyItem.setData(realItem);
proxyItem.setAccelerator(realItem.getAccelerator());

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

for (int i = 0; i < items.length; i++) {
  final MenuItem realItem = items[i];
  final MenuItem proxyItem = new MenuItem(proxy, realItem.getStyle());
  proxyItem.setData(realItem);
  proxyItem.setAccelerator(realItem.getAccelerator());

相关文章