org.openswing.swing.client
Interface InputControl

All Known Implementing Classes:
BaseInputControl, CheckBoxControl, CheckBoxListControl, CodLookupControl, ComboBoxControl, ComboBoxVOControl, CurrencyControl, DateControl, FormattedTextControl, ImageControl, ListControl, ListVOControl, NumericControl, ProgressBarControl, RadioButtonControl, SpinnerListControl, SpinnerNumberControl, TextAreaControl, TextControl

public interface InputControl

Title: OpenSwing Framework

Description: Interface defined for each input control, used to specify attribute name and required properties.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it


Method Summary
 void addFocusListener(java.awt.event.FocusListener listener)
          Add a FocusListener to this input control.
 void addValueChangedListener(ValueChangeListener listener)
          Add a value changed listener to this input control.
 java.lang.String getAttributeName()
          Link the input control to the form which contains it and with the specified the attribute.
 LabelControl getLinkLabel()
           
 java.lang.Object getValue()
           
 ValueChangeListener[] getValueChangeListeners()
           
 boolean isCanCopy()
           
 boolean isChanged()
           
 boolean isEnabled()
           
 boolean isEnabledOnEdit()
           
 boolean isEnabledOnInsert()
           
 boolean isRequired()
           
 void removeFocusListener(java.awt.event.FocusListener listener)
          Remove a FocusListener listener from this input control.
 void removeValueChangedListener(ValueChangeListener listener)
          Remove a value changed listener from this input control.
 void setAttributeName(java.lang.String attributeName)
          Link the input control to the form which contains it and with the specified the attribute.
 void setCanCopy(boolean canCopy)
          Define if the input control value is duplicated when user has clicked on COPY button.
 void setChanged(boolean changed)
          Define if the input control value is changed.
 void setEnabled(boolean enabled)
          Set current input control abilitation.
 void setEnabledOnEdit(boolean enabled)
          Define if the input control is enabled on EDIT mode, false otherwise
 void setEnabledOnInsert(boolean enabled)
          Define if the input control is enabled on INSERT mode.
 void setLinkLabel(LabelControl label)
          Link the input control label to the specified label.
 void setValue(java.lang.Object value)
          Set value to the input control.
 

Method Detail

setAttributeName

public void setAttributeName(java.lang.String attributeName)
Link the input control to the form which contains it and with the specified the attribute.

Parameters:
attributeName - attribute name to which link the input control

getAttributeName

public java.lang.String getAttributeName()
Link the input control to the form which contains it and with the specified the attribute.


setLinkLabel

public void setLinkLabel(LabelControl label)
Link the input control label to the specified label.

Parameters:
label - label used when showing error messages related to the input control

getLinkLabel

public LabelControl getLinkLabel()
Returns:
label used when showing error messages related to the input control

isRequired

public boolean isRequired()
Returns:
mandatory property of the input control

isEnabledOnInsert

public boolean isEnabledOnInsert()
Returns:
true if the input control is enabled on INSERT mode, false otherwise

setEnabledOnInsert

public void setEnabledOnInsert(boolean enabled)
Define if the input control is enabled on INSERT mode.

Parameters:
enabled - true if the input control is enabled on INSERT mode, false otherwise

isEnabledOnEdit

public boolean isEnabledOnEdit()
Returns:
true if the input control is enabled on EDIT mode, false otherwise

setEnabledOnEdit

public void setEnabledOnEdit(boolean enabled)
Define if the input control is enabled on EDIT mode, false otherwise

Parameters:
enabled - mandatory property of the input control

isCanCopy

public boolean isCanCopy()
Returns:
define if the input control value is duplicated when user has clicked on COPY button

setCanCopy

public void setCanCopy(boolean canCopy)
Define if the input control value is duplicated when user has clicked on COPY button.

Parameters:
canCopy - define if the input control value is duplicated when user has clicked on COPY button

getValue

public java.lang.Object getValue()
Returns:
value related to the input control

setValue

public void setValue(java.lang.Object value)
Set value to the input control.

Parameters:
value - value to set into the input control

isChanged

public boolean isChanged()
Returns:
true if the input control value is changed, false otherwise

setChanged

public void setChanged(boolean changed)
Define if the input control value is changed.

Parameters:
changed - true if the input control value is changed, false otherwise

addValueChangedListener

public void addValueChangedListener(ValueChangeListener listener)
Add a value changed listener to this input control.

Parameters:
listener - value changed listener to add

removeValueChangedListener

public void removeValueChangedListener(ValueChangeListener listener)
Remove a value changed listener from this input control.

Parameters:
listener - value changed listener to remove

setEnabled

public void setEnabled(boolean enabled)
Set current input control abilitation.


isEnabled

public boolean isEnabled()
Returns:
current input control abilitation

getValueChangeListeners

public ValueChangeListener[] getValueChangeListeners()
Returns:
ValueChangeListener listeners added to this input control

addFocusListener

public void addFocusListener(java.awt.event.FocusListener listener)
Add a FocusListener to this input control.

Parameters:
listener - FocusListener to add

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener listener)
Remove a FocusListener listener from this input control.

Parameters:
listener - FocusListener to remove