Logo Search packages:      
Sourcecode: libjgoodies-forms-java version File versions  Download package

JComponent com::jgoodies::forms::tutorial::building::ButtonOrderExample::buildPanel (  )  [inline]

Builds and returns a panel that consists of three paragraphs that demonstrate different button orders. Each paragraph contains a button bar that is built from a button sequence, and another bar that is built from individual buttons.

Returns:
a panel that demonstrates button order

Definition at line 81 of file ButtonOrderExample.java.

References com::jgoodies::forms::builder::DefaultFormBuilder::append(), com::jgoodies::forms::builder::DefaultFormBuilder::appendSeparator(), buildButtonSequence(), buildIndividualButtons(), createRightToLeftBuilder(), com::jgoodies::forms::builder::PanelBuilder::getPanel(), and com::jgoodies::forms::builder::PanelBuilder::setDefaultDialogBorder().

                                   {
        FormLayout layout = new FormLayout("right:pref:grow, 4dlu, pref");
        DefaultFormBuilder rowBuilder = new DefaultFormBuilder(layout);
        rowBuilder.setDefaultDialogBorder();
        
        rowBuilder.appendSeparator("Left to Right");
        rowBuilder.append("Ordered", buildButtonSequence(ButtonBarBuilder.createLeftToRightBuilder()));
        rowBuilder.append("Fixed",   buildIndividualButtons(ButtonBarBuilder.createLeftToRightBuilder()));
        
        rowBuilder.appendSeparator("Right to Left");
        rowBuilder.append("Ordered", buildButtonSequence(createRightToLeftBuilder()));
        rowBuilder.append("Fixed",   buildIndividualButtons(createRightToLeftBuilder()));
        
        rowBuilder.appendSeparator("Platform Default Order");
        rowBuilder.append("Ordered", buildButtonSequence(new ButtonBarBuilder()));
        rowBuilder.append("Fixed",   buildIndividualButtons(new ButtonBarBuilder()));
        
        return rowBuilder.getPanel();
    }


Generated by  Doxygen 1.6.0   Back to index