Example usage for com.jgoodies.forms.layout RowSpec getDefaultAlignment

List of usage examples for com.jgoodies.forms.layout RowSpec getDefaultAlignment

Introduction

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

Prototype

public final DefaultAlignment getDefaultAlignment() 

Source Link

Document

Returns the default alignment.

Usage

From source file:com.intellij.uiDesigner.radComponents.RadFormLayoutManager.java

License:Apache License

@Override
public void processCellResized(RadContainer container, final boolean isRow, final int cell, final int newSize) {
    FormLayout formLayout = (FormLayout) container.getLayout();
    final ConstantSize updatedSize = getUpdatedSize(container, isRow, cell, newSize);
    FormSpec newSpec;/*w w  w  .j av a2 s .  c o m*/
    if (isRow) {
        RowSpec rowSpec = formLayout.getRowSpec(cell + 1);
        newSpec = new RowSpec(rowSpec.getDefaultAlignment(), updatedSize, rowSpec.getResizeWeight());
    } else {
        ColumnSpec colSpec = formLayout.getColumnSpec(cell + 1);
        newSpec = new ColumnSpec(colSpec.getDefaultAlignment(), updatedSize, colSpec.getResizeWeight());
    }
    setSpec(formLayout, newSpec, cell + 1, isRow);
    resizeSameGroupCells(cell, formLayout, newSpec, isRow);
}

From source file:com.jeta.swingbuilder.gui.commands.EditRowSpecCommand.java

License:Open Source License

/**
 * ctor//w w  w.ja v  a 2s .c om
 */
public EditRowSpecCommand(FormComponent form, int row, RowSpec rowspec, RowSpec oldspec) {
    super(form);
    m_row = row;
    m_rowspec = rowspec;
    /**
     * note that you must create a copy of the oldspec here because the
     * reference passed to the constructor is probabaly bound to the view
     * and will change
     */
    m_oldspec = new RowSpec(oldspec.getDefaultAlignment(), oldspec.getSize(), oldspec.getResizeWeight());
}