org.seasar.swing.builder
クラス ComponentBuilder
java.lang.Object
org.seasar.swing.builder.Builder
org.seasar.swing.builder.ComponentBuilder
public class ComponentBuilder
- extends Builder
ComponentBuilder
を使用すると、Swingのコンポーネント階層を簡潔な記述で構築することができます。
以下のコードは、ComponentBuilder
の使用方法の一例を示しています。
ComponentBuilder b = new ComponentBuilder();
b.build(contentPane,
b.component(toolBar, b.north(),
b.button("newFile"),
b.button("openFile")
),
b.splitPane(b.center(),
b.scrollPane(tree), // left component
b.scrollPane(editorPane) // right component
),
b.component(statusBar, b.south())
);
- 作成者:
- kaiseh
メソッドの概要 |
void |
build(java.awt.Container root,
java.lang.Object... children)
|
ComponentNode |
button(java.lang.String actionName)
|
ComponentConstraint |
center()
|
ComponentNode |
component(java.awt.Component component)
|
ComponentNode |
component(java.awt.Component component,
ComponentConstraint constraint,
java.lang.Object... children)
|
ComponentConstraint |
constraint(java.lang.Object constraint)
|
ComponentConstraint |
east()
|
ComponentConstraint |
north()
|
ScrollPaneNode |
scrollPane(java.awt.Component view)
|
ScrollPaneNode |
scrollPane(ComponentConstraint constraint,
java.awt.Component view)
|
ScrollPaneNode |
scrollPane(ComponentConstraint constraint,
ComponentObjectNode viewNode)
|
ScrollPaneNode |
scrollPane(ComponentObjectNode viewNode)
|
ScrollPaneNode |
scrollPane(javax.swing.JScrollPane scrollPane,
java.awt.Component view)
|
ScrollPaneNode |
scrollPane(javax.swing.JScrollPane scrollPane,
ComponentConstraint constraint,
java.awt.Component view)
|
ScrollPaneNode |
scrollPane(javax.swing.JScrollPane scrollPane,
ComponentConstraint constraint,
ComponentObjectNode viewNode)
|
ScrollPaneNode |
scrollPane(javax.swing.JScrollPane scrollPane,
ComponentObjectNode viewNode)
|
ComponentConstraint |
south()
|
SplitPaneNode |
splitPane(ComponentConstraint constraint,
ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
|
SplitPaneNode |
splitPane(ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
|
SplitPaneNode |
splitPane(javax.swing.JSplitPane splitPane,
ComponentConstraint constraint,
ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
|
SplitPaneNode |
splitPane(javax.swing.JSplitPane splitPane,
ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
|
TabNode |
tab(java.lang.String title,
java.awt.Component content)
|
TabNode |
tab(java.lang.String title,
ComponentObjectNode contentNode)
|
TabNode |
tab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component content)
|
TabNode |
tab(java.lang.String title,
javax.swing.Icon icon,
ComponentObjectNode contentNode)
|
TabbedPaneNode |
tabbedPane(ComponentConstraint constraint,
TabNode... tabNodes)
|
TabbedPaneNode |
tabbedPane(javax.swing.JTabbedPane tabbedPane,
ComponentConstraint constraint,
TabNode... tabNodes)
|
TabbedPaneNode |
tabbedPane(javax.swing.JTabbedPane tabbedPane,
TabNode... tabNodes)
|
TabbedPaneNode |
tabbedPane(TabNode... tabNodes)
|
ComponentNode |
toolButton(java.lang.String actionName)
|
ComponentNode |
toolSeparator()
|
ComponentConstraint |
west()
|
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentBuilder
public ComponentBuilder()
ComponentBuilder
public ComponentBuilder(javax.swing.ActionMap actionMap)
ComponentBuilder
public ComponentBuilder(ViewManager viewManager)
build
public void build(java.awt.Container root,
java.lang.Object... children)
component
public ComponentNode component(java.awt.Component component)
component
public ComponentNode component(java.awt.Component component,
ComponentConstraint constraint,
java.lang.Object... children)
button
public ComponentNode button(java.lang.String actionName)
toolButton
public ComponentNode toolButton(java.lang.String actionName)
toolSeparator
public ComponentNode toolSeparator()
scrollPane
public ScrollPaneNode scrollPane(java.awt.Component view)
scrollPane
public ScrollPaneNode scrollPane(ComponentObjectNode viewNode)
scrollPane
public ScrollPaneNode scrollPane(javax.swing.JScrollPane scrollPane,
java.awt.Component view)
scrollPane
public ScrollPaneNode scrollPane(javax.swing.JScrollPane scrollPane,
ComponentObjectNode viewNode)
scrollPane
public ScrollPaneNode scrollPane(ComponentConstraint constraint,
java.awt.Component view)
scrollPane
public ScrollPaneNode scrollPane(ComponentConstraint constraint,
ComponentObjectNode viewNode)
scrollPane
public ScrollPaneNode scrollPane(javax.swing.JScrollPane scrollPane,
ComponentConstraint constraint,
java.awt.Component view)
scrollPane
public ScrollPaneNode scrollPane(javax.swing.JScrollPane scrollPane,
ComponentConstraint constraint,
ComponentObjectNode viewNode)
splitPane
public SplitPaneNode splitPane(ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
splitPane
public SplitPaneNode splitPane(ComponentConstraint constraint,
ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
splitPane
public SplitPaneNode splitPane(javax.swing.JSplitPane splitPane,
ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
splitPane
public SplitPaneNode splitPane(javax.swing.JSplitPane splitPane,
ComponentConstraint constraint,
ComponentObjectNode leftNode,
ComponentObjectNode rightNode)
tabbedPane
public TabbedPaneNode tabbedPane(TabNode... tabNodes)
tabbedPane
public TabbedPaneNode tabbedPane(ComponentConstraint constraint,
TabNode... tabNodes)
tabbedPane
public TabbedPaneNode tabbedPane(javax.swing.JTabbedPane tabbedPane,
TabNode... tabNodes)
tabbedPane
public TabbedPaneNode tabbedPane(javax.swing.JTabbedPane tabbedPane,
ComponentConstraint constraint,
TabNode... tabNodes)
tab
public TabNode tab(java.lang.String title,
java.awt.Component content)
tab
public TabNode tab(java.lang.String title,
ComponentObjectNode contentNode)
tab
public TabNode tab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component content)
tab
public TabNode tab(java.lang.String title,
javax.swing.Icon icon,
ComponentObjectNode contentNode)
constraint
public ComponentConstraint constraint(java.lang.Object constraint)
north
public ComponentConstraint north()
south
public ComponentConstraint south()
east
public ComponentConstraint east()
west
public ComponentConstraint west()
center
public ComponentConstraint center()