home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 144 / DPCS0200.iso / Internet / Supanet / system / swing.jar / javax / swing / text / TableView$ProxyCell.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  2.0 KB  |  69 lines

  1. package javax.swing.text;
  2.  
  3. import java.awt.Graphics;
  4. import java.awt.Shape;
  5.  
  6. class TableView$ProxyCell extends View implements TableView.GridCell {
  7.    // $FF: synthetic field
  8.    private final TableView this$0;
  9.    TableView.TableCell host;
  10.    int row;
  11.    int col;
  12.  
  13.    TableView$ProxyCell(TableView var1, Element var2) {
  14.       super(var2);
  15.       this.this$0 = var1;
  16.       this.host = null;
  17.    }
  18.  
  19.    TableView$ProxyCell(TableView var1, TableView.TableCell var2) {
  20.       super(((View)var2).getElement());
  21.       this.this$0 = var1;
  22.       this.host = var2;
  23.    }
  24.  
  25.    public int getColumnCount() {
  26.       return 1;
  27.    }
  28.  
  29.    public int getGridColumn() {
  30.       return this.col;
  31.    }
  32.  
  33.    public int getGridRow() {
  34.       return this.row;
  35.    }
  36.  
  37.    public float getPreferredSpan(int var1) {
  38.       return this.host != null ? this.host.getPreferredSpan(var1) : 0.0F;
  39.    }
  40.  
  41.    public int getResizeWeight(int var1) {
  42.       return 1;
  43.    }
  44.  
  45.    public int getRowCount() {
  46.       return 1;
  47.    }
  48.  
  49.    protected void loadChildren(ViewFactory var1) {
  50.    }
  51.  
  52.    public Shape modelToView(int var1, Shape var2, Position.Bias var3) throws BadLocationException {
  53.       return this.host != null ? this.host.modelToView(var1, var2, var3) : null;
  54.    }
  55.  
  56.    public void paint(Graphics var1, Shape var2) {
  57.    }
  58.  
  59.    public void setGridLocation(int var1, int var2) {
  60.       this.row = var1;
  61.       this.col = var2;
  62.       ((View)this).preferenceChanged((View)null, true, true);
  63.    }
  64.  
  65.    public int viewToModel(float var1, float var2, Shape var3, Position.Bias[] var4) {
  66.       return this.host != null ? this.host.viewToModel(var1, var2, var3, var4) : -1;
  67.    }
  68. }
  69.