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

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

Introduction

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

Prototype

@Override
public final String toString() 

Source Link

Document

Returns a string representation of this form specification.

Usage

From source file:ai.aitia.meme.utils.FormsUtils.java

License:Open Source License

/** Converts a RowSpec object to parseable string format */
public static String parseableRowSpec(RowSpec rowspec) {
    return parseableSize(rowspec.toString()).replace(":noGrow", "");
}

From source file:com.jeta.swingbuilder.gui.editor.FormEditor.java

License:Open Source License

/**
 * Updates the status bar to display the column and row specs for the given
 * component.//  ww  w .  j  av  a 2s.c  o m
 */
private void updateStatusBar() {
    m_colcell.setText("");
    m_rowcell.setText("");
    if (m_formcell != null) {
        m_formcell.setText("");
        m_parentcell.setText("");
    }

    GridComponent gc = getSelectedComponent();

    if (gc != null) {
        GridView view = gc.getParentView();
        if (view != null) {
            ColumnSpec cspec = view.getColumnSpec(gc.getColumn());
            m_colcell.setText(I18N.format("column_spec_2", new Integer(gc.getColumn()), cspec.toString()));
            RowSpec rspec = view.getRowSpec(gc.getRow());
            m_rowcell.setText(I18N.format("row_spec_2", new Integer(gc.getRow()), rspec.toString()));

        }

        if (gc instanceof FormComponent) {
            FormComponent fc = (FormComponent) gc;
            if (fc.isLinked()) {
                m_formtype_cell.setIcon(m_linked_icon);
            } else {
                m_formtype_cell.setIcon(m_embedded_icon);
            }

            if (m_formcell != null) {
                m_formcell.setText("Form: " + gc.getId());
                FormComponent parent = fc.getParentForm();
                if (parent != null) {
                    m_parentcell.setText("Parent Form: " + parent.getId());
                }
            }
        } else {
            m_formtype_cell.setIcon(null);
        }
        // gc.print();
    }
}