Package org.adempiere.webui.editor
Class WNumberEditor
- java.lang.Object
-
- org.adempiere.webui.editor.WEditor
-
- org.adempiere.webui.editor.WNumberEditor
-
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
,ContextMenuListener
,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
public class WNumberEditor extends WEditor implements ContextMenuListener
- Version:
- $Revision: 0.10 $
- Author:
- Ashley G Ramdass, Low Heng Sin, Cristina Ghita, www.arhipac.ro
- BF [3058780] WNumberEditor allow only BigDecimal
-
-
Field Summary
Fields Modifier and Type Field Description static String[]
LISTENER_EVENTS
static int
MAX_DISPLAY_LENGTH
static int
MIN_DISPLAY_LENGTH
-
Constructor Summary
Constructors Constructor Description WNumberEditor()
WNumberEditor(String columnName, boolean mandatory, boolean readonly, boolean updateable, int displayType, String title)
WNumberEditor(GridField gridField)
WNumberEditor(GridField gridField, boolean integral)
WNumberEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimal
addDecimalPlaces(BigDecimal oldValue)
IDEMPIERE-2553 - Enter amounts without decimal separatorNumberBox
getComponent()
String
getDisplay()
String[]
getEvents()
Object
getValue()
boolean
isReadWrite()
protected static NumberBox
newNumberBox(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
void
onEvent(org.zkoss.zk.ui.event.Event event)
Event handlervoid
onMenu(ContextMenuEvent evt)
Handle context menu eventsprotected void
setFieldStyle(String style)
void
setReadWrite(boolean readWrite)
void
setTableEditor(boolean b)
void
setValue(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, getGridField, getLabel, getPopupMenu, getStyleEvaluatee, isComponentOfEditor, isMandatory, isMandatoryStyle, isNullOrEmpty, isProcessParameter, isSearchable, isShowPreference, isVisible, isZoomable, propertyChange, removeValuechangeListener, setBackground, setBackground, setChangeEventWhenEditing, setColumnName, setComponent, setGridTab, setLabelStyle, setMandatory, setProcessParameter, setVisible, showMenu, toString, updateLabelStyle, updateStyle, updateStyle
-
-
-
-
Field Detail
-
LISTENER_EVENTS
public static final String[] LISTENER_EVENTS
-
MAX_DISPLAY_LENGTH
public static final int MAX_DISPLAY_LENGTH
- See Also:
- Constant Field Values
-
MIN_DISPLAY_LENGTH
public static final int MIN_DISPLAY_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WNumberEditor
public WNumberEditor()
-
WNumberEditor
public WNumberEditor(GridField gridField)
- Parameters:
gridField
-
-
WNumberEditor
public WNumberEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
- Parameters:
gridField
-tableEditor
-editorConfiguration
-
-
WNumberEditor
public WNumberEditor(GridField gridField, boolean integral)
- Parameters:
gridField
-integral
-
-
-
Method Detail
-
newNumberBox
protected static NumberBox newNumberBox(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event)
Event handler- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Parameters:
event
-
-
addDecimalPlaces
public BigDecimal addDecimalPlaces(BigDecimal oldValue)
IDEMPIERE-2553 - Enter amounts without decimal separator- Parameters:
oldValue
-- Returns:
-
getComponent
public NumberBox getComponent()
- Overrides:
getComponent
in classWEditor
- Returns:
- Component
-
isReadWrite
public boolean isReadWrite()
- Specified by:
isReadWrite
in classWEditor
- Returns:
- editable
-
setReadWrite
public void setReadWrite(boolean readWrite)
- Specified by:
setReadWrite
in classWEditor
-
getDisplay
public String getDisplay()
- Specified by:
getDisplay
in classWEditor
- Returns:
- display text
-
onMenu
public void onMenu(ContextMenuEvent evt)
Handle context menu events- Specified by:
onMenu
in interfaceContextMenuListener
- Parameters:
evt
-
-
setTableEditor
public void setTableEditor(boolean b)
- Overrides:
setTableEditor
in classWEditor
-
setFieldStyle
protected void setFieldStyle(String style)
- Overrides:
setFieldStyle
in classWEditor
-
-