Created
March 22, 2014 15:57
-
-
Save daboross/9709426 to your computer and use it in GitHub Desktop.
GridBagConstraints helpful class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.daboross.util; | |
import java.awt.GridBagConstraints; | |
import java.awt.Insets; | |
public class GBC extends GridBagConstraints { | |
public GBC anchor(int anchor) { | |
this.anchor = anchor; | |
return this; | |
} | |
public GBC fill(int fill) { | |
this.fill = fill; | |
return this; | |
} | |
public GBC gridheight(int gridheight) { | |
this.gridheight = gridheight; | |
return this; | |
} | |
public GBC gridwidth(int gridwidth) { | |
this.gridwidth = gridwidth; | |
return this; | |
} | |
public GBC gridx(int gridx) { | |
this.gridx = gridx; | |
return this; | |
} | |
public GBC gridy(int gridy) { | |
this.gridy = gridy; | |
return this; | |
} | |
public GBC insets(Insets insets) { | |
this.insets = insets; | |
return this; | |
} | |
public GBC ipadx(int ipadx) { | |
this.ipadx = ipadx; | |
return this; | |
} | |
public GBC ipady(int ipady) { | |
this.ipady = ipady; | |
return this; | |
} | |
public GBC weightx(double weightx) { | |
this.weightx = weightx; | |
return this; | |
} | |
public GBC weighty(double weighty) { | |
this.weighty = weighty; | |
return this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment