Java Doc for DefaultFormBuilder.java in  » Database-Client » squirrel-sql-2.6.5a » net » sourceforge » squirrel_sql » client » gui » builders » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » squirrel sql 2.6.5a » net.sourceforge.squirrel_sql.client.gui.builders 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.sourceforge.squirrel_sql.client.gui.builders.I15dPanelBuilder
   net.sourceforge.squirrel_sql.client.gui.builders.DefaultFormBuilder

DefaultFormBuilder
final public class DefaultFormBuilder extends I15dPanelBuilder (Code)
Provides a means to build consistent form-oriented panels quickly using the FormLayout . This builder combines frequently used panel building steps: add a new row, add a label, proceed to the next data column, then add a component.

This builder can map resource keys to internationalized (i15d) texts when creating text labels, titles and titled separators. Therefore you must specify a ResourceBundle in the constructor. The builder methods throw an IllegalStateException if one of the mapping builder methods is invoked and no bundle has been set.

This class is not yet part of the binary Forms library; it comes with the Forms distributions as an extra. The API is work in progress and may change without notice. If you want to use this class, you may consider copying it into your codebase.

Example:

 public void build() {
 FormLayout layout = new FormLayout(
 "right:max(40dlu;pref), 3dlu, 80dlu, 7dlu, " // 1st major colum
 + "right:max(40dlu;pref), 3dlu, 80dlu",        // 2nd major column
 "");                                         // add rows dynamically
 DefaultFormBuilder builder = new DefaultFormBuilder(layout);
 builder.setDefaultDialogBorder();
 builder.appendSeparator("Flange");
 builder.append("Identifier", identifierField);
 builder.nextLine();
 builder.append("PTI [kW]",   new JTextField());          
 builder.append("Power [kW]", new JTextField());
 builder.append("s [mm]",     new JTextField());
 builder.nextLine();
 builder.appendSeparator("Diameters");
 builder.append("da [mm]",    new JTextField());          
 builder.append("di [mm]",    new JTextField());
 builder.append("da2 [mm]",   new JTextField());          
 builder.append("di2 [mm]",   new JTextField());
 builder.append("R [mm]",     new JTextField());          
 builder.append("D [mm]",     new JTextField());
 builder.appendSeparator("Criteria");
 builder.append("Location",   buildLocationComboBox());   
 builder.append("k-factor",   new JTextField());
 builder.appendSeparator("Bolts");
 builder.append("Material",   ViewerUIFactory.buildMaterialComboBox());
 builder.nextLine();
 builder.append("Numbers",    new JTextField());
 builder.nextLine();
 builder.append("ds [mm]",    new JTextField());
 }
 

author:
   Karsten Lentzsch
See Also:   com.jgoodies.forms.builder.AbstractFormBuilder
See Also:   com.jgoodies.forms.factories.FormFactory
See Also:   com.jgoodies.forms.layout.FormLayout



Constructor Summary
public  DefaultFormBuilder(FormLayout layout)
     Constructs an instance of DefaultFormBuilder for the given layout.
public  DefaultFormBuilder(JPanel panel, FormLayout layout)
     Constructs an instance of DefaultFormBuilder for the given panel and layout.
public  DefaultFormBuilder(FormLayout layout, ResourceBundle bundle)
     Constructs an instance of DefaultFormBuilder for the given layout and resource bundle.
public  DefaultFormBuilder(JPanel panel, FormLayout layout, ResourceBundle bundle)
     Constructs an instance of DefaultFormBuilder for the given panel, layout and resource bundle.

Method Summary
public  voidappend(Component component)
     Adds a component to the panel using the default constraints.
public  voidappend(Component component, int columnSpan)
     Adds a component to the panel using the default constraints with the given columnSpan.
public  voidappend(Component c1, Component c2)
     Adds two components to the panel; each component will span a single data column.
public  voidappend(Component c1, Component c2, Component c3)
     Adds three components to the panel; each component will span a single data column.
public  JLabelappend(String textWithMnemonic)
     Adds a text label to the panel and proceeds to the next column.
public  JLabelappend(String textWithMnemonic, Component component)
     Adds a text label and component to the panel.
