public class ComponentLink extends Object
It is possible to create more than one link from or to a component, and set up links both ways between two components, or a graph for that matter.
The link between components are created by simply calling the overloaded
link-method, e.g:
JTextField f1, f2;
ComponentLink.link(f1, f2);
The possible link types are:
| Constructor and Description |
|---|
ComponentLink() |
| Modifier and Type | Method and Description |
|---|---|
static void |
link(JComboBox fromComboBox,
JComboBox toComboBox,
String attributeName,
G9DialogController controller,
String nodeName)
Links two
JComboBoxes so that when a row is selected in the
source combo box, the corresponding row (the row with the same index)
gets selected in the target combo box. |
static void |
link(JComboBox fromComboBox,
JTextComponent toTextComponent,
String attributeName,
G9DialogController controller,
String nodeName)
Links a
JComboBox to a JTextComponent such that
the selected item in the specified combo box is displayed in the text
component. |
static void |
link(JTextComponent fromTextComponent,
JComboBox toComboComponent,
String attributeName,
G9DialogController controller,
String nodeName)
Links a text field to a combo box.
|
static void |
link(JTextComponent fromTextComponent,
JTextComponent toTextComponent,
String attributeName,
G9DialogController controller,
String nodeName)
Links to
JTextComponents such that the text in the
toTextComponent is the same as that in fromTextComponent
|
static void |
link(JToggleButton fromButton,
JToggleButton toButton,
String attributeName,
G9DialogController controller,
String nodeName)
Links two toggle buttons (typically check boxex or radio buttons) so that
when the source is selected or un-selected, so is the target.
|
public static void link(JTextComponent fromTextComponent, JTextComponent toTextComponent, String attributeName, G9DialogController controller, String nodeName)
JTextComponents such that the text in the
toTextComponent is the same as that in fromTextComponent
fromTextComponent - the source of the linktoTextComponent - the target of the linkattributeName - the name of the attributecontroller - the dialog controller of the attributenodeName - the node name of the attributepublic static void link(JComboBox fromComboBox, JTextComponent toTextComponent, String attributeName, G9DialogController controller, String nodeName)
JComboBox to a JTextComponent such that
the selected item in the specified combo box is displayed in the text
component. The displayed text is acquired by invoking the toString
method on the selected item.fromComboBox - the source of the linktoTextComponent - the target of the linkattributeName - the name of the attributecontroller - the dialog controller of the attributenodeName - the node name of the attributepublic static void link(JComboBox fromComboBox, JComboBox toComboBox, String attributeName, G9DialogController controller, String nodeName)
JComboBoxes so that when a row is selected in the
source combo box, the corresponding row (the row with the same index)
gets selected in the target combo box.fromComboBox - the source combo boxtoComboBox - the target combo boxattributeName - the name of the attributecontroller - the dialog controller of the attributenodeName - the node name of the attributepublic static void link(JToggleButton fromButton, JToggleButton toButton, String attributeName, G9DialogController controller, String nodeName)
fromButton - the soucre of the linktoButton - the target of the link.attributeName - the name of the attributecontroller - the controller of the attributenodeName - the node name of the attributepublic static void link(JTextComponent fromTextComponent, JComboBox toComboComponent, String attributeName, G9DialogController controller, String nodeName)
This method is not yet implemented
fromTextComponent - the source of the linktoComboComponent - the target componentattributeName - the attribute namecontroller - the dialog controllernodeName - the name of the node.Copyright © 2006–2018 Esito AS. All rights reserved.