com.apple.jobjc.foundation.NSRect Java Examples

The following examples show how to use com.apple.jobjc.foundation.NSRect. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GUIDemo.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #2
Source File: GUIDemo.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #3
Source File: GUIDemo.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #4
Source File: GUIDemo.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #5
Source File: GUIDemo.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #6
Source File: GUIDemo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #7
Source File: GUIDemo.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #8
Source File: GUIDemo.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #9
Source File: GUIDemo.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #10
Source File: GUIDemo.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #11
Source File: GUIDemo.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #12
Source File: GUIDemo.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void createWindow(){
    NSRect rect;
    int styleMask = objc.AppKit().NSTitledWindowMask() | objc.AppKit().NSMiniaturizableWindowMask();
    NSButton myButton;
    NSSize buttonSize;
    myButton = objc.AppKit().NSButton().newID();
    myButton.setTitle(str.nsString("Print Hello!"));
    myButton.sizeToFit();
    myButton.setTarget(this);
    myButton.setAction(new SEL("printHello:"));
    buttonSize = myButton.frame().size();
    rect = objc.Foundation().NSMakeRect(100, 100, 2*buttonSize.width(), 2*buttonSize.height());
    myWindow = objc.AppKit().NSWindow().alloc();
    myWindow = myWindow.initWithContentRect_styleMask_backing_defer(
            rect, styleMask, objc.AppKit().NSBackingStoreBuffered(), false);
    myWindow.setTitle(str.nsString("This is a test window."));
    myWindow.setContentView(myButton);

    myDrawer = objc.AppKit().NSDrawer().alloc();
    myDrawer = myDrawer.initWithContentSize_preferredEdge(
              objc.Foundation().NSMakeSize(100, 40), objc.Foundation().NSMinYEdge());
    myDrawer.setParentWindow(myWindow);
}
 
Example #13
Source File: StructTest.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #14
Source File: StructTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #15
Source File: StructTest.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #16
Source File: StructTest.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #17
Source File: StructTest.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #18
Source File: StructTest.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #19
Source File: StructTest.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #20
Source File: StructTest.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #21
Source File: StructTest.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #22
Source File: StructTest.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #23
Source File: StructTest.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #24
Source File: StructTest.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #25
Source File: StructTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #26
Source File: StructTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #27
Source File: StructTest.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #28
Source File: StructTest.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}
 
Example #29
Source File: StructTest.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void testSTRET(){
    NSPoint point = JObjC.getInstance().Foundation().NSMakePoint(3, 4);
    assertTrue(point.x() == 3);
    assertTrue(point.y() == 4);

    NSRect rect = JObjC.getInstance().Foundation().NSMakeRect(0, 1, 2, 3);
    assertTrue(rect.origin().x() == 0);
    assertTrue(rect.origin().y() == 1);
    assertTrue(rect.size().width() == 2);
    assertTrue(rect.size().height() == 3);
}
 
Example #30
Source File: StructTest.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void testNestedStruct(){
    NSRect r = JObjC.getInstance().Foundation().makeNSRect();
    assertTrue(0f == r.size().width());
    r.size().setWidth(3f);
    assertTrue(3f == r.size().width());
    assertTrue(r.size() == r.size());
}