public  JLabelappend(String textWithMnemonic, Component c, int columnSpan)
     Adds a text label and component to the panel; the component will span the specified number columns.
public  JLabelappend(String textWithMnemonic, Component c1, Component c2)
     Adds a text label and two components to the panel; each component will span a single column.
public  voidappend(String textWithMnemonic, Component c1, Component c2, int colSpan)
     Adds a text label and two components to the panel; each component will span a single column.
public  JLabelappend(String textWithMnemonic, Component c1, Component c2, Component c3)
     Adds a text label and three components to the panel; each component will span a single column.
public  JLabelappend(String textWithMnemonic, Component c1, Component c2, Component c3, Component c4)
     Adds a text label and four components to the panel; each component will span a single column.
public  JLabelappendI15d(String resourceKey)
     Adds an internationalized (i15d) text label to the panel using the given resource key and proceeds to the next column.
public  JLabelappendI15d(String resourceKey, Component c, int columnSpan)
     Adds an internationalized (i15d) text label to the panel using the given resource key; then proceeds to the next data column and adds a component with the given column span.
public  JLabelappendI15d(String resourceKey, Component component)
     Adds an internationalized (i15d) text label and component to the panel.
public  JLabelappendI15d(String resourceKey, Component component, boolean nextLine)
     Adds an internationalized (i15d) text label and component to the panel.
public  JLabelappendI15d(String resourceKey, Component c1, Component c2)
     Adds an internationalized (i15d) text label and two components to the panel; each component will span a single column.
public  JLabelappendI15d(String resourceKey, Component c1, Component c2, int colSpan)
     Adds an internationalized (i15d) text label and two components to the panel; each component will span a single column.
public  JLabelappendI15d(String resourceKey, Component c1, Component c2, Component c3)
     Adds an internationalized (i15d) text label and three components to the panel; each component will span a single column.
public  JLabelappendI15d(String resourceKey, Component c1, Component c2, Component c3, Component c4)
     Adds an internationalized (i15d) text label and four components to the panel; each component will span a single column.
public  voidappendI15dSeparator(String resourceKey)
     Appends an internationalized titled separator for the given resource key that spans all columns.
public  JLabelappendI15dTitle(String resourceKey)
     Adds an internationalized title label to the panel and proceeds to the next column.
public  JComponentappendSeparator()
     Adds a separator without text that spans all columns.
public  JComponentappendSeparator(String text)
     Adds a separator with the given text that spans all columns.
public  JLabelappendTitle(String textWithMnemonic)
     Adds a title label to the panel and proceeds to the next column.
protected  intgetLeadingColumn()
     Returns the leading column.
public  intgetLeadingColumnOffset()
     Returns the offset of the leading column, often 0 or 1.
public  RowSpecgetLineGapSpec()
     Returns the row specification that is used to separate component lines.
public  booleanisRowGroupingEnabled()
     Returns whether new data rows are being grouped or not.
public  voidsetLeadingColumnOffset(int columnOffset)
     Sets the offset of the leading column, often 0 or 1.
public  voidsetLineGapSize(ConstantSize lineGapSize)
     Sets the size of gaps between component lines using the given constant size.
public  voidsetParagraphGapSize(ConstantSize paragraphGapSize)
     Sets the size of gaps between paragraphs using the given constant size.
public  voidsetRowGroupingEnabled(boolean enabled)
     Enables or disables the grouping of new data rows.


Constructor Detail
DefaultFormBuilder
public DefaultFormBuilder(FormLayout layout)(Code)
Constructs an instance of DefaultFormBuilder for the given layout.
Parameters:
  layout - the FormLayout to be used



DefaultFormBuilder
public DefaultFormBuilder(JPanel panel, FormLayout layout)(Code)
Constructs an instance of DefaultFormBuilder for the given panel and layout.
Parameters:
  panel - the layout container
Parameters:
  layout - the FormLayout to be used



DefaultFormBuilder
public DefaultFormBuilder(FormLayout layout, ResourceBundle bundle)(Code)
Constructs an instance of DefaultFormBuilder for the given layout and resource bundle.
Parameters:
  layout - the FormLayout to be used
Parameters:
  bundle - the ResourceBundle used to lookup i15dstrings



