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

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

Introduction

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

Prototype

public CellConstraints() 

Source Link

Document

Constructs a default instance of CellConstraints .

Usage

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createDialogPanel() {
    FormLayout layout = new FormLayout("p, 3dlu, p, 3dlu", "p, 3dlu,p, 3dlu, p, 3dlu,p,3dlu");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.setDefaultDialogBorder();//from   w w w  . j a  v a 2  s .c o m
    builder.add(createPrinterPanel(), cc.xyw(1, 1, 3));
    builder.add(createPaperPanel(), cc.xywh(1, 3, 1, 3));
    builder.add(createOrientationPanel(), cc.xy(3, 3));
    builder.add(createMarginsPanel(), cc.xy(3, 5));
    builder.add(createScalingPanel(), cc.xyw(1, 7, 3));
    return builder.getPanel();
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createPaperPanel() {
    FormLayout layout = new FormLayout("8dlu, p,p,8dlu", "p, 3dlu:grow,p, 2dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(createPaperSizePanel(), cc.xyw(2, 1, 2));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Paper")));
    return panel;
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createFlowPaperPanel() {
    FormLayout layout = new FormLayout("1dlu, p,p,p:grow,1dlu", "p, 3dlu:grow, 2dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(createFlowPaperSizePanel(), cc.xyw(2, 1, 3));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Paper")));
    return panel;
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createPaperSizePanel() {
    FormLayout layout = new FormLayout("p, 3dlu,50dlu", "p, 3dlu, p, 3dlu, p");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(paperSize, cc.xyw(1, 1, 3));
    builder.add(paperWidthLabel, cc.xy(1, 3));
    builder.add(paperWidth, cc.xy(3, 3));
    builder.add(paperHeightLabel, cc.xy(1, 5));
    builder.add(paperHeight, cc.xy(3, 5));
    return builder.getPanel();
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createFlowPaperSizePanel() {
    FormLayout layout = new FormLayout("p, 3dlu,40dlu", "p, 3dlu, p, 3dlu, p");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(paperSize, cc.xyw(1, 1, 3));
    builder.add(paperWidthLabel, cc.xy(1, 3));
    builder.add(paperWidth, cc.xy(3, 3));
    builder.add(paperHeightLabel, cc.xy(1, 5));
    builder.add(paperHeight, cc.xy(3, 5));
    return builder.getPanel();
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createOrientationPanel() {
    FormLayout layout = new FormLayout("8dlu, 100dlu, 8dlu", "p,2dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(orientation, cc.xy(2, 1));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Orientation")));
    return panel;
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createFlowOrientationPanel() {
    FormLayout layout = new FormLayout("1dlu, p:grow, 1dlu", "p,2dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(orientation, cc.xy(2, 1));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Orientation")));
    return panel;
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createMarginsPanel() {
    FormLayout layout = new FormLayout("8dlu, 50dlu, 3dlu, 50dlu, 8dlu", "p,1dlu,p,3dlu, p,1dlu,p,2dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(marginLeftLabel, cc.xy(2, 1));
    builder.add(marginLeft, cc.xy(2, 3));
    builder.add(marginRightLabel, cc.xy(4, 1));
    builder.add(marginRight, cc.xy(4, 3));
    builder.add(marginTopLabel, cc.xy(2, 5));
    builder.add(marginTop, cc.xy(2, 7));
    builder.add(marginBottomLabel, cc.xy(4, 5));
    builder.add(marginBottom, cc.xy(4, 7));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Margins")));
    return panel;
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createFlowMarginsPanel() {
    FormLayout layout = new FormLayout("1dlu, 41dlu, 3dlu, 41dlu, 1dlu", "p,1dlu,p,3dlu, p,1dlu,p,2dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(marginLeftLabel, cc.xy(2, 1));
    builder.add(marginLeft, cc.xy(2, 3));
    builder.add(marginRightLabel, cc.xy(4, 1));
    builder.add(marginRight, cc.xy(4, 3));
    builder.add(marginTopLabel, cc.xy(2, 5));
    builder.add(marginTop, cc.xy(2, 7));
    builder.add(marginBottomLabel, cc.xy(4, 5));
    builder.add(marginBottom, cc.xy(4, 7));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Margins")));
    return panel;
}

From source file:com.projity.print.PageSetup.java

License:Common Public License

private JComponent createFlowPartPanel() {
    FormLayout layout = new FormLayout("1dlu, p, 1dlu", "p,3dlu, p");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    if (printSpreadSheet != null)
        builder.add(printSpreadSheet, cc.xy(2, 1));
    if (printGantt != null)
        builder.add(printGantt, cc.xy(2, 3));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.ShowParts")));
    return panel;
}