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
|
/*******************************************************************************
* Copyright (c) 2000, 2009 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 NSNumberFormatter extends NSFormatter {
public NSNumberFormatter() {
super();
}
public NSNumberFormatter(long /*int*/ id) {
super(id);
}
public NSNumberFormatter(id id) {
super(id);
}
public boolean allowsFloats() {
return OS.objc_msgSend_bool(this.id, OS.sel_allowsFloats);
}
public boolean alwaysShowsDecimalSeparator() {
return OS.objc_msgSend_bool(this.id, OS.sel_alwaysShowsDecimalSeparator);
}
public NSString decimalSeparator() {
long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_decimalSeparator);
return result != 0 ? new NSString(result) : null;
}
public NSNumber maximum() {
long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_maximum);
return result != 0 ? new NSNumber(result) : null;
}
public long /*int*/ maximumFractionDigits() {
return OS.objc_msgSend(this.id, OS.sel_maximumFractionDigits);
}
public long /*int*/ maximumIntegerDigits() {
return OS.objc_msgSend(this.id, OS.sel_maximumIntegerDigits);
}
public NSNumber minimum() {
long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_minimum);
return result != 0 ? new NSNumber(result) : null;
}
public void setAllowsFloats(boolean flag) {
OS.objc_msgSend(this.id, OS.sel_setAllowsFloats_, flag);
}
public void setMaximum(NSNumber number) {
OS.objc_msgSend(this.id, OS.sel_setMaximum_, number != null ? number.id : 0);
}
public void setMaximumFractionDigits(long /*int*/ number) {
OS.objc_msgSend(this.id, OS.sel_setMaximumFractionDigits_, number);
}
public void setMaximumIntegerDigits(long /*int*/ number) {
OS.objc_msgSend(this.id, OS.sel_setMaximumIntegerDigits_, number);
}
public void setMinimum(NSNumber number) {
OS.objc_msgSend(this.id, OS.sel_setMinimum_, number != null ? number.id : 0);
}
public void setMinimumFractionDigits(long /*int*/ number) {
OS.objc_msgSend(this.id, OS.sel_setMinimumFractionDigits_, number);
}
public void setMinimumIntegerDigits(long /*int*/ number) {
OS.objc_msgSend(this.id, OS.sel_setMinimumIntegerDigits_, number);
}
public void setNumberStyle(long /*int*/ style) {
OS.objc_msgSend(this.id, OS.sel_setNumberStyle_, style);
}
public void setPartialStringValidationEnabled(boolean b) {
OS.objc_msgSend(this.id, OS.sel_setPartialStringValidationEnabled_, b);
}
}
|