DefaultFormBuilder
public DefaultFormBuilder(JPanel panel, FormLayout layout, ResourceBundle bundle)(Code)
Constructs an instance of DefaultFormBuilder for the given panel, layout and resource bundle.
Parameters:
  panel - the layout container
Parameters:
  layout - the FormLayout to be used
Parameters:
  bundle - the ResourceBundle used to lookup i15dstrings




Method Detail
append
public void append(Component component)(Code)
Adds a component to the panel using the default constraints. Proceeds to the next data column.
Parameters:
  component - the component to add



append
public void append(Component component, int columnSpan)(Code)
Adds a component to the panel using the default constraints with the given columnSpan. Proceeds to the next data column.
Parameters:
  component - the component to append
Parameters:
  columnSpan - the column span used to add



append
public void append(Component c1, Component c2)(Code)
Adds two components to the panel; each component will span a single data column. Proceeds to the next data column.
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add



append
public void append(Component c1, Component c2, Component c3)(Code)
Adds three components to the panel; each component will span a single data column. Proceeds to the next data column.
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add
Parameters:
  c3 - the third component to add



append
public JLabel append(String textWithMnemonic)(Code)
Adds a text label to the panel and proceeds to the next column.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic the added label



append
public JLabel append(String textWithMnemonic, Component component)(Code)
Adds a text label and component to the panel. Then proceeds to the next data column.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic
Parameters:
  component - the component to add the added label



append
public JLabel append(String textWithMnemonic, Component c, int columnSpan)(Code)
Adds a text label and component to the panel; the component will span the specified number columns. Proceeds to the next data column.

The created label is labelling the given component; so the component gets the focus if the (optional) label mnemonic is pressed.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic
Parameters:
  c - the component to add
Parameters:
  columnSpan - number of columns the component shall span the added label
See Also:   JLabel.setLabelFor




append
public JLabel append(String textWithMnemonic, Component c1, Component c2)(Code)
Adds a text label and two components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add the added label



append
public void append(String textWithMnemonic, Component c1, Component c2, int colSpan)(Code)
Adds a text label and two components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add
Parameters:
  colSpan - the column span for the second component



append
public JLabel append(String textWithMnemonic, Component c1, Component c2, Component c3)(Code)
Adds a text label and three components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add
Parameters:
  c3 - the third component to add the added label



append
public JLabel append(String textWithMnemonic, Component c1, Component c2, Component c3, Component c4)(Code)
Adds a text label and four components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add
Parameters:
  c3 - the third component to add
Parameters:
  c4 - the fourth component to add the added label



appendI15d
public JLabel appendI15d(String resourceKey)(Code)
Adds an internationalized (i15d) text label to the panel using the given resource key and proceeds to the next column.
Parameters:
  resourceKey - the resource key for the the label's text the added label



appendI15d
public JLabel appendI15d(String resourceKey, Component c, int columnSpan)(Code)
Adds an internationalized (i15d) text label to the panel using the given resource key; then proceeds to the next data column and adds a component with the given column span. Proceeds to the next data column.
Parameters:
  resourceKey - the resource key for the text to add
Parameters:
  c - the component to add
Parameters:
  columnSpan - number of columns the component shall span the added label



appendI15d
public JLabel appendI15d(String resourceKey, Component component)(Code)
Adds an internationalized (i15d) text label and component to the panel. Then proceeds to the next data column.
Parameters:
  resourceKey - the resource key for the text to add
Parameters:
  component - the component to add the added label



appendI15d
public JLabel appendI15d(String resourceKey, Component component, boolean nextLine)(Code)
Adds an internationalized (i15d) text label and component to the panel. Then proceeds to the next data column. Goes to the next line if the boolean flag is set.
Parameters:
  resourceKey - the resource key for the text to add
Parameters:
  component - the component to add
Parameters:
  nextLine - true forces a next line the added label



appendI15d
public JLabel appendI15d(String resourceKey, Component c1, Component c2)(Code)
Adds an internationalized (i15d) text label and two components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  resourceKey - the resource key for the text to add
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add the added label



