|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.accountingenhancements.layouttools.ConvertStringToJComponent
public abstract class ConvertStringToJComponent
Convert the description of a component into a JComponent.
Used by some of the LayoutFactory methods.
Field names could be database name such as tblEmp.firstName and supportParameters could contain a
database connection as well as a HashMap
of field settings so that this function could
create an appropriate field to support the database field.
Used to allow the layout factory to convert a description of a component into the component itself.
Constructor Summary | |
---|---|
ConvertStringToJComponent()
Creates a new instance of ConvertStringToJComponent |
Method Summary | |
---|---|
abstract javax.swing.JComponent[] |
getComponentAndLabel(java.lang.String componentName,
java.util.ArrayList supportParameters,
java.util.ArrayList<javax.swing.JComponent[]> objectList)
Convert the description of a component into a JComponent. Note: supportParameters is handed through, untouched, from the GroupLayoutPanelFactory. |
javax.swing.JComponent[] |
getComponentAndLabelSimple(java.lang.String componentName,
java.util.ArrayList<javax.swing.JComponent[]> supportParameters,
java.util.ArrayList<javax.swing.JComponent[]> objectList)
Convert index reference to a component. This routine returns the JComponents referenced by index numbers that are between the curly brackets. This is functional code and also is intended as a simple example of what can be done with the above function. All {x} (where x is a number) references are passed here instead of to the getComponentAndLabel(String, ArrayList) method.This routine can also limit the size of the JComponent if the component supports setColumns() and parentheses are used after the greater than symbol to indicate field size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConvertStringToJComponent()
Method Detail |
---|
public abstract javax.swing.JComponent[] getComponentAndLabel(java.lang.String componentName, java.util.ArrayList supportParameters, java.util.ArrayList<javax.swing.JComponent[]> objectList)
ArrayList
.
see getComponentAndLabelSimple(String componentName, ArrayList supportParameters)
for a simple example.
componentName
- the name of the component that the LayoutFactory found in the stringsupportParameters
- other parameters you passed to the factory so that you have sufficient information to create the components.
public javax.swing.JComponent[] getComponentAndLabelSimple(java.lang.String componentName, java.util.ArrayList<javax.swing.JComponent[]> supportParameters, java.util.ArrayList<javax.swing.JComponent[]> objectList)
getComponentAndLabel(String, ArrayList)
method.component[0]=Field_1; component[1]=Label_1; supportParameters.add(component);
component[0]=Field_2; component[1]=Label_2; supportParameters.add(component);
component
.component=new JComponent[2]; component[0]=Field_1; component[1]=Label_1; supportParameters.add(component);
component=new JComponent[2]; component[0]=Field_2; component[1]=Label_2; supportParameters.add(component);
component
has a fresh object for each entry.
componentName
- the index of the component array to be returned, surrounded by curly bracket symbols, optionally followed by a field size surrounded by parentheses.supportParameters
- an ArrayList
of components and their labels. Component array in index 0, label array in index 1. The labels can be null if not applicable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |