Package org.adempiere.webui.editor
Class WButtonEditor
- java.lang.Object
-
- org.adempiere.webui.editor.WEditor
-
- org.adempiere.webui.editor.WButtonEditor
-
- All Implemented Interfaces:
PropertyChangeListener,EventListener,IProcessButton,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
public class WButtonEditor extends WEditor implements IProcessButton
This class is based on org.compiere.grid.ed.VButton written by Jorg Janke.- Author:
- Jorg Janke Modifications - UI Compatibility, ashley
-
-
Field Summary
Fields Modifier and Type Field Description static StringEDITOR_ATTRIBUTE-
Fields inherited from class org.adempiere.webui.editor.WEditor
component, gridField, gridTab, INIT_EDIT_EVENT, label, listeners, mandatory, MAX_DISPLAY_LENGTH, popupMenu, readOnly, tableEditor
-
-
Constructor Summary
Constructors Constructor Description WButtonEditor(GridField gridField)WButtonEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)WButtonEditor(GridField gridField, int rowIndex)WButtonEditor(GridField gridField, int rowIndex, boolean tableEditor, IEditorConfiguration editorConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddActionListener(ActionListener actionListener)IADTabpanelgetADTabpanel()ButtongetComponent()StringgetDisplay()String[]getEvents()GridFieldgetGridField()intgetProcess_ID()Get AD_Process_IDObjectgetValue()HashMap<String,String>getValues()booleanisMandatory()booleanisReadWrite()booleanisSearchable()voidonEvent(org.zkoss.zk.ui.event.Event event)booleanremoveActionListener(ActionListener actionListener)voidsetADTabpanel(IADTabpanel adTabpanel)voidsetMandatory(boolean mandatory)Set whether the editor represents a mandatory field.voidsetReadWrite(boolean readWrite)voidsetValue(Object value)-
Methods inherited from class org.adempiere.webui.editor.WEditor
addChangeLogMenu, addTextEditorMenu, addValueChangeListener, applyFieldStyles, applyLabelStyles, buildStyle, cleanColumnName, dynamicDisplay, dynamicDisplay, fillHorizontal, fireValueChange, focusNext, getColumnName, getDescription, getDisplayComponent, getDisplayTextForGridView, getLabel, getPopupMenu, getStyleEvaluatee, isComponentOfEditor, isMandatoryStyle, isNullOrEmpty, isProcessParameter, isShowPreference, isVisible, isZoomable, propertyChange, removeValuechangeListener, setBackground, setBackground, setChangeEventWhenEditing, setColumnName, setComponent, setFieldStyle, setGridTab, setLabelStyle, setProcessParameter, setTableEditor, setVisible, showMenu, toString, updateLabelStyle, updateStyle, updateStyle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.adempiere.webui.editor.IProcessButton
getColumnName, getDescription
-
-
-
-
Field Detail
-
EDITOR_ATTRIBUTE
public static final String EDITOR_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WButtonEditor
public WButtonEditor(GridField gridField)
- Parameters:
gridField-
-
WButtonEditor
public WButtonEditor(GridField gridField, int rowIndex)
- Parameters:
gridField-rowIndex-
-
WButtonEditor
public WButtonEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
- Parameters:
gridField-tableEditor-editorConfiguration-
-
WButtonEditor
public WButtonEditor(GridField gridField, int rowIndex, boolean tableEditor, IEditorConfiguration editorConfiguration)
- Parameters:
gridField-rowIndex-tableEditor-editorConfiguration-
-
-
Method Detail
-
getProcess_ID
public int getProcess_ID()
Description copied from interface:IProcessButtonGet AD_Process_ID- Specified by:
getProcess_IDin interfaceIProcessButton- Returns:
- AD_Process_ID or 0
-
getGridField
public GridField getGridField()
- Overrides:
getGridFieldin classWEditor- Returns:
- grid field for this editor ( can be null )
-
getDisplay
public String getDisplay()
- Specified by:
getDisplayin interfaceIProcessButton- Specified by:
getDisplayin classWEditor- Returns:
- display text
-
isMandatory
public boolean isMandatory()
- Overrides:
isMandatoryin classWEditor- Returns:
- boolean
-
setMandatory
public void setMandatory(boolean mandatory)
Description copied from class:WEditorSet whether the editor represents a mandatory field.- Overrides:
setMandatoryin classWEditor- Parameters:
mandatory- whether the field is mandatory
-
getComponent
public Button getComponent()
- Overrides:
getComponentin classWEditor- Returns:
- Component
-
isReadWrite
public boolean isReadWrite()
- Specified by:
isReadWritein classWEditor- Returns:
- editable
-
setReadWrite
public void setReadWrite(boolean readWrite)
- Specified by:
setReadWritein classWEditor
-
addActionListener
public void addActionListener(ActionListener actionListener)
-
removeActionListener
public boolean removeActionListener(ActionListener actionListener)
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Throws:
Exception
-
setADTabpanel
public void setADTabpanel(IADTabpanel adTabpanel)
-
getADTabpanel
public IADTabpanel getADTabpanel()
- Specified by:
getADTabpanelin interfaceIProcessButton
-
isSearchable
public boolean isSearchable()
- Overrides:
isSearchablein classWEditor- Returns:
- true if usable in find window, false otherwise
-
-