org.adempiere.webui.editor
Class WEditor
java.lang.Object
org.adempiere.webui.editor.WEditor
- All Implemented Interfaces:
- PropertyChangeListener, EventListener
- Direct Known Subclasses:
- WAccountEditor, WAssignmentEditor, WBinaryEditor, WButtonEditor, WDateEditor, WFilenameEditor, WImageEditor, WLocationEditor, WLocatorEditor, WNumberEditor, WPAttributeEditor, WSearchEditor, WStringEditor, WTableDirEditor, WUrlEditor, WYesNoEditor
public abstract class WEditor
- extends Object
- implements EventListener, PropertyChangeListener
- Version:
- $Revision: 0.10 $
- Author:
- Ashley G Ramdass
MAX_DISPLAY_LENGTH
public static final int MAX_DISPLAY_LENGTH
- See Also:
- Constant Field Values
gridField
protected GridField gridField
gridTab
protected GridTab gridTab
label
protected Label label
component
protected Component component
mandatory
protected boolean mandatory
listeners
protected ArrayList<ValueChangeListener> listeners
WEditor
public WEditor(Component comp,
GridField gridField)
WEditor
public WEditor(Component comp,
String label,
String description,
boolean mandatory,
boolean readonly,
boolean updateable)
- Constructor for use if a grid field is unavailable
- Parameters:
comp - The editor's componentlabel - column name (not displayed)description - description of componentmandatory - whether a selection must be madereadonly - whether or not the editor is read onlyupdateable - whether the editor contents can be changed
getDescription
public String getDescription()
- Method is used to distinguish between 2 similar WSearchEditors
setComponent
protected void setComponent(Component comp)
- Set the editor component.
- Parameters:
comp - the editor component
getGridField
public GridField getGridField()
getColumnName
public String getColumnName()
cleanColumnName
protected String cleanColumnName(String originalColumnName)
- Remove the table qualifier from the supplied column name.
The column name may be prefixed with the table name
i.e.
[table name].[column name].
The function returns
- Parameters:
originalColumnName - The column name to clean
- Returns:
- the column name with any table qualifier removed
i.e.
[column name]
setColumnName
protected void setColumnName(String columnName)
getComponent
public Component getComponent()
setGridTab
public void setGridTab(GridTab gridTab)
getPopupMenu
public WEditorPopupMenu getPopupMenu()
propertyChange
public void propertyChange(PropertyChangeEvent evt)
- Specified by:
propertyChange in interface PropertyChangeListener
addValueChangeListner
public void addValueChangeListner(ValueChangeListener listener)
fireValueChange
protected void fireValueChange(ValueChangeEvent event)
getLabel
public Label getLabel()
setReadWrite
public abstract void setReadWrite(boolean readWrite)
isReadWrite
public abstract boolean isReadWrite()
setVisible
public void setVisible(boolean visible)
isVisible
public boolean isVisible()
setBackground
public void setBackground(boolean error)
setBackground
public void setBackground(Color color)
toString
public String toString()
- Overrides:
toString in class Object
setValue
public abstract void setValue(Object value)
getValue
public abstract Object getValue()
getDisplay
public abstract String getDisplay()
getEvents
public String[] getEvents()
setMandatory
public void setMandatory(boolean mandatory)
- Set whether the editor represents a mandatory field.
- Parameters:
mandatory - whether the field is mandatory
isMandatory
public boolean isMandatory()
isAsap
public boolean isAsap()
Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.