Package com.jgoodies.forms.layout

Examples of com.jgoodies.forms.layout.RowSpec


     * @param layout   the {@code FormLayout} to inspect
     */
    public static void dumpRowSpecs(FormLayout layout) {
        System.out.print("ROW SPECS:   ");
        for (int row = 1; row <= layout.getRowCount(); row++) {
            RowSpec rowSpec = layout.getRowSpec(row);
            System.out.print(rowSpec.toShortString());
            if (row < layout.getRowCount()) {
                System.out.print(", ");
            }
        }
        System.out.println();
View Full Code Here


     * Adds a strut of a specified size.
     *
     * @param size  a constant that describes the gap
     */
    public void addStrut(ConstantSize size) {
        getLayout().appendRow(new RowSpec(RowSpec.TOP,
                                          size,
                                          RowSpec.NO_GROW));
        nextRow();
    }
View Full Code Here

     *
     * @param lineGapSize   the {@code ConstantSize} that describes
     *     the size of the gaps between component lines
     */
    public void setLineGapSize(ConstantSize lineGapSize) {
        RowSpec rowSpec = RowSpec.createGap(lineGapSize);
        this.lineGapSpec = rowSpec;
    }
View Full Code Here

     *
     * @param paragraphGapSize   the {@code ConstantSize} that describes
     *     the size of the gaps between paragraphs
     */
    public void setParagraphGapSize(ConstantSize paragraphGapSize) {
        RowSpec rowSpec = RowSpec.createGap(paragraphGapSize);
        this.paragraphGapSpec = rowSpec;
    }
View Full Code Here

        if (getRow() == 1 || getRow() <= getRowCount()) {
            return;
        }

        if (getRow() <= getRowCount()) {
            RowSpec rowSpec = getCursorRowSpec();
            if (rowSpec == gapRowSpec) {
                return;
            }
        }
        appendRow(gapRowSpec);
View Full Code Here

    }

    private static RowSpec[] getDefaultRowsWithGap(int rowCount) {
        List<RowSpec> rows = new ArrayList<RowSpec>();
        for (int i = 0; i < rowCount; i++) {
            rows.add(new RowSpec("fill:pref:nogrow"));
            rows.add(FormFactory.LINE_GAP_ROWSPEC);
        }
        rows.remove(rows.size() - 1);
        return rows.toArray(new RowSpec[] {});
    }
View Full Code Here

     * @param minimumSize
     * @see #setRowSpec(RowSpec)
     */
    public void setMinimumButtonSize(Size minimumSize)
    {
        this.rowSpec = new RowSpec(minimumSize);
    }
View Full Code Here

    }
    final JLabel label = new JLabel(labelText, icon, JLabel.RIGHT);
    String tooltip = TextUtils.getOptionalText(getTooltip());
    label.setToolTipText(tooltip);
    if (KeyProperty.rowSpec == null) {
      KeyProperty.rowSpec = new RowSpec(RowSpec.FILL, Sizes.dluX(20), 0.0);
    }
    if (3 < builder.getColumn()) {
      builder.appendRelatedComponentsGapRow();
      builder.appendRow(KeyProperty.rowSpec);
      builder.nextLine(2);
View Full Code Here

        new ColumnSpec( ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW ),
        FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
        new ColumnSpec( ColumnSpec.FILL, Sizes.PREFERRED, FormSpec.NO_GROW ),
      },
      new RowSpec[]{
        new RowSpec( RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW ),
        FormFactory.LINE_GAP_ROWSPEC,
        new RowSpec( RowSpec.FILL, Sizes.dluY( 60 ), FormSpec.DEFAULT_GROW )
      } ) );

    //---- tagCombo ----
    tagCombo.setEditable( true );
    add( tagCombo, cc.xy( 1, 1 ) );

    //---- addButton ----
    addButton.setText( "+" );
    add( addButton, cc.xy( 3, 1 ) );

    //======== scrollPane1 ========
    {
      scrollPane1.setViewportView( tagList );
    }
    add( scrollPane1, cc.xy( 1, 3 ) );

    //======== panel1 ========
    {
      panel1.setLayout( new FormLayout(
        new ColumnSpec[]{
          new ColumnSpec( ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW )
        },
        new RowSpec[]{
          new RowSpec( RowSpec.TOP, Sizes.DEFAULT, FormSpec.DEFAULT_GROW )
        }
      ) );

      //---- removeButton ----
      removeButton.setText( "-" );
View Full Code Here

            }

            public void componentResized(ComponentEvent e) {
                int delta = e.getComponent().getHeight() - height;
                if (delta < 0) {
                    fL.setRowSpec(3, new RowSpec("fill:min(10dlu;pref):grow"));
                    fLEmb.setRowSpec(1, new RowSpec("fill:min(10dlu;pref):grow"));
                }
            }

            public void componentShown(ComponentEvent e) {
                height = e.getComponent().getHeight();
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.layout.RowSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.