图书管理系统代码 7GBC  网格组布…

来源:互联网 发布:软件防火墙有哪些 编辑:程序博客网 时间:2024/06/05 08:58

import java.awt.*;


public class GBC extends GridBagConstraints
{
  
   public GBC(int gridx, intgridy)
   {
     this.gridx = gridx;
     this.gridy = gridy;
   }

  
   public GBC(int gridx, intgridy, int gridwidth, int gridheight)
   {
     this.gridx = gridx;
     this.gridy = gridy;
     this.gridwidth = gridwidth;
     this.gridheight = gridheight;
   }

  
   public GBC setAnchor(intanchor)
   {
     this.anchor = anchor;
     return this;
   }

  
   public GBC setFill(intfill)
   {
     this.fill = fill;
     return this;
   }

  
   public GBC setWeight(doubleweightx, double weighty)
   {
     this.weightx = weightx;
     this.weighty = weighty;
     return this;
   }

  
   public GBC setInsets(intdistance)
   {
     this.insets = new Insets(distance, distance, distance,distance);
     return this;
   }

  
   public GBC setInsets(int top,int left, int bottom, int right)
   {
     this.insets = new Insets(top, left, bottom, right);
     return this;
   }

  
   public GBC setIpad(int ipadx,int ipady)
   {
     this.ipadx = ipadx;
     this.ipady = ipady;
     return this;
   }
}

0 0
原创粉丝点击