Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java144
1 files changed, 72 insertions, 72 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index ccfa08c883..871d7c2716 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -159,19 +159,19 @@ TreeItem _getItem (TreeItem parentItem, int index, boolean create) {
return item;
}
-boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+boolean acceptsFirstResponder (long /*int*/ id, long /*int*/ sel) {
return true;
}
-int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
- int /*long*/ returnValue = 0;
+long /*int*/ accessibilityAttributeValue(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
+ long /*int*/ returnValue = 0;
NSString attributeName = new NSString(arg0);
// If the check column is visible, don't report it back as a column for accessibility purposes.
// The check column is meant to appear as a part of the first column.
if (attributeName.isEqualToString (OS.NSAccessibilityColumnsAttribute) || attributeName.isEqualToString(OS.NSAccessibilityVisibleColumnsAttribute)) {
if ((style & SWT.CHECK) != 0) {
- int /*long*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+ long /*int*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
if (superValue != 0) {
NSArray columns = new NSArray(superValue);
NSMutableArray columnsWithoutCheck = NSMutableArray.arrayWithCapacity(columns.count() - 1);
@@ -267,17 +267,17 @@ int calculateWidth (TreeItem[] items, int index, GC gc, boolean recurse) {
return width;
}
-NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
+NSSize cellSize (long /*int*/ id, long /*int*/ sel) {
NSSize size = super.cellSize(id, sel);
NSCell cell = new NSCell(id);
NSImage image = cell.image();
if (image != null) size.width += imageBounds.width + IMAGE_GAP;
if (hooks(SWT.MeasureItem)) {
- int /*long*/ [] outValue = new int /*long*/ [1];
+ long /*int*/ [] outValue = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
TreeItem item = (TreeItem) display.getWidget (outValue [0]);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- int /*long*/ tableColumn = outValue[0];
+ long /*int*/ tableColumn = outValue[0];
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -290,13 +290,13 @@ NSSize cellSize (int /*long*/ id, int /*long*/ sel) {
return size;
}
-boolean canDragRowsWithIndexes_atPoint(int /*long*/ id, int /*long*/ sel, int /*long*/ rowIndexes, NSPoint mouseDownPoint) {
+boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /*int*/ rowIndexes, NSPoint mouseDownPoint) {
if (!super.canDragRowsWithIndexes_atPoint(id, sel, rowIndexes, mouseDownPoint)) return false;
// If the current row is not selected and the user is not attempting to modify the selection, select the row first.
NSTableView widget = (NSTableView)view;
- int /*long*/ row = widget.rowAtPoint(mouseDownPoint);
- int /*long*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
+ long /*int*/ row = widget.rowAtPoint(mouseDownPoint);
+ long /*int*/ modifiers = NSApplication.sharedApplication().currentEvent().modifierFlags();
boolean drag = (state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect);
if (drag) {
@@ -454,7 +454,7 @@ void clearCachedWidth (TreeItem[] items) {
}
}
-void collapseItem_collapseChildren (int /*long*/ id, int /*long*/ sel, int /*long*/ itemID, boolean children) {
+void collapseItem_collapseChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ itemID, boolean children) {
TreeItem item = (TreeItem)display.getWidget(itemID);
if (item == null) return;
if (!ignoreExpand) item.sendExpand (false, children);
@@ -465,7 +465,7 @@ void collapseItem_collapseChildren (int /*long*/ id, int /*long*/ sel, int /*lon
setScrollWidth ();
}
-int /*long*/ columnAtPoint(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {
if ((style & SWT.CHECK) != 0) {
if (point.x <= getCheckColumnWidth() && point.y < headerView.frame().height) return 1;
}
@@ -589,7 +589,7 @@ void createHandle () {
widget.setOutlineTableColumn (checkColumn);
checkColumn.setResizingMask (OS.NSTableColumnNoResizing);
checkColumn.setEditable (false);
- int /*long*/ cls = NSButton.cellClass (); /* use our custom cell class */
+ long /*int*/ cls = NSButton.cellClass (); /* use our custom cell class */
buttonCell = new NSButtonCell (OS.class_createInstance (cls, 0));
buttonCell.init ();
checkColumn.setDataCell (buttonCell);
@@ -753,7 +753,7 @@ Color defaultForeground () {
return display.getWidgetColor (SWT.COLOR_LIST_FOREGROUND);
}
-void deselectAll(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void deselectAll(long /*int*/ id, long /*int*/ sel, long /*int*/ sender) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() != -1) return;
@@ -761,7 +761,7 @@ void deselectAll(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
super.deselectAll (id, sel, sender);
}
-void deselectRow (int /*long*/ id, int /*long*/ sel, int /*long*/ index) {
+void deselectRow (long /*int*/ id, long /*int*/ sel, long /*int*/ index) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
if ( ((NSTableView)view).selectedRow() == index) return;
@@ -814,7 +814,7 @@ public void deselect (TreeItem item) {
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
NSOutlineView widget = (NSOutlineView)view;
- int /*long*/ row = widget.rowForItem(item.handle);
+ long /*int*/ row = widget.rowForItem(item.handle);
ignoreSelect = true;
widget.deselectRow (row);
ignoreSelect = false;
@@ -911,7 +911,7 @@ void destroyItem (TreeColumn column) {
NSArray array = ((NSOutlineView)view).tableColumns ();
int arraySize = (int)/*64*/array.count ();
for (int i = oldIndex; i < arraySize; i++) {
- int /*long*/ columnId = array.objectAtIndex (i).id;
+ long /*int*/ columnId = array.objectAtIndex (i).id;
for (int j = 0; j < columnCount; j++) {
if (columns[j].nsColumn.id == columnId) {
columns [j].sendEvent (SWT.Move);
@@ -964,13 +964,13 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
return false;
}
-void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawBackgroundInClipRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
super.drawViewBackgroundInRect(id, sel, rect);
if (id != view.id) return;
fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
}
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rect, int /*long*/ view) {
+void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rect, long /*int*/ view) {
boolean hooksErase = hooks (SWT.EraseItem);
boolean hooksPaint = hooks (SWT.PaintItem);
boolean hooksMeasure = hooks (SWT.MeasureItem);
@@ -978,14 +978,14 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
NSTextFieldCell cell = new NSTextFieldCell (id);
NSOutlineView widget = (NSOutlineView)this.view;
- int /*long*/ [] outValue = new int /*long*/ [1];
+ long /*int*/ [] outValue = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
TreeItem item = (TreeItem) display.getWidget (outValue [0]);
if (item == null) return;
- int /*long*/ rowIndex = widget.rowForItem(item.handle);
+ long /*int*/ rowIndex = widget.rowForItem(item.handle);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
- int /*long*/ tableColumn = outValue[0];
- int /*long*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
+ long /*int*/ tableColumn = outValue[0];
+ long /*int*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));
int columnIndex = 0;
for (int i=0; i<columnCount; i++) {
if (columns [i].nsColumn.id == tableColumn) {
@@ -1022,7 +1022,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
NSRect rowRect = widget.rectOfRow (rowIndex);
cellRect.width = rowRect.width;
}
- float /*double*/ offsetX = 0, offsetY = 0;
+ double /*float*/ offsetX = 0, offsetY = 0;
if (hooksPaint || hooksErase) {
NSRect frameCell = widget.frameOfCellAtColumn(nsColumnIndex, rowIndex);
offsetX = rect.x - frameCell.x;
@@ -1104,7 +1104,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
if (drawBackground && !drawSelection) {
context.saveGraphicsState ();
- float /*double*/ [] colorRGB = background.handle;
+ double /*float*/ [] colorRGB = background.handle;
NSColor color = NSColor.colorWithDeviceRed (colorRGB[0], colorRGB[1], colorRGB[2], 1f);
color.setFill ();
NSBezierPath.fillRect (cellRect);
@@ -1158,7 +1158,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
* foreground color to black when the cell is highlighted. The text
* still draws white. The fix is to draw the text and not call super.
*/
- float /*double*/ [] color = userForeground.handle;
+ double /*float*/ [] color = userForeground.handle;
if (color[0] == 0 && color[1] == 0 && color[2] == 0 && color[3] == 1) {
NSMutableAttributedString newStr = new NSMutableAttributedString(cell.attributedStringValue().mutableCopy());
NSRange range = new NSRange();
@@ -1241,13 +1241,13 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
}
}
-void drawWithExpansionFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellFrame, int /*long*/ view) {
+void drawWithExpansionFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect cellFrame, long /*int*/ view) {
drawExpansion = true;
super.drawWithExpansionFrame_inView(id, sel, cellFrame, view);
drawExpansion = false;
}
-void expandItem_expandChildren (int /*long*/ id, int /*long*/ sel, int /*long*/ itemID, boolean children) {
+void expandItem_expandChildren (long /*int*/ id, long /*int*/ sel, long /*int*/ itemID, boolean children) {
TreeItem item = (TreeItem)display.getWidget(itemID);
if (item == null) return;
if (!ignoreExpand) item.sendExpand (true, children);
@@ -1266,7 +1266,7 @@ void expandItem_expandChildren (int /*long*/ id, int /*long*/ sel, int /*long*/
setScrollWidth (false, item.items, true);
}
-NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ view) {
+NSRect expansionFrameWithFrame_inView(long /*int*/ id, long /*int*/ sel, NSRect cellRect, long /*int*/ view) {
if (toolTipText == null) {
NSRect rect = super.expansionFrameWithFrame_inView(id, sel, cellRect, view);
NSCell cell = new NSCell(id);
@@ -1314,7 +1314,7 @@ Widget findTooltip (NSPoint pt) {
NSTableHeaderView headerView = widget.headerView();
if (headerView != null) {
pt = headerView.convertPoint_fromView_ (pt, null);
- int /*long*/ index = headerView.columnAtPoint (pt);
+ long /*int*/ index = headerView.columnAtPoint (pt);
if (index != -1) {
NSArray nsColumns = widget.tableColumns ();
id nsColumn = nsColumns.objectAtIndex (index);
@@ -1745,7 +1745,7 @@ public TreeItem [] getSelection () {
}
NSIndexSet selection = widget.selectedRowIndexes ();
int count = (int)/*64*/selection.count ();
- int /*long*/ [] indexBuffer = new int /*long*/ [count];
+ long /*int*/ [] indexBuffer = new long /*int*/ [count];
selection.getIndexes (indexBuffer, count, 0);
TreeItem [] result = new TreeItem [count];
for (int i=0; i<count; i++) {
@@ -1837,13 +1837,13 @@ public TreeItem getTopItem () {
point.x = rect.x;
point.y = rect.y;
NSOutlineView outlineView = (NSOutlineView)view;
- int /*long*/ index = outlineView.rowAtPoint (point);
+ long /*int*/ index = outlineView.rowAtPoint (point);
if (index == -1) return null; /* empty */
id item = outlineView.itemAtRow (index);
return (TreeItem)display.getWidget (item.id);
}
-NSRect headerRectOfColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ column) {
+NSRect headerRectOfColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ column) {
if ((style & SWT.CHECK) == 0) return callSuperRect(id, sel, column);
if (column == 0) {
@@ -1861,7 +1861,7 @@ NSRect headerRectOfColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ colum
return callSuperRect(id, sel, column);
}
-void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {
+void highlightSelectionInClipRect(long /*int*/ id, long /*int*/ sel, long /*int*/ rect) {
if (hooks (SWT.EraseItem)) return;
if ((style & SWT.HIDE_SELECTION) != 0 && !hasFocus()) return;
NSRect clipRect = new NSRect ();
@@ -1869,7 +1869,7 @@ void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*
callSuper (id, sel, clipRect);
}
-int /*long*/ hitTestForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event, NSRect rect, int /*long*/ controlView) {
+long /*int*/ hitTestForEvent (long /*int*/ id, long /*int*/ sel, long /*int*/ event, NSRect rect, long /*int*/ controlView) {
/*
* For some reason, the cell class needs to implement hitTestForEvent:inRect:ofView:,
* otherwise the double action selector is not called properly.
@@ -1877,13 +1877,13 @@ int /*long*/ hitTestForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ ev
return callSuper(id, sel, event, rect, controlView);
}
-int /*long*/ image (int /*long*/ id, int /*long*/ sel) {
- int /*long*/ [] image = new int /*long*/ [1];
+long /*int*/ image (long /*int*/ id, long /*int*/ sel) {
+ long /*int*/ [] image = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_IMAGE, image);
return image[0];
}
-NSRect imageRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect imageRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
cellFrame.x += IMAGE_GAP;
@@ -1966,12 +1966,12 @@ boolean isTrim (NSView view) {
return view.id == headerView.id;
}
-void keyDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
ignoreSelect = preventSelect = false;
super.keyDown(id, sel, theEvent);
}
-int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+long /*int*/ menuForEvent(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (id != headerView.id) {
/*
* Feature in Cocoa: Table views do not change the selection when the user
@@ -1986,7 +1986,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
// select the row that was clicked before showing the menu for the event
NSPoint mousePoint = view.convertPoint_fromView_(event.locationInWindow(), null);
- int /*long*/ row = tree.rowAtPoint(mousePoint);
+ long /*int*/ row = tree.rowAtPoint(mousePoint);
// figure out if the row that was just clicked on is currently selected
if (selectedRowIndexes.containsIndex(row) == false) {
@@ -2001,7 +2001,7 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
return super.menuForEvent(id, sel, theEvent);
}
-void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown (long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
if (id == view.id) {
// Bug/feature in Cocoa: If the tree has a context menu we just set it visible instead of returning
// it from menuForEvent:. This has the side effect, however, of sending control-click to the NSTableView,
@@ -2012,7 +2012,7 @@ void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
super.mouseDown(id, sel, theEvent);
}
-void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDownSuper(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) {
ignoreSelect = preventSelect = false;
boolean check = false;
NSEvent nsEvent = new NSEvent(theEvent);
@@ -2049,7 +2049,7 @@ void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
didSelect = false;
}
-boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
+boolean needsPanelToBecomeKey (long /*int*/ id, long /*int*/ sel) {
return false;
}
@@ -2059,7 +2059,7 @@ boolean needsPanelToBecomeKey (int /*long*/ id, int /*long*/ sel) {
* to momentarily appear while clicking on the checkbox. To avoid this,
* override [NSCell nextState] to go directly to the desired state.
*/
-int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
+long /*int*/ nextState (long /*int*/ id, long /*int*/ sel) {
NSOutlineView outlineView = (NSOutlineView)view;
int index = (int)/*64*/outlineView.clickedRow();
if (index == -1) index = (int)/*64*/outlineView.selectedRow ();
@@ -2070,19 +2070,19 @@ int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
return item.checked ? OS.NSOffState : OS.NSOnState;
}
-int /*long*/ outlineView_child_ofItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ itemID) {
+long /*int*/ outlineView_child_ofItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ index, long /*int*/ itemID) {
TreeItem parent = (TreeItem) display.getWidget (itemID);
TreeItem item = _getItem (parent, (int)/*64*/index, true);
return item.handle.id;
}
-void outlineView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn) {
+void outlineView_didClickTableColumn (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn) {
TreeColumn column = getColumn (new id (tableColumn));
if (column == null) return; /* either CHECK column or firstColumn in 0-column Tree */
column.sendSelectionEvent (SWT.Selection);
}
-int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ itemID) {
+long /*int*/ outlineView_objectValueForTableColumn_byItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ tableColumn, long /*int*/ itemID) {
TreeItem item = (TreeItem) display.getWidget (itemID);
checkData (item);
if (checkColumn != null && tableColumn == checkColumn.id) {
@@ -2102,21 +2102,21 @@ int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int
return item.createString (0).id;
}
-boolean outlineView_isItemExpandable (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+boolean outlineView_isItemExpandable (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
if (item == 0) return true;
return ((TreeItem) display.getWidget (item)).itemCount != 0;
}
-int /*long*/ outlineView_numberOfChildrenOfItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+long /*int*/ outlineView_numberOfChildrenOfItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ item) {
if (item == 0) return itemCount;
return ((TreeItem) display.getWidget (item)).itemCount;
}
-boolean outlineView_shouldExpandItem_item (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+boolean outlineView_shouldExpandItem_item (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1) {
return shouldExpand;
}
-boolean outlineView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ currentColIndex, int /*long*/ newColIndex) {
+boolean outlineView_shouldReorderColumn_toColumn(long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ currentColIndex, long /*int*/ newColIndex) {
// Check column should never move and no column can be dragged to the left of it, if present.
if ((style & SWT.CHECK) != 0) {
if (currentColIndex == 0) return false;
@@ -2134,16 +2134,16 @@ boolean outlineView_shouldReorderColumn_toColumn(int /*long*/ id, int /*long*/ s
return true;
}
-boolean outlineView_shouldTrackCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ table, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ item) {
+boolean outlineView_shouldTrackCell_forTableColumn_item(long /*int*/ id, long /*int*/ sel, long /*int*/ table, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ item) {
if ((style & SWT.CHECK) != 0) {
if (new NSCell(cell).isKindOfClass(OS.class_NSButtonCell)) return true;
}
NSOutlineView widget = (NSOutlineView)view;
- int /*long*/ rowIndex = widget.rowForItem(new id(item));
+ long /*int*/ rowIndex = widget.rowForItem(new id(item));
return widget.isRowSelected(rowIndex);
}
-void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ itemID) {
+void outlineView_willDisplayCell_forTableColumn_item (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ cell, long /*int*/ tableColumn, long /*int*/ itemID) {
if (checkColumn != null && tableColumn == checkColumn.id) return;
TreeItem item = (TreeItem) display.getWidget(itemID);
int index = 0;
@@ -2208,7 +2208,7 @@ void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*lon
}
}
-void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -2236,7 +2236,7 @@ void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ a
headerView.setNeedsDisplay(true);
}
-void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
NSNotification notification = new NSNotification (aNotification);
NSDictionary userInfo = notification.userInfo ();
NSString nsstring = (NSString) new NSString().alloc();
@@ -2265,7 +2265,7 @@ void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/
}
}
-void scrollClipViewToPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ clipView, NSPoint point) {
+void scrollClipViewToPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ clipView, NSPoint point) {
if (shouldScroll) {
super.scrollClipViewToPoint(id, sel, clipView, point);
if ((style & SWT.CHECK) != 0 && columnCount > 0 && ((NSOutlineView) view).headerView () != null) {
@@ -2296,17 +2296,17 @@ void sendSelection () {
}
}
-void outlineViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewSelectionDidChange (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
if (didSelect) return;
sendSelection ();
}
-void outlineViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewSelectionIsChanging (long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
didSelect = true;
sendSelection ();
}
-void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ itemID) {
+void outlineView_setObjectValue_forTableColumn_byItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ object, long /*int*/ tableColumn, long /*int*/ itemID) {
if (checkColumn != null && tableColumn == checkColumn.id) {
TreeItem item = (TreeItem) display.getWidget (itemID);
item.checked = !item.checked;
@@ -2318,7 +2318,7 @@ void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*lo
}
}
-boolean outlineView_writeItems_toPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+boolean outlineView_writeItems_toPasteboard(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2) {
return sendMouseEvent(NSApplication.sharedApplication().currentEvent(), SWT.DragDetect, true);
}
@@ -2463,7 +2463,7 @@ void reskinChildren (int flags) {
super.reskinChildren (flags);
}
-void setImage (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void setImage (long /*int*/ id, long /*int*/ sel, long /*int*/ arg0) {
OS.object_setInstanceVariable(id, Display.SWT_IMAGE, arg0);
}
@@ -2539,7 +2539,7 @@ public void select (TreeItem item) {
checkItems ();
showItem (item);
NSOutlineView outlineView = (NSOutlineView) view;
- int /*long*/ row = outlineView.rowForItem (item.handle);
+ long /*int*/ row = outlineView.rowForItem (item.handle);
NSIndexSet set = (NSIndexSet)new NSIndexSet().alloc();
set = set.initWithIndex(row);
ignoreSelect = true;
@@ -2548,7 +2548,7 @@ public void select (TreeItem item) {
set.release();
}
-void selectRowIndexes_byExtendingSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ indexes, boolean extend) {
+void selectRowIndexes_byExtendingSelection (long /*int*/ id, long /*int*/ sel, long /*int*/ indexes, boolean extend) {
if (preventSelect && !ignoreSelect) return;
if ((style & SWT.SINGLE) != 0 && !ignoreSelect) {
NSIndexSet set = new NSIndexSet(indexes);
@@ -2636,7 +2636,7 @@ boolean sendMouseEvent(NSEvent nsEvent, int type, boolean send) {
NSTableView widget = (NSTableView)view;
NSIndexSet selectedRows = widget.selectedRowIndexes ();
int count = (int)/*64*/selectedRows.count();
- int /*long*/ [] indexBuffer = new int /*long*/ [count];
+ long /*int*/ [] indexBuffer = new long /*int*/ [count];
selectedRows.getIndexes(indexBuffer, count, 0);
for (int i = 0; i < count; i++) {
if (indexBuffer[i] == selectedRowIndex) continue;
@@ -2677,7 +2677,7 @@ void selectItems (TreeItem[] items, boolean ignoreDisposed) {
set.release();
}
-NSRect titleRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame) {
+NSRect titleRectForBounds (long /*int*/ id, long /*int*/ sel, NSRect cellFrame) {
NSImage image = new NSCell(id).image();
if (image != null) {
int imageWidth = imageBounds.width + IMAGE_GAP;
@@ -2892,8 +2892,8 @@ void setItemCount (TreeItem parentItem, int count) {
void setItemHeight (Image image, NSFont font, boolean set) {
if (font == null) font = getFont ().handle;
- float /*double*/ ascent = font.ascender ();
- float /*double*/ descent = -font.descender () + font.leading ();
+ double /*float*/ ascent = font.ascender ();
+ double /*float*/ descent = -font.descender () + font.leading ();
int height = (int)Math.ceil (ascent + descent) + 1;
Rectangle bounds = image != null ? image.getBounds () : imageBounds;
if (bounds != null) {
@@ -2977,11 +2977,11 @@ boolean setScrollWidth (TreeItem item) {
return false;
}
-void setShouldExpandItem (int /*long*/ id, int /*long*/ sel, boolean shouldExpand) {
+void setShouldExpandItem (long /*int*/ id, long /*int*/ sel, boolean shouldExpand) {
this.shouldExpand = shouldExpand;
}
-void setShouldScrollClipView (int /*long*/ id, int /*long*/ sel, boolean shouldScroll) {
+void setShouldScrollClipView (long /*int*/ id, long /*int*/ sel, boolean shouldScroll) {
this.shouldScroll = shouldScroll;
}
@@ -3143,7 +3143,7 @@ public void setTopItem (TreeItem item) {
checkItems ();
showItem (item, false);
NSOutlineView widget = (NSOutlineView) view;
- int /*long*/ row = widget.rowForItem (item.handle);
+ long /*int*/ row = widget.rowForItem (item.handle);
if (row == -1) return;
NSPoint pt = new NSPoint();
pt.x = scrollView.contentView().bounds().x;

Back to the top