本文整理汇总了Java中com.jgoodies.forms.layout.FormLayout类的典型用法代码示例。如果您正苦于以下问题:Java FormLayout类的具体用法?Java FormLayout怎么用?Java FormLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormLayout类属于com.jgoodies.forms.layout包,在下文中一共展示了FormLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JPanel
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
/**
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
* call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new FormLayout("fill:4dlu:noGrow,fill:d:grow,fill:4dlu:noGrow",
"center:4dlu:noGrow,center:d:grow,top:4dlu:noGrow,center:max(d;15dlu):noGrow,center:4dlu:noGrow"));
contentPane.setMinimumSize(new Dimension(300, 300));
contentPane.setPreferredSize(new Dimension(500, 500));
final JPanel panel1 = new JPanel();
panel1.setLayout(new FormLayout(
"fill:d:grow,left:4dlu:noGrow,fill:max(d;50dlu):noGrow,left:4dlu:noGrow,fill:max(d;50dlu):noGrow",
"center:d:grow"));
panel1.setPreferredSize(new Dimension(300, 24));
CellConstraints cc = new CellConstraints();
contentPane.add(panel1, cc.xy(2, 4));
buttonOK = new JButton();
buttonOK.setText("Confirm Security Exception");
buttonOK.setToolTipText("Accept this cerficate");
panel1.add(buttonOK, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.FILL));
buttonCancel = new JButton();
buttonCancel.setText("Cancel");
panel1.add(buttonCancel, cc.xy(5, 1));
sslCertificateForm = new SSLCertificateForm();
contentPane.add(sslCertificateForm.$$$getRootComponent$$$(),
cc.xy(2, 2, CellConstraints.FILL, CellConstraints.FILL));
}
示例2: JPanel
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
/**
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
* call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new FormLayout("fill:4dlu:noGrow,fill:d:grow,fill:4dlu:noGrow",
"center:4dlu:noGrow,center:d:grow,top:4dlu:noGrow,center:max(d;15dlu):noGrow,center:4dlu:noGrow"));
contentPane.setMinimumSize(new Dimension(300, 300));
contentPane.setPreferredSize(new Dimension(500, 500));
final JPanel panel1 = new JPanel();
panel1.setLayout(new FormLayout(
"fill:d:grow,left:4dlu:noGrow,fill:50dlu:noGrow,left:4dlu:noGrow,fill:50dlu:noGrow",
"center:15dlu:grow"));
panel1.setPreferredSize(new Dimension(300, 24));
CellConstraints cc = new CellConstraints();
contentPane.add(panel1, cc.xy(2, 4));
buttonOK = new JButton();
buttonOK.setText("OK");
panel1.add(buttonOK, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.FILL));
buttonCancel = new JButton();
buttonCancel.setText("Cancel");
panel1.add(buttonCancel, cc.xy(5, 1, CellConstraints.DEFAULT, CellConstraints.FILL));
sslCertificateForm = new SSLCertificateForm();
contentPane.add(sslCertificateForm.$$$getRootComponent$$$(),
cc.xy(2, 2, CellConstraints.FILL, CellConstraints.FILL));
}
示例3: JPanel
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
/**
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
* call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new FormLayout(
"fill:max(d;4dlu):noGrow,left:150dlu:grow,fill:d:noGrow,fill:50dlu:noGrow,fill:max(d;4dlu):noGrow,fill:d:noGrow",
"top:110px:grow,top:m:noGrow,top:4dlu:noGrow,top:15dlu:noGrow,top:4dlu:noGrow"));
contentPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(),
null));
final JPanel panel1 = new JPanel();
panel1.setLayout(new FormLayout("fill:max(d;4px):noGrow", "center:d:noGrow"));
CellConstraints cc = new CellConstraints();
contentPane.add(panel1, cc.xyw(2, 2, 5));
final JScrollPane scrollPane1 = new JScrollPane();
contentPane.add(scrollPane1, cc.xyw(2, 1, 3, CellConstraints.FILL, CellConstraints.FILL));
propertyTable = new JTable();
propertyTable.setCellSelectionEnabled(true);
propertyTable.setFillsViewportHeight(true);
propertyTable.setRowSelectionAllowed(true);
scrollPane1.setViewportView(propertyTable);
closeButton = new JButton();
closeButton.setText("Close");
contentPane.add(closeButton, cc.xy(4, 4, CellConstraints.FILL, CellConstraints.FILL));
}
示例4: initialize
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
/**
* Initialize method.
*/
private void initialize() {
String rowDef = "8dlu,fill:250dlu,8dlu,p,2dlu";
String colDef = "2dlu,fill:60dlu,2dlu:grow,fill:60dlu,2dlu";
FormLayout layout = new FormLayout(colDef, rowDef);
setLayout(layout);
CellConstraints cons = new CellConstraints();
add(getContentPanel(), cons.xywh(2, 2, 3, 1));
add(getOkButton(), cons.xywh(2, 4, 1, 1));
add(getCancelButton(), cons.xywh(4, 4, 1, 1));
buildGroups();
}
示例5: createContents
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
protected JPanel createContents()
{
FormLayout layout = new FormLayout(
"fill:[100dlu,min]:grow",
"pref, pref, fill:pref:grow"
);
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.setDefaultDialogBorder();
pk = new ProgressKeeper((int)1E6);
pk.addListener(this);
progressSent = new JProgressBar(0, pk.getTotalWork());
builder.append(progressSent);
builder.nextLine();
lblTask = new JLabel();
builder.append(lblTask);
progressText = new JTextArea();
builder.append(new JScrollPane(progressText));
return builder.getPanel();
}
示例6: defineLayout
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
private void defineLayout ()
{
FormLayout layout = Panel.makeFormLayout(2, 3);
PanelBuilder builder = new PanelBuilder(layout, getBody());
///builder.setDefaultDialogBorder();
CellConstraints cst = new CellConstraints();
int r = 1; // --------------------------------
builder.add(evalField, cst.xy(1, r));
builder.add(anchorSpinner, cst.xyw(3, r, 3));
builder.add(shapeSpinner, cst.xyw(7, r, 5));
r += 2; // --------------------------------
builder.add(keyPointField.getLabel(), cst.xy(9, r));
builder.add(keyPointField.getField(), cst.xy(11, r));
}
示例7: initialize
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
/**
* Initialize method.
*/
private void initialize() {
EditorKit editorKit = new SQLEditorKit();
sqlText.setEditorKitForContentType("text/sql", editorKit);
sqlText.setContentType("text/sql");
String rowDef = "2dlu,p,2dlu,p,fill:220dlu,10dlu,p,2dlu";
String colDef = "2dlu,left:45dlu,2dlu,fill:140dlu:grow,fill:60dlu,2dlu,fill:60dlu,2dlu";
FormLayout layout = new FormLayout(colDef, rowDef);
setLayout(layout);
CellConstraints cons = new CellConstraints();
add(getComponent1(), cons.xywh(2, 2, 1, 1));
add(getEntityName(), cons.xywh(4, 2, 4, 1));
add(getMainTabbedPane(), cons.xywh(2, 4, 6, 2));
add(getOkButton(), cons.xywh(5, 7, 1, 1));
add(getCancelButton(), cons.xywh(7, 7, 1, 1));
}
示例8: createPanel1
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
public JPanel createPanel1()
{
JPanel jpanel1 = new JPanel();
FormLayout formlayout1 = new FormLayout("FILL:308PX:NONE,FILL:89PX:NONE,FILL:22PX:NONE,FILL:87PX:NONE","CENTER:DEFAULT:NONE");
CellConstraints cc = new CellConstraints();
jpanel1.setLayout(formlayout1);
_CANCEL_BUTTON.setActionCommand("Cancel");
_CANCEL_BUTTON.setName("CANCEL_BUTTON");
_CANCEL_BUTTON.setText("CLOSE");
jpanel1.add(_CANCEL_BUTTON,cc.xy(4,1));
_OK_BUTTON.setActionCommand("OK");
_OK_BUTTON.setName("OK_BUTTON");
_OK_BUTTON.setText("INSTALL");
jpanel1.add(_OK_BUTTON,cc.xy(2,1));
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 });
return jpanel1;
}
示例9: getPluginData
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
private PanelBuilder getPluginData(BundleVersion p) {
FormLayout layout = new FormLayout("5dlu, fill:pref:grow, 5dlu","5dlu,pref,15dlu,pref,10dlu,pref,10dlu,pref,10dlu,pref,10dlu,pref,10dlu,pref,10dlu");
PanelBuilder builder = new PanelBuilder(layout);
CellConstraints cc = new CellConstraints();
builder.setBackground(Color.white);
builder.addLabel(p.getBundle().getName(), cc.xy(2, 2));
builder.addSeparator("", cc.xyw(2, 3, 1));
builder.addLabel((p.getBundle().getName().equals(p.getBundle().getSymbolicName()) ? "Version: " + p.getVersion() : ("<html>Version: " + p.getVersion() + "<br>" + p.getBundle().getSymbolicName() + "</html>")), cc.xy(2, 4));
builder.addLabel((p.getBundle().getShortDescription() != null ? Utils.printDescription(p.getBundle().getShortDescription(), 40) : ""), cc.xy(2, 6));
builder.addLabel((p.getReleaseDate() != null ? "Release date: " + p.getReleaseDate() : ""), cc.xy(2, 10));
builder.addLabel(Utils.printAuthors(p), cc.xy(2, 12));
builder.add(getWebsiteLabel(p), cc.xy(2, 14));
return builder;
}
示例10: createPanel1
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
public JPanel createPanel1()
{
JPanel jpanel1 = new JPanel();
FormLayout formlayout1 = new FormLayout("FILL:93PX:NONE,FILL:89PX:NONE,FILL:22PX:NONE,FILL:87PX:NONE","CENTER:DEFAULT:NONE");
CellConstraints cc = new CellConstraints();
jpanel1.setLayout(formlayout1);
_CANCEL_BUTTON.setActionCommand("Cancel");
_CANCEL_BUTTON.setName("CANCEL_BUTTON");
_CANCEL_BUTTON.setText("CANCEL");
jpanel1.add(_CANCEL_BUTTON,cc.xy(4,1));
_OK_BUTTON.setActionCommand("OK");
_OK_BUTTON.setName("OK_BUTTON");
_OK_BUTTON.setText("ADD HOST");
jpanel1.add(_OK_BUTTON,cc.xy(2,1));
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 });
return jpanel1;
}
示例11: createPanel
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
public JPanel createPanel()
{
JPanel jpanel1 = new JPanel();
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:8DLU:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
CellConstraints cc = new CellConstraints();
jpanel1.setLayout(formlayout1);
JLabel jlabel1 = new JLabel();
jlabel1.setFont(new Font("Tahoma",Font.BOLD,11));
jlabel1.setText("The following services will be removed. Note: only YAJSW can be removed");
jpanel1.add(jlabel1,cc.xy(2,4));
_SERVICES.setName("SERVICES");
_SERVICES.setText("Host/service name, Host/Service name");
jpanel1.add(_SERVICES,cc.xy(2,6));
jpanel1.add(createPanel1(),cc.xy(2,8));
JLabel jlabel2 = new JLabel();
jlabel2.setFont(new Font("Tahoma",Font.BOLD,12));
jlabel2.setText("Uninstall Services");
jlabel2.setHorizontalAlignment(JLabel.CENTER);
jpanel1.add(jlabel2,cc.xy(2,2));
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9 });
return jpanel1;
}
示例12: createPanel1
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
public JPanel createPanel1()
{
JPanel jpanel1 = new JPanel();
FormLayout formlayout1 = new FormLayout("FILL:280PX:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
CellConstraints cc = new CellConstraints();
jpanel1.setLayout(formlayout1);
_CANCEL_BUTTON.setActionCommand("Cancel");
_CANCEL_BUTTON.setName("CANCEL_BUTTON");
_CANCEL_BUTTON.setText("Cancel");
jpanel1.add(_CANCEL_BUTTON,cc.xy(4,1));
_OK_BUTTON.setActionCommand("OK");
_OK_BUTTON.setName("OK_BUTTON");
_OK_BUTTON.setText("OK");
jpanel1.add(_OK_BUTTON,cc.xy(2,1));
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 });
return jpanel1;
}
示例13: actionPerformed
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
protected void actionPerformed(CaptionSelection selection) {
FormLayout layout = (FormLayout) selection.getContainer().getLayout();
int[][] oldGroups = selection.isRow() ? layout.getRowGroups() : layout.getColumnGroups();
int[][] newGroups = new int[oldGroups.length + 1][];
System.arraycopy(oldGroups, 0, newGroups, 0, oldGroups.length);
int[] cellsToGroup = getCellsToGroup(selection);
newGroups [oldGroups.length] = new int [cellsToGroup.length];
for(int i=0; i<cellsToGroup.length; i++) {
newGroups [oldGroups.length] [i] = cellsToGroup [i]+1;
}
if (selection.isRow()) {
layout.setRowGroups(newGroups);
}
else {
layout.setColumnGroups(newGroups);
}
}
示例14: AtsPositionSlider
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
public AtsPositionSlider(AtsPosition2D position) {
this.position = position;
FormLayout lm = new FormLayout("pref:grow, 1px, pref:grow", // columns
"p");
// new FormLayout("pref:grow, 2dlu, pref:grow, 2dlu, pref:grow, 2dlu,
// pref:grow", "");
PanelBuilder builder = new PanelBuilder(lm);
// builder.setDefaultDialogBorder();
setLayout(new GridLayout(1, 0));
AtsSlider x = new AtsSlider(0, 255, position.getX());
AtsSlider y = new AtsSlider(0, 255, position.getY());
x.addPropertyChangeListener(this);
y.addPropertyChangeListener(this);
CellConstraints cc = new CellConstraints();
builder.add(x, cc.xy(1, 1));
builder.add(y, cc.xy(3, 1));
add(builder.getPanel());
}
示例15: initialize
import com.jgoodies.forms.layout.FormLayout; //导入依赖的package包/类
/**
* Initialize method.
*/
private void initialize() {
String rowDef = "2dlu,p,8dlu,p,2dlu,p,8dlu,p,2dlu,fill:300dlu,8dlu,p,2dlu";
String colDef = "2dlu,60dlu,2dlu,fill:250dlu:grow,2dlu,30dlu,2dlu";
FormLayout layout = new FormLayout(colDef, rowDef);
setLayout(layout);
CellConstraints cons = new CellConstraints();
add(new DefaultSeparator(ERDesignerBundle.TARGET), cons.xywh(2, 2, 5, 1));
add(new DefaultLabel(ERDesignerBundle.SRCDIRECTORY), cons.xywh(2, 4, 1, 1));
add(getSrcDirectory(), cons.xywh(4, 4, 1, 1));
add(getSearchDirectoryButton(), cons.xywh(6, 4, 1, 1));
add(new DefaultLabel(ERDesignerBundle.PACKAGENAME), cons.xywh(2, 6, 1, 1));
add(getPackageName(), cons.xywh(4, 6, 3, 1));
add(new DefaultSeparator(ERDesignerBundle.DATATYPEMAPPING), cons.xywh(2, 8, 5, 1));
add(getMappingTable().getScrollPane(), cons.xywh(2, 10, 5, 1));
add(getComponent8(), cons.xywh(2, 12, 5, 1));
}