appendI15d
public JLabel appendI15d(String resourceKey, Component c1, Component c2, int colSpan)(Code)
Adds an internationalized (i15d) text label and two components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  resourceKey - the resource key for the text to add
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add
Parameters:
  colSpan - the column span for the second component the added label



appendI15d
public JLabel appendI15d(String resourceKey, Component c1, Component c2, Component c3)(Code)
Adds an internationalized (i15d) text label and three components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  resourceKey - the resource key for the text to add
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add
Parameters:
  c3 - the third component to add the added label



appendI15d
public JLabel appendI15d(String resourceKey, Component c1, Component c2, Component c3, Component c4)(Code)
Adds an internationalized (i15d) text label and four components to the panel; each component will span a single column. Proceeds to the next data column.
Parameters:
  resourceKey - the resource key for the text to add
Parameters:
  c1 - the first component to add
Parameters:
  c2 - the second component to add
Parameters:
  c3 - the third component to add
Parameters:
  c4 - the third component to add the added label



appendI15dSeparator
public void appendI15dSeparator(String resourceKey)(Code)
Appends an internationalized titled separator for the given resource key that spans all columns.
Parameters:
  resourceKey - the resource key for the separator title's text



appendI15dTitle
public JLabel appendI15dTitle(String resourceKey)(Code)
Adds an internationalized title label to the panel and proceeds to the next column.
Parameters:
  resourceKey - the resource key for the title's text the added title label



appendSeparator
public JComponent appendSeparator()(Code)
Adds a separator without text that spans all columns. the added titled separator



appendSeparator
public JComponent appendSeparator(String text)(Code)
Adds a separator with the given text that spans all columns.
Parameters:
  text - the separator title text the added titled separator



appendTitle
public JLabel appendTitle(String textWithMnemonic)(Code)
Adds a title label to the panel and proceeds to the next column.
Parameters:
  textWithMnemonic - the label's text - may mark a mnemonic the added title label



getLeadingColumn
protected int getLeadingColumn()(Code)
Returns the leading column. Unlike the superclass we take a column offset into account. the leading column



getLeadingColumnOffset
public int getLeadingColumnOffset()(Code)
Returns the offset of the leading column, often 0 or 1. the offset of the leading column



getLineGapSpec
public RowSpec getLineGapSpec()(Code)
Returns the row specification that is used to separate component lines. the RowSpec that is used to separate lines



isRowGroupingEnabled
public boolean isRowGroupingEnabled()(Code)
Returns whether new data rows are being grouped or not. true indicates grouping enabled, false disabled



setLeadingColumnOffset
public void setLeadingColumnOffset(int columnOffset)(Code)
Sets the offset of the leading column, often 0 or 1.
Parameters:
  columnOffset - the new offset of the leading column



setLineGapSize
public void setLineGapSize(ConstantSize lineGapSize)(Code)
Sets the size of gaps between component lines using the given constant size.
Parameters:
  lineGapSize - the ConstantSize that describes the size of the gaps between component lines



setParagraphGapSize
public void setParagraphGapSize(ConstantSize paragraphGapSize)(Code)
Sets the size of gaps between paragraphs using the given constant size.
Parameters:
  paragraphGapSize - the ConstantSize that describes the size of the gaps between paragraphs



setRowGroupingEnabled
public void setRowGroupingEnabled(boolean enabled)(Code)
Enables or disables the grouping of new data rows.
Parameters:
  enabled - indicates grouping enabled, false disabled



Methods inherited from net.sourceforge.squirrel_sql.client.gui.builders.I15dPanelBuilder
final public JLabel add15dTitle(String resourceKey, String encodedConstraints)(Code)(Java Doc)
final public JLabel addI15dLabel(String resourceKey, CellConstraints constraints)(Code)(Java Doc)
final public JLabel addI15dLabel(String resourceKey, String encodedConstraints)(Code)(Java Doc)
final public JComponent addI15dSeparator(String resourceKey, CellConstraints constraints)(Code)(Java Doc)
final public JComponent addI15dSeparator(String resourceKey, String encodedConstraints)(Code)(Java Doc)
final public JLabel addI15dTitle(String resourceKey, CellConstraints constraints)(Code)(Java Doc)
protected String getI15dString(String resourceKey)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.