org.jurvis.swing.form
Interface JvForm

All Superinterfaces:
JvJavaBean
All Known Subinterfaces:
JvView
All Known Implementing Classes:
JvAbstractForm, JvAbstractView

public interface JvForm
extends JvJavaBean

A form containing input fields displaying data from a model.

Author:
Neil W. Weber

Method Summary
 boolean commit(JvErrorList errorList)
          Commit all the user changes in the form to the form's model.
 Object getActiveObject()
          Return the active object in the form.
 JComponent getComponent()
          Return the JComponent containing this form.
 Object getModel()
          Returns the model being displayed by the form.
 boolean isEnabled()
          Return whether the form is enabled or not.
 boolean isModified()
          Returns whether this form has been modified by the user.
 boolean isValid(JvErrorList errorList)
          Validate all user changes to the form.
 boolean rollback(JvErrorList errorList)
          Rollback all the user changes in the form to their original values.
 void setEnabled(boolean enabled)
          Set whether form is editable or not.
 void setModel(Object model)
          Set the model containing the data this form is to display.
 void setModified(boolean modified)
          Sets whether or not this form has been modified by the user.
 
Methods inherited from interface org.jurvis.beans.JvJavaBean
addPropertyChangeListener, removePropertyChangeListener
 

Method Detail

getComponent

JComponent getComponent()
Return the JComponent containing this form.

Returns:
the form's JComponent

setModel

void setModel(Object model)
Set the model containing the data this form is to display.

Parameters:
model - the new model

getModel

Object getModel()
Returns the model being displayed by the form.

Returns:
the form's model

getActiveObject

Object getActiveObject()
Return the active object in the form.

Returns:
the active object

isEnabled

boolean isEnabled()
Return whether the form is enabled or not.

Returns:
true or false indicating whether form is editable

setEnabled

void setEnabled(boolean enabled)
Set whether form is editable or not.

Parameters:
enabled - new value for the modified property

setModified

void setModified(boolean modified)
Sets whether or not this form has been modified by the user. This method is not typically called by code outside of the org.jurvis package.

Parameters:
modified - new value for the modified property

isModified

boolean isModified()
Returns whether this form has been modified by the user.

Returns:
true if the user has modified the form; false otherwise

isValid

boolean isValid(JvErrorList errorList)
Validate all user changes to the form. Any errors found should be added to the given JvErrorList.

Parameters:
errorList - list containing any errors found during validation
Returns:
true if the data was successful; false otherwise

commit

boolean commit(JvErrorList errorList)
Commit all the user changes in the form to the form's model.

Parameters:
errorList - list containing any errors found during commit
Returns:
true if the commit was successful; false otherwise

rollback

boolean rollback(JvErrorList errorList)
Rollback all the user changes in the form to their original values.

Parameters:
errorList - list containing any errors found during the rollback
Returns:
true if the rollback was successful; false otherwise


Copyright © 1999-2004 Neil W. Weber. All Rights Reserved.