public final class ListViewBuilder extends Object
Examples:
| Constructor and Description |
|---|
ListViewBuilder()
Constructs a ListViewBuilder using the AbstractBuilder'
default component factory.
|
ListViewBuilder(ComponentFactory factory)
Constructs a ListViewBuilder using the given component factory.
|
| Modifier and Type | Method and Description |
|---|---|
ListViewBuilder |
border(Border border)
Sets an optional border that surrounds the list view includin
the label and details.
|
JComponent |
build()
Lazily builds and returns the list view panel.
|
ListViewBuilder |
detailsView(JComponent detailsView)
Sets an optional details view that is located under the list view.
|
ListViewBuilder |
filterView(JComponent filterView)
Sets an optional view that will be placed in the upper right corne
of the built list view panel.
|
ListViewBuilder |
filterViewColSpec(String colSpec)
Changes the FormLayout column specification used to lay ou
the filter view.
|
ListViewBuilder |
focusTraversal(FocusTraversalPolicy policy)
Sets the panel's focus traversal policy and sets the pane
as focus traversal policy provider.
|
ListViewBuilder |
headerLabel(String markedText)
Creates a header label for the given marked text and sets it as label view.
|
ListViewBuilder |
honorVisibility(boolean b)
Specifies whether invisible components shall be taken into account b
this builder for computing the layout size and setting component bounds.
|
ListViewBuilder |
label(String markedText)
Creates a plain label for the given marked text and sets it as label view.
|
ListViewBuilder |
labelView(JComponent labelView)
Sets the mandatory label view.
|
ListViewBuilder |
listBar(JComponent... buttons)
Builds a button bar using the given buttons and sets it as list bar.
|
ListViewBuilder |
listBarView(JComponent listBarView)
Sets an optional list bar - often a button bar
that will be located in the lower left corner of the list view.
|
ListViewBuilder |
listExtrasView(JComponent listExtrasView)
Sets an optional view that is located in the lower right corne
of the list view, aligned with the list bar.
|
ListViewBuilder |
listView(JComponent listView)
Sets the given component as the the mandatory list view.
|
ListViewBuilder |
listViewRowSpec(String rowSpec)
Changes the FormLayout row specification used to lay out the list view.
|
ListViewBuilder |
namePrefix(String namePrefix)
Sets the prefix that is prepended to component name of component
that have no name set or that are are implicitly created by this builder
e.g. the (header) label.
|
public ListViewBuilder()
label(String) and headerLabel(String).public ListViewBuilder(ComponentFactory factory)
label(String) and headerLabel(String).factory - the component factory used to create labels and headerspublic ListViewBuilder border(Border border)
border - the border to setpublic ListViewBuilder focusTraversal(FocusTraversalPolicy policy)
policy - the focus traversal policy that will manag
keyboard traversal of the children in this builder's panelContainer.setFocusTraversalPolicy(FocusTraversalPolicy),
Container.setFocusTraversalPolicyProvider(boolean)public ListViewBuilder honorVisibility(boolean b)
true invisible components will be ignored b
the layout. If set to false components will be taken int
account regardless of their visibility. Visible components are alway
used for sizing and positioning.true
It is useful to set the value to false (in other word
to ignore the visibility) if you switch the component visibilit
dynamically and want the container to retain the size an
component positions.
b - true to honor the visibility, i.e. to exclud
invisible components from the sizing and positioning
false to ignore the visibility, in other words t
layout visible and invisible componentspublic ListViewBuilder namePrefix(String namePrefix)
namePrefix - the prefix to be usedpublic ListViewBuilder labelView(JComponent labelView)
labelView - the component that shall label the list view
often a bound labelpublic ListViewBuilder label(String markedText)
markedText - the label's text, may contain a mnemonic markerpublic ListViewBuilder headerLabel(String markedText)
markedText - the label's text, may contain a mnemonic markerpublic ListViewBuilder filterView(JComponent filterView)
filterView - the view to be added.public ListViewBuilder filterViewColSpec(String colSpec)
"[100dlu, p]", which is a column wher
the width is determined by the filter view's preferred width
but a minimum width of 100dlu is ensured. The filter view won't gro
horizontally, if the container gets more space.colSpec - specifies the horizontal layout of the filter viewNullPointerException - if colSpec is nullpublic ListViewBuilder listView(JComponent listView)
listView is a JTable, JList, or JTree, it i
automatically wrapped with a JScrollPane, before the scroll pan
is set as list view.listView - the component to be used as scrollable list viewNullPointerException - if listView is nullpublic ListViewBuilder listViewRowSpec(String rowSpec)
"fill:[100dlu, pref]:grow", which is a ro
that is filled by the list view; the height is determine
by the list view's preferred height, but a minimum of 100dlu is ensured
The list view grows vertically, if the container gets more vertica
space.Examples:
rowSpec - specifies the vertical layout of the list viewNullPointerException - if rowSpec is nullpublic ListViewBuilder listBarView(JComponent listBarView)
listBar(JComponent...) instead.listBarView - the component to setpublic ListViewBuilder listBar(JComponent... buttons)
listBarView(Forms.buildButtonBar(buttons)).
buttons - the buttons in the list barNullPointerException - if buttons is nullIllegalArgumentException - if no buttons are providedButtonBarBuilder.addButton(JComponent...)public ListViewBuilder listExtrasView(JComponent listExtrasView)
listExtrasView - the component to setpublic ListViewBuilder detailsView(JComponent detailsView)
detailsView - the component to setpublic JComponent build()
Copyright © 2002-2014 JGoodies Software GmbH. All Rights Reserved.