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

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

Introduction

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

Prototype

public CellConstraints xy(int col, int row) 

Source Link

Document

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

Examples:

 cc.xy(1, 1); cc.xy(1, 3); 

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();/*ww  w  .j  a  v a 2s .  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 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;
}

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

License:Common Public License

private JComponent createScalingPanel() {
    FormLayout layout = new FormLayout("8dlu, p, 3dlu,30dlu,3dlu,p,3dlu,p,p,p,8dlu",
            "p, 3dlu,p,10dlu,p,3dlu,p,3dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(scaleTo, cc.xy(2, 1));
    builder.add(scaleToWidth, cc.xy(4, 1));
    builder.add(scaleToWidthLabel, cc.xy(6, 1));
    builder.add(constrainProportions, cc.xy(8, 1));
    JLabel l = new JLabel(Messages.getString("PageSetupDialog.Scaling.FitToProportions") + " "
            + Messages.getString("PageSetupDialog.Scaling.FitToProportions2"));
    initFont(l);// w  ww  . ja  v a  2  s  .  c  o m
    builder.add(scaleToProportions, cc.xy(9, 1));
    builder.add(scaleToProportions2, cc.xy(10, 1));
    builder.add(scaleToHeight, cc.xy(4, 3));
    builder.add(scaleToHeightLabel, cc.xy(6, 3));

    builder.add(fitTo, cc.xy(2, 5));
    builder.add(fitToWidth, cc.xy(4, 5));
    builder.add(fitToWidthLabel, cc.xy(6, 5));
    builder.add(fitToHeight, cc.xy(4, 7));
    builder.add(fitToHeightLabel, cc.xy(6, 7));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Scaling")));
    return panel;
}

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

License:Common Public License

private JComponent createFlowScalingPanel() {
    FormLayout layout = new FormLayout("1dlu, 5dlu,p,22dlu,3dlu,p,1dlu",
            "p, 3dlu,p,3dlu,p,3dlu,p,p,10dlu,p,3dlu,p,3dlu,p,3dlu");

    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.add(scaleTo, cc.xyw(2, 1, 5));
    builder.add(scaleToWidth, cc.xyw(3, 3, 2));
    builder.add(scaleToWidthLabel, cc.xy(6, 3));
    builder.add(scaleToHeight, cc.xyw(3, 5, 2));
    builder.add(scaleToHeightLabel, cc.xy(6, 5));
    builder.add(constrainProportions, cc.xy(3, 7));
    builder.add(scaleToProportions, cc.xyw(4, 7, 3));
    builder.add(scaleToProportions2, cc.xyw(4, 8, 4));

    builder.add(fitTo, cc.xyw(2, 10, 5));
    builder.add(fitToWidth, cc.xyw(3, 12, 2));
    builder.add(fitToWidthLabel, cc.xy(6, 12));
    builder.add(fitToHeight, cc.xyw(3, 14, 2));
    builder.add(fitToHeightLabel, cc.xy(6, 14));
    JPanel panel = builder.getPanel();
    panel.setBorder(new TitledBorder(Messages.getString("PageSetupDialog.Scaling")));
    return panel;
}