summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSForm.java
blob: e573d5028aceed2eeba1de7da0835004aa6d6feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.internal.cocoa;

public class NSForm extends NSMatrix {

public NSForm() {
	super();
}

public NSForm(int id) {
	super(id);
}

public NSFormCell addEntry(NSString title) {
	int result = OS.objc_msgSend(this.id, OS.sel_addEntry_1, title != null ? title.id : 0);
	return result != 0 ? new NSFormCell(result) : null;
}

public id cellAtIndex(int index) {
	int result = OS.objc_msgSend(this.id, OS.sel_cellAtIndex_1, index);
	return result != 0 ? new id(result) : null;
}

public void drawCellAtIndex(int index) {
	OS.objc_msgSend(this.id, OS.sel_drawCellAtIndex_1, index);
}

public int indexOfCellWithTag(int aTag) {
	return OS.objc_msgSend(this.id, OS.sel_indexOfCellWithTag_1, aTag);
}

public int indexOfSelectedItem() {
	return OS.objc_msgSend(this.id, OS.sel_indexOfSelectedItem);
}

public NSFormCell insertEntry(NSString title, int index) {
	int result = OS.objc_msgSend(this.id, OS.sel_insertEntry_1atIndex_1, title != null ? title.id : 0, index);
	return result != 0 ? new NSFormCell(result) : null;
}

public void removeEntryAtIndex(int index) {
	OS.objc_msgSend(this.id, OS.sel_removeEntryAtIndex_1, index);
}

public void selectTextAtIndex(int index) {
	OS.objc_msgSend(this.id, OS.sel_selectTextAtIndex_1, index);
}

public void setBezeled(boolean flag) {
	OS.objc_msgSend(this.id, OS.sel_setBezeled_1, flag);
}

public void setBordered(boolean flag) {
	OS.objc_msgSend(this.id, OS.sel_setBordered_1, flag);
}

public void setEntryWidth(float width) {
	OS.objc_msgSend(this.id, OS.sel_setEntryWidth_1, width);
}

public void setFrameSize(NSSize newSize) {
	OS.objc_msgSend(this.id, OS.sel_setFrameSize_1, newSize);
}

public void setInterlineSpacing(float spacing) {
	OS.objc_msgSend(this.id, OS.sel_setInterlineSpacing_1, spacing);
}

public void setTextAlignment(int mode) {
	OS.objc_msgSend(this.id, OS.sel_setTextAlignment_1, mode);
}

public void setTextBaseWritingDirection(int writingDirection) {
	OS.objc_msgSend(this.id, OS.sel_setTextBaseWritingDirection_1, writingDirection);
}

public void setTextFont(NSFont fontObj) {
	OS.objc_msgSend(this.id, OS.sel_setTextFont_1, fontObj != null ? fontObj.id : 0);
}

public void setTitleAlignment(int mode) {
	OS.objc_msgSend(this.id, OS.sel_setTitleAlignment_1, mode);
}

public void setTitleBaseWritingDirection(int writingDirection) {
	OS.objc_msgSend(this.id, OS.sel_setTitleBaseWritingDirection_1, writingDirection);
}

public void setTitleFont(NSFont fontObj) {
	OS.objc_msgSend(this.id, OS.sel_setTitleFont_1, fontObj != null ? fontObj.id : 0);
}

}