public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tania Bento <tbento@redhat.com>
To: mauve-patches@sources.redhat.com
Subject: FYI: JTable
Date: Wed, 13 Sep 2006 18:19:00 -0000	[thread overview]
Message-ID: <1158171546.12061.50.camel@toothpaste.toronto.redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

Hey,

This new test file (committed) tests the width of the cellRect, when the
getCellRect method from javax.swing.JTable is called.

  2006-09-13  Tania Bento  <tbento@redhat.com>

        * gnu/testlet/javax/swing/JTable/getCellRect.java: New test.

Cheers,
Tania

[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 3415 bytes --]

Index: gnu/testlet/javax/swing/JTable/getCellRect.java
===================================================================
RCS file: gnu/testlet/javax/swing/JTable/getCellRect.java
diff -N gnu/testlet/javax/swing/JTable/getCellRect.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JTable/getCellRect.java	13 Sep 2006 18:18:44 -0000
@@ -0,0 +1,95 @@
+/* test.java -- FIXME: describe
+   Copyright (C) 2006 FIXME: your info here
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: FIXME
+
+package gnu.testlet.javax.swing.JTable;
+
+import java.awt.Rectangle;
+
+import javax.swing.JTable;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+public class getCellRect implements Testlet
+{
+
+  public void test(TestHarness harness)
+  {   
+    JTable table = new JTable(0, 1);
+    Rectangle rectangle = table.getCellRect(0, 0, false);
+    harness.check(rectangle.x, 0);
+    harness.check(rectangle.y, 0);
+    harness.check(rectangle.width, 75);
+    harness.check(rectangle.height, 0);
+      
+    table = new JTable(2, 3);
+    rectangle = table.getCellRect(1, 2, false);
+    harness.check(rectangle.x, 150);
+    harness.check(rectangle.y, 16);
+    harness.check(rectangle.width, 74);
+    harness.check(rectangle.height, 15);
+    
+    table = new JTable(2, 3);
+    rectangle = table.getCellRect(0, 2, false);
+    harness.check(rectangle.x, 150);
+    harness.check(rectangle.y, 0);
+    harness.check(rectangle.width, 74);
+    harness.check(rectangle.height, 15);
+    
+    table = new JTable(2, 3);
+    rectangle = table.getCellRect(1, 0, false);
+    harness.check(rectangle.x, 0);
+    harness.check(rectangle.y, 16);
+    harness.check(rectangle.width, 74);
+    harness.check(rectangle.height, 15);
+       
+    table = new JTable(0, 1);
+    rectangle = table.getCellRect(0, 0, true);
+    harness.check(rectangle.x, 0);
+    harness.check(rectangle.y, 0);
+    harness.check(rectangle.width, 75);
+    harness.check(rectangle.height, 0);
+    
+    table = new JTable(2, 3);
+    rectangle = table.getCellRect(1, 2, true);
+    harness.check(rectangle.x, 150);
+    harness.check(rectangle.y, 16);
+    harness.check(rectangle.width, 75);
+    harness.check(rectangle.height, 16);
+    
+    table = new JTable(2, 3);
+    rectangle = table.getCellRect(0, 2, true);
+    harness.check(rectangle.x, 150);
+    harness.check(rectangle.y, 0);
+    harness.check(rectangle.width, 75);
+    harness.check(rectangle.height, 16);
+    
+    table = new JTable(2, 3);
+    rectangle = table.getCellRect(1, 0, true);
+    harness.check(rectangle.x, 0);
+    harness.check(rectangle.y, 16);
+    harness.check(rectangle.width, 75);
+    harness.check(rectangle.height, 16);
+  }
+
+}

             reply	other threads:[~2006-09-13 18:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13 18:19 Tania Bento [this message]
     [not found] ` <1158858523.2703.43.camel@toothpaste.toronto.redhat.com>
2006-09-21 17:12   ` Tania Bento

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1158171546.12061.50.camel@toothpaste.toronto.redhat.com \
    --to=tbento@redhat.com \
    --cc=mauve-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).