home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.text;
-
- import java.awt.Graphics;
- import java.awt.Rectangle;
- import java.awt.Shape;
-
- public class TableView$TableCell extends BoxView {
- // $FF: synthetic field
- private final TableView this$0;
- int row;
- int col;
-
- public TableView$TableCell(TableView var1, Element var2) {
- super(var2, 1);
- this.this$0 = var1;
- this.this$0 = var1;
- }
-
- public int getColumnCount() {
- return 1;
- }
-
- public int getRowCount() {
- return 1;
- }
-
- public void setGridLocation(int var1, int var2) {
- this.row = var1;
- this.col = var2;
- }
-
- public int getPreferredColumnSpan() {
- return (int)super.getPreferredSpan(0) / this.getColumnCount();
- }
-
- public void paint(Graphics var1, Shape var2) {
- Rectangle var3 = var2.getBounds();
- int var4 = this.getRowCount();
- int var5 = this.getColumnCount();
- if (var4 > 1 || var5 > 1) {
- for(int var6 = 1; var6 < var5; ++var6) {
- var3.width += this.this$0.getColumnSpan(this.col + var6);
- }
-
- for(int var7 = 1; var7 < var4; ++var7) {
- var3.height += this.this$0.getRowSpan(this.row + var7);
- }
- }
-
- }
-
- public float getPreferredSpan(int var1) {
- switch (var1) {
- case 0:
- return (float)this.this$0.getColumnSpan(this.col);
- default:
- return super.getPreferredSpan(var1);
- }
- }
- }
-