Example usage for com.jgoodies.forms.layout CellConstraints xywh

List of usage examples for com.jgoodies.forms.layout CellConstraints xywh

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout CellConstraints xywh.

Prototype

public CellConstraints xywh(int col, int row, int colSpan, int rowSpan) 

Source Link

Document

Sets the column, row, width, and height; uses default alignments.

Examples:

 cc.xywh(1, 3, 2, 1); cc.xywh(1, 3, 7, 3); 

Usage

From source file:net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerRoleFrame.java

License:Open Source License

public JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "FILL:5DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:3DLU:NONE",
            "CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:5DLU:NONE,FILL:DEFAULT:NONE,CENTER:5DLU:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);//from   w w  w  . j av  a2  s.co m

    btnNew.setActionCommand("new");
    btnNew.setName("btnNew");
    btnNew.setText("new");
    jpanel1.add(btnNew, cc.xy(2, 2));

    btnSave.setActionCommand("save");
    btnSave.setName("btnSave");
    btnSave.setText("save");
    jpanel1.add(btnSave, cc.xy(4, 2));

    btnCancel.setActionCommand("cancel");
    btnCancel.setName("btnCancel");
    btnCancel.setText("cancel");
    jpanel1.add(btnCancel, cc.xy(6, 2));

    btnDelete.setActionCommand("delete");
    btnDelete.setName("btnDelete");
    btnDelete.setText("delete");
    jpanel1.add(btnDelete, cc.xy(8, 2));

    jtableRoles.setName("jtableRoles");
    JScrollPane jscrollpane1 = new JScrollPane();
    jscrollpane1.setViewportView(jtableRoles);
    jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jpanel1.add(jscrollpane1, cc.xywh(2, 4, 11, 1));

    lblRolename.setName("lblRolename");
    lblRolename.setText("rolename");
    jpanel1.add(lblRolename, cc.xy(2, 6));

    jtextfieldRolename.setName("jtextfieldRolename");
    jpanel1.add(jtextfieldRolename, cc.xywh(4, 6, 9, 1));

    return jpanel1;
}

From source file:net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerUserManagerFrame.java

License:Open Source License

private JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "FILL:5DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:3DLU:NONE",
            "CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:12DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);/*from  ww  w . j  a  va 2s.  c om*/

    btnNew.setActionCommand("new");
    btnNew.setName("btnNew");
    btnNew.setText("new");
    jpanel1.add(btnNew, cc.xy(2, 4));

    btnEdit.setActionCommand("edit");
    btnEdit.setName("btnEdit");
    btnEdit.setText("edit");
    jpanel1.add(btnEdit, cc.xy(4, 4));

    btnSave.setActionCommand("save");
    btnSave.setName("btnSave");
    btnSave.setText("save");
    jpanel1.add(btnSave, cc.xy(6, 4));

    btnCancel.setActionCommand("cancel");
    btnCancel.setName("btnCancel");
    btnCancel.setText("cancel");
    jpanel1.add(btnCancel, cc.xy(8, 4));

    btnDelete.setActionCommand("delete");
    btnDelete.setName("btnDelete");
    btnDelete.setText("delete");
    jpanel1.add(btnDelete, cc.xy(10, 4));

    jpanel1.add(createPanelConnectionData(), cc.xywh(2, 2, 11, 1));
    jpanel1.add(createPanelUserEdit(), cc.xywh(2, 6, 11, 1));
    return jpanel1;
}

From source file:net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerUserManagerFrame.java

License:Open Source License

public JPanel createPanelConnectionData() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:30DLU:GROW(1.0),FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:30DLU:NONE,FILL:3DLU:GROW(1.0)",
            "CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);//from   w ww.  j  ava  2  s. com

    jtextfieldManagerUsername.setName("jtextfieldManagerUsername");
    jpanel1.add(jtextfieldManagerUsername, cc.xy(3, 5));

    lblManagerUsername.setName("lblManagerUsername");
    lblManagerUsername.setText("username");
    jpanel1.add(lblManagerUsername, cc.xy(1, 5));

    lblManagerPassword.setName("lblManagerPassword");
    lblManagerPassword.setText("password");
    jpanel1.add(lblManagerPassword, cc.xy(5, 5));

    lblManagerTitle.setName("lblManagerTitle");
    lblManagerTitle.setText("Connection parameter:");
    jpanel1.add(lblManagerTitle, cc.xywh(1, 1, 8, 1));

    lblServer.setName("lblServer");
    lblServer.setText("server");
    jpanel1.add(lblServer, cc.xy(1, 3));

    jtextfieldServer.setName("jtextfieldServer");
    jpanel1.add(jtextfieldServer, cc.xy(3, 3));

    lblPort.setName("lblPort");
    lblPort.setText("port");
    jpanel1.add(lblPort, cc.xy(5, 3));

    jtextfieldPort.setName("jtextfieldPort");
    jpanel1.add(jtextfieldPort, cc.xy(7, 3));

    jpasswordfieldManager.setName("jpasswordfieldManager");
    jpanel1.add(jpasswordfieldManager, cc.xywh(7, 5, 2, 1));

    jcheckboxConnectToServer.setActionCommand("connected to server");
    jcheckboxConnectToServer.setName("jcheckboxConnectToServer");
    jcheckboxConnectToServer.setText("connected to server");
    jcheckboxConnectToServer.setHorizontalAlignment(JCheckBox.RIGHT);
    jpanel1.add(jcheckboxConnectToServer, cc.xy(8, 3));

    return jpanel1;
}

From source file:net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerUserManagerFrame.java

License:Open Source License

public JPanel createPanelUserEdit() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:30DLU:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:30DLU:NONE,FILL:DEFAULT:GROW(1.0)",
            "CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);// w  ww.jav  a 2  s .  co m

    jtableUsers.setName("jtableUsers");
    JScrollPane jscrollpane1 = new JScrollPane();
    jscrollpane1.setViewportView(jtableUsers);
    jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jpanel1.add(jscrollpane1, cc.xywh(1, 1, 8, 1));

    lblUsername.setName("lblUsername");
    lblUsername.setText("Username");
    jpanel1.add(lblUsername, cc.xy(1, 3));

    lblPassword1.setName("lblPassword1");
    lblPassword1.setText("Password");
    jpanel1.add(lblPassword1, cc.xy(1, 7));

    lblPassword2.setName("lblPassword2");
    lblPassword2.setText("Confirm password");
    jpanel1.add(lblPassword2, cc.xy(1, 9));

    lblFirstName.setName("lblFirstName");
    lblFirstName.setText("Firstname");
    jpanel1.add(lblFirstName, cc.xy(1, 11));

    lblMiddleName.setName("lblMiddleName");
    lblMiddleName.setText("Middle name");
    jpanel1.add(lblMiddleName, cc.xy(1, 13));

    lblLastName.setName("lblLastName");
    lblLastName.setText("Last name");
    jpanel1.add(lblLastName, cc.xy(1, 15));

    jtextfieldUsername.setName("jtextfieldUsername");
    jpanel1.add(jtextfieldUsername, cc.xywh(3, 3, 6, 1));

    jpasswordField1.setName("jpasswordField1");
    jpanel1.add(jpasswordField1, cc.xywh(3, 7, 6, 1));

    jpasswordField2.setName("jpasswordField2");
    jpanel1.add(jpasswordField2, cc.xywh(3, 9, 6, 1));

    jtextfieldFirstName.setName("jtextfieldFirstName");
    jpanel1.add(jtextfieldFirstName, cc.xywh(3, 11, 6, 1));

    jtextfieldMiddleName.setName("jtextfieldMiddleName");
    jpanel1.add(jtextfieldMiddleName, cc.xywh(3, 13, 6, 1));

    jtextfieldLastName.setName("jtextfieldLastName");
    jpanel1.add(jtextfieldLastName, cc.xywh(3, 15, 6, 1));

    lblUserId.setName("lblUserId");
    lblUserId.setText("user id");
    jpanel1.add(lblUserId, cc.xy(1, 5));

    lblGroupId.setName("lblGroupId");
    lblGroupId.setText("group id");
    jpanel1.add(lblGroupId, cc.xy(5, 5));

    jtextfieldUserId.setName("jtextfieldUserId");
    jpanel1.add(jtextfieldUserId, cc.xy(3, 5));

    jtextfieldGroupId.setName("jtextfieldGroupId");
    jpanel1.add(jtextfieldGroupId, cc.xy(7, 5));

    return jpanel1;
}

From source file:net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.PreferencesPanel.java

License:Open Source License

public JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    jpanel1.setBorder(BorderFactory.createTitledBorder(" " + title + " "));
    FormLayout formlayout1 = new FormLayout(
            "FILL:5DLU:NONE,FILL:DEFAULT:NONE,FILL:5DLU:NONE,FILL:30DLU:NONE,FILL:5DLU:NONE,FILL:80DLU:NONE,FILL:5DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:5DLU:NONE,FILL:DEFAULT:NONE,FILL:5DLU:NONE",
            "CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE,CENTER:DEFAULT:NONE,CENTER:5DLU:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);//from   w w w. j  a  v  a  2 s . co m

    //       lblTitle.setBackground(new Color(204,204,204));
    //       lblTitle.setName("lblTitle");
    //       lblTitle.setOpaque(true);
    //       lblTitle.setText("Default values");
    //       EtchedBorder etchedborder1 = new EtchedBorder(EtchedBorder.RAISED,null,null);
    //       lblTitle.setBorder(etchedborder1);
    //       jpanel1.add(lblTitle,cc.xywh(2,2,9,1));

    lblUsername.setName("lblUsername");
    lblUsername.setText("username");
    jpanel1.add(lblUsername, cc.xy(2, 12));

    jtextfieldUsername.setName("jtextfieldUsername");
    jpanel1.add(jtextfieldUsername, cc.xywh(4, 12, 3, 1));

    lblServer.setName("lblServer");
    lblServer.setText("server");
    jpanel1.add(lblServer, cc.xy(2, 4));

    jtextfieldServer.setName("jtextfieldServer");
    jpanel1.add(jtextfieldServer, cc.xywh(4, 4, 5, 1));

    lblDatabaseFolder.setName("lblDatabaseFolder");
    lblDatabaseFolder.setText("database folder");
    jpanel1.add(lblDatabaseFolder, cc.xy(2, 8));

    jtextfieldDatabaseFolder.setName("jtextfieldDatabaseFolder");
    jpanel1.add(jtextfieldDatabaseFolder, cc.xywh(4, 8, 5, 1));

    lblPropertiesFolder.setName("lblPropertiesFolder");
    lblPropertiesFolder.setText("properties folder");
    jpanel1.add(lblPropertiesFolder, cc.xy(2, 10));

    lblPort.setName("lblPort");
    lblPort.setText("port");
    jpanel1.add(lblPort, cc.xy(2, 6));

    jtextfieldPort.setName("jtextfieldPort");
    jpanel1.add(jtextfieldPort, cc.xy(4, 6));

    jbuttonDatabaseFolder.setActionCommand("JButton");
    jbuttonDatabaseFolder.setName("jbuttonDatabaseFolder");
    jbuttonDatabaseFolder.setText("JButton");
    jpanel1.add(jbuttonDatabaseFolder, cc.xy(10, 8));

    jbuttonPropertiesFolder.setActionCommand("JButton");
    jbuttonPropertiesFolder.setName("btnPropertiesFolder");
    jbuttonPropertiesFolder.setText("JButton");
    jpanel1.add(jbuttonPropertiesFolder, cc.xy(10, 10));

    jtextfieldPropertiesFolder.setName("jtextfieldPropertiesFolder");
    jpanel1.add(jtextfieldPropertiesFolder, cc.xywh(4, 10, 5, 1));

    return jpanel1;
}

From source file:net.sourceforge.squirrel_sql.plugins.smarttools.gui.SmarttoolChangeValuesFrame.java

License:Open Source License

public JPanel createPanelMain() {
    panelMain.setName("panelMain");
    FormLayout formlayout1 = new FormLayout(
            "FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:100DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:80DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:8DLU:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE",
            "CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
    CellConstraints cc = new CellConstraints();
    panelMain.setLayout(formlayout1);/*from w  w  w.  j  a v  a 2 s  .  c  o  m*/

    lblColumn.setName("lblColumn");
    lblColumn.setText("column name");
    panelMain.add(lblColumn, cc.xy(2, 2));

    tfColumnName.setName("tfColumnName");
    panelMain.add(tfColumnName, cc.xy(4, 2));

    lblDatatype.setName("lblDatatype");
    lblDatatype.setText("datatype");
    panelMain.add(lblDatatype, cc.xy(6, 2));

    cbDataType.setName("cbDataType");
    panelMain.add(cbDataType, cc.xy(8, 2));

    btnSearchData.setActionCommand("JButton");
    btnSearchData.setName("btnSearchData");
    btnSearchData.setText("search data");
    panelMain.add(btnSearchData, cc.xy(13, 2));

    btnChangeData.setActionCommand("JButton");
    btnChangeData.setEnabled(false);
    btnChangeData.setName("btnChangeData");
    btnChangeData.setText("change data");
    panelMain.add(btnChangeData, cc.xy(13, 4));

    chkDisplayOnlyTablesWithData.setActionCommand("display only rows with data");
    chkDisplayOnlyTablesWithData.setName("chkDisplayOnlyTablesWithData");
    chkDisplayOnlyTablesWithData.setSelected(true);
    chkDisplayOnlyTablesWithData.setText("display only rows with data");
    panelMain.add(chkDisplayOnlyTablesWithData, cc.xy(10, 2));

    btnStop.setActionCommand("stop");
    btnStop.setEnabled(false);
    btnStop.setName("btnStop");
    btnStop.setText("stop");
    panelMain.add(btnStop, cc.xy(13, 6));

    pbMain.setName("pbMain");
    pbMain.setValue(25);
    panelMain.add(pbMain, cc.xywh(2, 12, 12, 1));

    lblOperator.setName("lblOperator");
    lblOperator.setText("operator");
    panelMain.add(lblOperator, cc.xy(6, 4));

    cbOperator.setName("cbOperator");
    panelMain.add(cbOperator, cc.xy(8, 4));

    lblNewValue.setName("lblNewValue");
    lblNewValue.setText("new value");
    panelMain.add(lblNewValue, cc.xy(2, 6));

    tfNewValue.setName("tfNewValue");
    panelMain.add(tfNewValue, cc.xy(4, 6));

    chkEnableChangeData.setActionCommand("enable change data");
    chkEnableChangeData.setName("chkEnableChangeData");
    chkEnableChangeData.setText("enable change button");
    panelMain.add(chkEnableChangeData, cc.xy(10, 6));

    tfOldValue.setName("tfOldValue");
    panelMain.add(tfOldValue, cc.xy(10, 4));

    lblWhere.setName("lblWhere");
    lblWhere.setText("where");
    lblWhere.setHorizontalAlignment(JLabel.RIGHT);
    panelMain.add(lblWhere, cc.xy(4, 4));

    lblFooterTableResult.setBackground(new Color(153, 153, 153));
    lblFooterTableResult.setName("lblFooterTableResult");
    lblFooterTableResult.setOpaque(true);
    lblFooterTableResult.setText("Finished in ...");
    panelMain.add(lblFooterTableResult, cc.xywh(2, 10, 12, 1));

    panelMain.add(createpanelResult(), cc.xywh(2, 8, 12, 1));

    return panelMain;
}

From source file:net.sourceforge.squirrel_sql.plugins.smarttools.gui.SmarttoolChangeValuesFrame.java

License:Open Source License

public JPanel createpanelResult() {
    panelResult.setName("panelResult");
    FormLayout formlayout1 = new FormLayout(
            "FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE",
            "FILL:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
    CellConstraints cc = new CellConstraints();
    panelResult.setLayout(formlayout1);/*from  w  w w.  j a  v  a2 s. c  om*/

    btnSelectAll.setActionCommand("all");
    btnSelectAll.setName("btnSelectAll");
    btnSelectAll.setText("all");
    btnSelectAll.setToolTipText("select all result entries");
    panelResult.add(btnSelectAll, cc.xy(1, 1));

    btnSelectNone.setActionCommand("none");
    btnSelectNone.setName("btnSelectNone");
    btnSelectNone.setText("none");
    btnSelectNone.setToolTipText("deselect all result entries");
    panelResult.add(btnSelectNone, cc.xy(3, 1));

    tblResult.setName("tblResult");
    JScrollPane jscrollpane1 = new JScrollPane();
    jscrollpane1.setViewportView(tblResult);
    jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    panelResult.add(jscrollpane1, cc.xywh(1, 3, 7, 1));

    lblTitleResult.setBackground(new Color(153, 153, 153));
    lblTitleResult.setName("lblTitleResult");
    lblTitleResult.setOpaque(true);
    lblTitleResult.setText("Found tables and columns:");
    EmptyBorder emptyborder1 = new EmptyBorder(0, 5, 0, 0);
    lblTitleResult.setBorder(emptyborder1);
    panelResult.add(lblTitleResult, cc.xy(5, 1));

    btnPrint.setActionCommand("print");
    btnPrint.setName("btnPrint");
    btnPrint.setText(" print ");
    panelResult.add(btnPrint, cc.xy(7, 1));

    return panelResult;
}

From source file:net.sourceforge.squirrel_sql.plugins.smarttools.gui.SmarttoolCreateIndexD.java

License:Open Source License

public JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:GROW(0.6),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE",
            "CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);/*from w w  w.j a  va2 s. c  om*/

    lblCreateType.setName("lblCreateType");
    lblCreateType.setText("create");
    jpanel1.add(lblCreateType, cc.xy(2, 2));

    rbPrimaryKey.setActionCommand("primary key");
    rbPrimaryKey.setName("rbPrimaryKey");
    rbPrimaryKey.setText("primary key");
    rbPrimaryKey.setToolTipText("create ddl statement for primary key");
    buttongroup1.add(rbPrimaryKey);
    jpanel1.add(rbPrimaryKey, cc.xy(4, 2));

    rbUniqueIndex.setActionCommand("unique index");
    rbUniqueIndex.setName("rbUniqueIndex");
    rbUniqueIndex.setText("unique index");
    rbUniqueIndex.setToolTipText("create ddl statement for unique index");
    buttongroup1.add(rbUniqueIndex);
    jpanel1.add(rbUniqueIndex, cc.xy(6, 2));

    lblTitleListSourceColumns.setName("lblTitleListSourceColumns");
    lblTitleListSourceColumns.setText("source columns:");
    jpanel1.add(lblTitleListSourceColumns, cc.xywh(2, 4, 3, 1));

    listSourceColumns.setName("listSourceColumns");
    JScrollPane jscrollpane1 = new JScrollPane();
    jscrollpane1.setViewportView(listSourceColumns);
    jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jpanel1.add(jscrollpane1, cc.xywh(2, 5, 6, 8));

    lblDdl.setName("lblDdl");
    lblDdl.setText("DDL");
    jpanel1.add(lblDdl, cc.xy(2, 14));

    taDdl.setName("taDdl");
    JScrollPane jscrollpane2 = new JScrollPane();
    jscrollpane2.setViewportView(taDdl);
    jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jpanel1.add(jscrollpane2, cc.xywh(2, 16, 14, 1));

    btnRemove.setActionCommand("<");
    btnRemove.setName("btnRemove");
    btnRemove.setText("<");
    btnRemove.setToolTipText("remove the selected target columns");
    jpanel1.add(btnRemove, cc.xy(9, 11));

    btnAdd.setActionCommand(">");
    btnAdd.setName("btnAdd");
    btnAdd.setText(">");
    btnAdd.setToolTipText("add the selected source column to the target columns");
    jpanel1.add(btnAdd, cc.xy(9, 5));

    btnAddAll.setActionCommand(">>");
    btnAddAll.setName("btnAddAll");
    btnAddAll.setText(">>");
    btnAddAll.setToolTipText("add all columns to the target columns");
    jpanel1.add(btnAddAll, cc.xy(9, 7));

    btnRemoveAll.setActionCommand("<<");
    btnRemoveAll.setName("btnRemoveAll");
    btnRemoveAll.setText("<<");
    btnRemoveAll.setToolTipText("remove all target columns");
    jpanel1.add(btnRemoveAll, cc.xy(9, 9));

    lblIndexname.setName("lblIndexname");
    lblIndexname.setText("index name");
    jpanel1.add(lblIndexname, cc.xy(11, 2));

    tfName.setName("tfName");
    jpanel1.add(tfName, cc.xywh(13, 2, 3, 1));

    lblTitleListTargetColumns.setName("lblTitleListTargetColumns");
    lblTitleListTargetColumns.setText("target columns:");
    jpanel1.add(lblTitleListTargetColumns, cc.xywh(11, 4, 3, 1));

    listTargetColumns.setName("listTargetColumns");
    JScrollPane jscrollpane3 = new JScrollPane();
    jscrollpane3.setViewportView(listTargetColumns);
    jscrollpane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jpanel1.add(jscrollpane3, cc.xywh(11, 5, 5, 8));

    btnExecuteDdl.setActionCommand("-> SQL");
    btnExecuteDdl.setName("btnExecuteDdl");
    btnExecuteDdl.setText("execute");
    btnExecuteDdl.setToolTipText("execute the created ddl statement");
    jpanel1.add(btnExecuteDdl, cc.xy(15, 14));

    return jpanel1;
}

From source file:net.sourceforge.squirrel_sql.plugins.smarttools.gui.SmarttoolFindBadNullValuesFrame.java

License:Open Source License

public JPanel createPanel() {
    JPanel jpanel1 = new JPanel();
    FormLayout formlayout1 = new FormLayout(
            "FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE",
            "CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);/* ww w .j av  a 2s  . co  m*/

    pbMain.setName("pbMain");
    pbMain.setValue(25);
    jpanel1.add(pbMain, cc.xywh(2, 11, 3, 1));

    tblResult.setName("taResult");
    JScrollPane jscrollpane1 = new JScrollPane();
    jscrollpane1.setViewportView(tblResult);
    jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jpanel1.add(jscrollpane1, cc.xywh(2, 7, 3, 1));

    jpanel1.add(createpanelTableAndColumn(), cc.xy(2, 2));
    jpanel1.add(createPanelButton(), cc.xy(4, 2));
    lblTitleTableResult.setBackground(new Color(102, 102, 102));
    lblTitleTableResult.setName("lblTitleTableResult");
    lblTitleTableResult.setOpaque(true);
    lblTitleTableResult.setText(" Searching for ...");
    jpanel1.add(lblTitleTableResult, cc.xy(2, 4));

    lblFooterTableResult.setBackground(new Color(102, 102, 102));
    lblFooterTableResult.setName("lblFooterTableResult");
    lblFooterTableResult.setOpaque(true);
    lblFooterTableResult.setText(" Finshed in ...");
    jpanel1.add(lblFooterTableResult, cc.xywh(2, 9, 3, 1));

    btnPrint.setActionCommand("Print");
    btnPrint.setName("btnPrint");
    btnPrint.setText("Print");
    jpanel1.add(btnPrint, cc.xy(4, 4));

    return jpanel1;
}

From source file:net.sourceforge.squirrel_sql.plugins.smarttools.gui.SmarttoolFindBadNullValuesFrame.java

License:Open Source License

public JPanel createpanelTableAndColumn() {
    JPanel jpanel1 = new JPanel();
    jpanel1.setName("panelTableAndColumn");
    EtchedBorder etchedborder1 = new EtchedBorder(EtchedBorder.RAISED, null, null);
    jpanel1.setBorder(etchedborder1);/*from w  w w .  j  a  va 2s.co  m*/
    FormLayout formlayout1 = new FormLayout(
            "FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE",
            "CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
    CellConstraints cc = new CellConstraints();
    jpanel1.setLayout(formlayout1);

    lblTitleTable.setBackground(new Color(102, 102, 102));
    lblTitleTable.setName("lblTitleTable");
    lblTitleTable.setOpaque(true);
    lblTitleTable.setText(" Used tables");
    jpanel1.add(lblTitleTable, cc.xywh(1, 1, 5, 1));

    lblTablename.setName("lblTablename");
    lblTablename.setText("table name");
    jpanel1.add(lblTablename, cc.xy(2, 3));

    tfTablename.setName("tfTablename");
    jpanel1.add(tfTablename, cc.xy(4, 3));

    return jpanel1;
}