private static boolean isSeparator( ToolItem item ) { return ( item.getStyle() & SWT.SEPARATOR ) != 0; }
private static ToolItemDelegateLCA getLCADelegate( final Widget widget ) { ToolItemDelegateLCA result; int style = ( ( ToolItem )widget ).getStyle(); if( ( style & SWT.CHECK ) != 0 ) { result = CHECK; } else if( ( style & SWT.PUSH ) != 0 ) { result = PUSH; } else if( ( style & SWT.SEPARATOR ) != 0 ) { result = SEPERATOR; } else if( ( style & SWT.DROP_DOWN ) != 0 ) { result = DROP_DOWN; } else if( ( style & SWT.RADIO ) != 0 ) { result = RADIO; } else { result = PUSH; } return result; } }
@Override public int getLength() { ToolItem item = getToolItem(); return (item.getStyle() & SWT.SEPARATOR) == SWT.SEPARATOR && item.getControl() != null ? 1 : 0; }
public int getLength() { ToolItem item = getToolItem(); return (item.getStyle() & SWT.SEPARATOR) == SWT.SEPARATOR && item.getControl() != null ? 1 : 0; } }
boolean isTabGroup () { ToolItem [] tabList = parent._getTabItemList (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { if (tabList [i] == this) return true; } } if ((style & SWT.SEPARATOR) != 0) return true; int index = parent.indexOf (this); if (index == 0) return true; ToolItem previous = parent.getItem (index - 1); return (previous.getStyle () & SWT.SEPARATOR) != 0; }
@Override public Node item(int index) { ToolItem item = getToolItem(); if ((item.getStyle() & SWT.SEPARATOR) == SWT.SEPARATOR) { Object control = item.getControl(); if (control != null) { return getElement(control); } } return null; }
boolean isTabGroup () { ToolItem [] tabList = parent._getTabItemList (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { if (tabList [i] == this) return true; } } if ((style & SWT.SEPARATOR) != 0) return true; int index = parent.indexOf (this); if (index == 0) return true; ToolItem previous = parent.getItem (index - 1); return (previous.getStyle () & SWT.SEPARATOR) != 0; }
public Node item(int index) { ToolItem item = getToolItem(); if ((item.getStyle() & SWT.SEPARATOR) == SWT.SEPARATOR) { Object control = item.getControl(); if (control != null) { return getElement(control); } } return null; }
boolean isTabGroup () { ToolItem [] tabList = parent._getTabItemList (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { if (tabList [i] == this) return true; } } if ((style & SWT.SEPARATOR) != 0) return true; int index = parent.indexOf (this); if (index == 0) return true; ToolItem previous = parent.getItem (index - 1); return (previous.getStyle () & SWT.SEPARATOR) != 0; }
boolean isTabGroup () { ToolItem [] tabList = parent._getTabItemList (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { if (tabList [i] == this) return true; } } if ((style & SWT.SEPARATOR) != 0) return true; int index = parent.indexOf (this); if (index == 0) return true; ToolItem previous = parent.getItem (index - 1); return (previous.getStyle () & SWT.SEPARATOR) != 0; }
boolean hasOnlySeparators(ToolBar toolbar) { ToolItem[] children = toolbar.getItems(); for (ToolItem toolItem : children) { if ((toolItem.getStyle() & SWT.SEPARATOR) == 0) { return false; } else if (toolItem.getControl() != null && toolItem.getControl().getData(OWNING_ME) instanceof MToolControl) { return false; } } return true; }
boolean hasOnlySeparators(ToolBar toolbar) { ToolItem[] children = toolbar.getItems(); for (ToolItem toolItem : children) { if ((toolItem.getStyle() & SWT.SEPARATOR) == 0) { return false; } else if (toolItem.getControl() != null && toolItem.getControl().getData(OWNING_ME) instanceof MToolControl) { return false; } } return true; }
boolean hasOnlySeparators(ToolBar toolbar) { ToolItem[] children = toolbar.getItems(); for (ToolItem toolItem : children) { if ((toolItem.getStyle() & SWT.SEPARATOR) == 0) { return false; } else if (toolItem.getControl() != null && toolItem.getControl().getData(OWNING_ME) instanceof MToolControl) { return false; } } return true; }
public void handleNotifySelection( ToolItem item, JsonObject properties ) { Event event = createSelectionEvent( SWT.Selection, properties ); if( ( item.getStyle() & SWT.RADIO ) != 0 && !item.getSelection() ) { event.time = -1; } if( event.detail == SWT.ARROW ) { event.setBounds( getBounds( item ) ); } item.notifyListeners( SWT.Selection, event ); }
ToolBar toolBar = (ToolBar) control; final ToolItem item = toolBar.getItem(childID); if (item != null && (item.getStyle() & SWT.DROP_DOWN) != 0) { int /*long*/[] addr = new int /*long*/[1]; COM.MoveMemory(addr, ppdispChild, OS.PTR_SIZEOF);
new MenuItem (menu, SWT.SEPARATOR); } else { if ((tool.getStyle() & SWT.DROP_DOWN) != 0) { MenuItem menuItem = new MenuItem (menu, SWT.CASCADE); menuItem.setImage(image);