⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gbc.java

📁 好的超市源码供大家下载
💻 JAVA
字号:
package view.com;

import java.awt.GridBagConstraints;
import java.awt.Insets;

/**
 * 
 * @author linfeng
 * GridBagLayout布局
 */
public class GBC extends GridBagConstraints {
  
  /**
   * 
   * @param x
   * @param y
   */
  public GBC(int x, int y) {
    this.gridx = x;
    this.gridy = y;
  }

  /**
   * 
   * @param gridx
   * @param gridy
   * @param gridwidth
   * @param gridheight
   */
  public GBC(int gridx, int gridy, int gridwidth, int gridheight) {
    this.gridx = gridx;
    this.gridy = gridy;
    this.gridwidth = gridwidth;
    this.gridheight = gridheight;
  }

  /**
   * 
   * @param anchor
   * @return
   */
  public GBC setAnchor(int anchor) {
    this.anchor = anchor;
    return this;
  }

  /**
   * 
   * @param fill
   * @return
   */
  public GBC setFill(int fill) {
    this.fill = fill;
    return this;
  }

  /**
   * 
   * @param weightx
   * @param weighy
   * @return
   */
  public GBC setWeight(double weightx, double weighy) {
    this.weightx = weightx;
    this.weighty = weighty;
    return this;
  }

  /**
   * 
   * @param distance
   * @return
   */
  public GBC setInset(int distance) {
    this.insets = new Insets(distance, distance, distance, distance);
    return this;
  }

  /**
   * 
   * @param top
   * @param left
   * @param bottom
   * @param right
   * @return
   */
  public GBC setInset(int top, int left, int bottom, int right) {
    this.insets = new Insets(top, left, bottom, right);
    return this;
  }

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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -