Example usage for com.jgoodies.forms.factories CC rc

List of usage examples for com.jgoodies.forms.factories CC rc

Introduction

In this page you can find the example usage for com.jgoodies.forms.factories CC rc.

Prototype

public static CellConstraints rc(int row, int col) 

Source Link

Document

Sets row and column origins; sets height and width to 1; uses the default alignments.

Examples:

 CC.rc(1, 1); CC.rc(3, 1); 

Usage

From source file:edu.udo.scaffoldhunter.gui.datacalculation.CalcDialog.java

License:Open Source License

private JPanel buildControlPanel(ListModel pluginListModel, JobsModel jobs) {
    PanelBuilder builder = new PanelBuilder(new FormLayout("max(120dlu;p):g, p",
            "3dlu, p, 3dlu, f:p:g(0.5), 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, f:p:g(0.75)"));
    builder.addSeparator(_("DataCalc.Plugins"), CC.rcw(2, 1, 2));
    pluginList = new JList(pluginListModel);
    pluginList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    pluginList.setSelectedIndex(0);/*from   w w  w. j av  a 2 s .  c om*/
    builder.add(pluginList, CC.rcw(4, 1, 2));

    builder.addSeparator(_("DataCalc.CalcJobs"), CC.rcw(6, 1, 2));
    joblist = new JList(jobs);
    joblist.setSelectionModel(jobs.getListSelectionModel());
    joblist.clearSelection();
    JScrollPane jobscrollpane = new JScrollPane(joblist);
    builder.add(jobscrollpane, CC.rchw(8, 1, 6, 1));
    builder.add(getMoveUpButton(), CC.rc(8, 2));
    builder.add(getMoveDownButton(), CC.rc(10, 2));
    builder.add(getDeleteButton(), CC.rc(12, 2));

    pluginList.addListSelectionListener(this);
    joblist.addListSelectionListener(this);

    return builder.getPanel();
}

From source file:edu.udo.scaffoldhunter.gui.dataimport.ImportDialog.java

License:Open Source License

private JPanel buildControlPanel(ListModel pluginListModel, JobsModel jobs) {
    PanelBuilder builder = new PanelBuilder(new FormLayout("min(120dlu;p):g, p",
            "3dlu, p, 3dlu, f:p:g(0.25), 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, f:p:g(0.75)"));
    builder.addSeparator(_("DataImport.Plugins"), CC.rcw(2, 1, 2));
    pluginList = new JList(pluginListModel);
    pluginList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    pluginList.setSelectedIndex(0);/*from ww w.  j av  a2s . c o  m*/
    builder.add(new JScrollPane(pluginList), CC.rcw(4, 1, 2));

    builder.addSeparator(_("DataImport.ImportJobs"), CC.rcw(6, 1, 2));
    joblist = new JList(jobs);
    joblist.setSelectionModel(jobs.getListSelectionModel());
    joblist.clearSelection();
    builder.add(new JScrollPane(joblist), CC.rchw(8, 1, 6, 1));
    builder.add(getMoveUpButton(), CC.rc(8, 2));
    builder.add(getMoveDownButton(), CC.rc(10, 2));
    builder.add(getDeleteButton(), CC.rc(12, 2));

    pluginList.addListSelectionListener(this);
    joblist.addListSelectionListener(this);

    return builder.getPanel();
}

From source file:edu.udo.scaffoldhunter.gui.datasetmanagement.TreegenProgressDialog.java

License:Open Source License

/**
 * Initializes the GUI of this dialog./*w w w.  ja v  a  2  s  . co  m*/
 */
private void initGUI(Component parent, ProgressPanel<?> progressPanel) {
    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    setResizable(false);
    JPanel contenPanel = (JPanel) getContentPane();
    contenPanel.setBorder(null);
    contenPanel.setBorder(Borders.DIALOG_BORDER);
    getContentPane().setLayout(new FormLayout("p", "f:p:g, 5dlu, f:p:g, p"));
    getContentPane().add(progressPanel, CC.rc(1, 1));

    messages = new JTextArea();
    messages.setEditable(false);
    messages.setRows(10);
    messages.setColumns(25);

    scrollpane = new JScrollPane(messages);
    getContentPane().add(scrollpane, CC.rc(3, 1));

    cancelCloseButton = new JButton(new CancelCloseAction());
    getContentPane().add(ButtonBarFactory.buildCenteredBar(cancelCloseButton), CC.rc(4, 1));

    pack();

    setLocationRelativeTo(parent);
}