JFormDesigner 5.0.4 Runtime API

com.jformdesigner.model
Class FormReference

java.lang.Object
  extended by com.jformdesigner.model.FormReference

public class FormReference
extends java.lang.Object

A form reference is used as property value to assign a component to a property. Normally used for JLabel.setLabelFor().

Example:

   FormComponent nameLabel = new FormComponent("javax.swing.JLabel");
   nameLabel.setName("nameLabel");
   nameLabel.setProperty("text", "Name:");
   nameLabel.setPropertyInt("displayedMnemonic", 'N');
   nameLabel.setProperty("labelFor", new FormReference("nameField"));

   FormComponent nameField = new FormComponent("javax.swing.JTextField");
   nameField.setName("nameField");
 


Constructor Summary
FormReference(java.lang.String name)
          Constructs a form reference for the specified form component name.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares the names of form references.
 java.lang.String getName()
          Returns the name of the referenced form component.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormReference

public FormReference(java.lang.String name)
Constructs a form reference for the specified form component name.

Method Detail

getName

public java.lang.String getName()
Returns the name of the referenced form component.


equals

public boolean equals(java.lang.Object obj)
Compares the names of form references.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object

JFormDesigner 5.0.4 Runtime API

Copyright (C) 2004-2012 FormDev Software GmbH. All rights reserved.