IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.rcp.xui.widgets
Class AbstractXUIText

java.lang.Object
  extended by com.ibm.btt.rcp.xui.widgets.XUIWidget
      extended by com.ibm.btt.rcp.xui.widgets.XUISWTWidget
          extended by com.ibm.btt.rcp.xui.widgets.XUISWTFieldDataWidget
              extended by com.ibm.btt.rcp.xui.widgets.AbstractXUIText
All Implemented Interfaces:
IFieldDataHolder, IKeyHolder, IXUIErrorSource, IXUIEventListener, IXUIRequiredSource, IXUIWidget, java.util.EventListener, org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.ModifyListener, org.eclipse.swt.events.VerifyListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
XUIPassword, XUIText

public abstract class AbstractXUIText
extends XUISWTFieldDataWidget
implements IXUIRequiredSource, IXUIErrorSource, org.eclipse.swt.events.VerifyListener, org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.ModifyListener

Abstract XUI Text class


Field Summary
protected  IFormat format
           
protected  IValidatorManager validatorManager
           
 
Fields inherited from class com.ibm.btt.rcp.xui.widgets.XUISWTFieldDataWidget
initialized
 
Fields inherited from class com.ibm.btt.rcp.xui.widgets.XUISWTWidget
background, focusLost, foreground
 
Constructor Summary
AbstractXUIText()
           
 
Method Summary
 void focusGained(org.eclipse.swt.events.FocusEvent e)
           
 void focusLost(org.eclipse.swt.events.FocusEvent e)
           
protected  void formatText()
          Format current text using injections
 java.util.List<IValidator> getAfterValidators()
          Get after-validators for this text
 Alignment getAlignment()
          Get alignment mode, it has three values: LEFT, CENTER, and RIGHT.
 java.util.List<IValidator> getBeforeValidators()
          Get before-validators for this text
 java.lang.String getDataValue()
          Get field data value
 java.lang.String getErrorMessage()
          Get error message
 IFormat getFormat()
          Get Format for this text
 int getMaxLength()
          Get max length for this text
protected  int getStyle()
          Get SWT widget style
 org.eclipse.swt.widgets.Text getWidget()
          Get wrapped widget instance
 java.lang.Class<?> getWidgetType()
          Get wrapped widget class type
protected  void handleErrorMessage(java.lang.String msg)
          Handle error message logic
 void handleXUIEvent(IXUIEventObject object)
          Logics when receive XUI events
 void initialize(org.eclipse.swt.widgets.Composite parent)
          Initialize this XUI widget.
protected  void installListeners()
          Install SWT listeners to this widget.
 boolean isAutoClear()
          Get if the text will full-selected when get focus
 boolean isAutoTab()
          Get if this text can tab when get the max length
 boolean isBorder()
          Get if this text has border
 boolean isNotFilled()
          Get if this source is not filled
 boolean isRequired()
          Get if this source is required
 void modifyText(org.eclipse.swt.events.ModifyEvent e)
           
 void refresh()
          Refresh widget using latest data
 void setAfterValidators(java.util.List<IValidator> afterValidators)
          Set after-validators for this text
 void setAlignment(Alignment alignment)
          Set alignment mode, it has three values: LEFT, CENTER, and RIGHT.
 void setAutoClear(boolean autoClear)
          Set if the text will full-selected when get focus
 void setAutoTab(boolean value)
          Set if this text can tab when get the max length
 void setBeforeValidators(java.util.List<IValidator> beforeValidators)
          Set before-validators for this text
 void setBorder(boolean border)
          Set if this text has border
 void setDataValue(java.lang.Object value)
          Set field data value
 void setErrorMessage(java.lang.String msg)
          Set error message
 void setFormat(IFormat format)
          Set Format for this text
 void setMaxLength(int length)
          Set max length for this text
 void setMinLength(int length)
          Set min length for this text
 void setRequired(boolean required)
          Set if this source is required
 void verifyText(org.eclipse.swt.events.VerifyEvent e)
           
 
Methods inherited from class com.ibm.btt.rcp.xui.widgets.XUISWTFieldDataWidget
getDataName, setDataName
 
Methods inherited from class com.ibm.btt.rcp.xui.widgets.XUISWTWidget
addListener, cacheProperty, createWidget, dispose, getCachedProperties, handleRequired, removeListener, setColors, setListeners
 
Methods inherited from class com.ibm.btt.rcp.xui.widgets.XUIWidget
fireXUIEvent, getActions, getHelpId, getId, getInitializers, getParent, getTabIndex, getXUIView, setActions, setHelpId, setId, setInitializers, setParent, setTabIndex, setXUIView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.rcp.xui.data.IKeyHolder
getId, setId
 

Field Detail

validatorManager

protected IValidatorManager validatorManager

format

protected IFormat format
Constructor Detail

AbstractXUIText

public AbstractXUIText()
Method Detail

initialize

public void initialize(org.eclipse.swt.widgets.Composite parent)
Description copied from class: XUISWTWidget
Initialize this XUI widget. In this method, create wrapped SWT widget; inject global settings and cached properties into it; and so on.

Overrides:
initialize in class XUISWTWidget

getWidgetType

public java.lang.Class<?> getWidgetType()
Description copied from interface: IXUIWidget
Get wrapped widget class type

Specified by:
getWidgetType in interface IXUIWidget
Returns:

getWidget

public org.eclipse.swt.widgets.Text getWidget()
Description copied from interface: IXUIWidget
Get wrapped widget instance

Specified by:
getWidget in interface IXUIWidget
Overrides:
getWidget in class XUISWTWidget
Returns:

getAlignment

public Alignment getAlignment()
Get alignment mode, it has three values: LEFT, CENTER, and RIGHT.

Returns:

setAlignment

public void setAlignment(Alignment alignment)
Set alignment mode, it has three values: LEFT, CENTER, and RIGHT.

Parameters:
alignment -

installListeners

protected void installListeners()
Description copied from class: XUISWTWidget
Install SWT listeners to this widget.

Overrides:
installListeners in class XUISWTWidget

verifyText

public void verifyText(org.eclipse.swt.events.VerifyEvent e)
Specified by:
verifyText in interface org.eclipse.swt.events.VerifyListener

focusGained

public void focusGained(org.eclipse.swt.events.FocusEvent e)
Specified by:
focusGained in interface org.eclipse.swt.events.FocusListener
Overrides:
focusGained in class XUISWTWidget

modifyText

public void modifyText(org.eclipse.swt.events.ModifyEvent e)
Specified by:
modifyText in interface org.eclipse.swt.events.ModifyListener

focusLost

public void focusLost(org.eclipse.swt.events.FocusEvent e)
Specified by:
focusLost in interface org.eclipse.swt.events.FocusListener
Overrides:
focusLost in class XUISWTWidget

formatText

protected void formatText()
Format current text using injections


setAutoTab

public void setAutoTab(boolean value)
Set if this text can tab when get the max length


isAutoTab

public boolean isAutoTab()
Get if this text can tab when get the max length

Returns:

setBeforeValidators

public void setBeforeValidators(java.util.List<IValidator> beforeValidators)
Set before-validators for this text

Parameters:
beforeValidators -

getBeforeValidators

public java.util.List<IValidator> getBeforeValidators()
Get before-validators for this text

Returns:

setAfterValidators

public void setAfterValidators(java.util.List<IValidator> afterValidators)
Set after-validators for this text

Parameters:
afterValidators -

getAfterValidators

public java.util.List<IValidator> getAfterValidators()
Get after-validators for this text

Returns:

setFormat

public void setFormat(IFormat format)
Set Format for this text

Parameters:
format -

getFormat

public IFormat getFormat()
Get Format for this text

Returns:

setMinLength

public void setMinLength(int length)
Set min length for this text

Parameters:
length -

setMaxLength

public void setMaxLength(int length)
Set max length for this text

Parameters:
length -

getMaxLength

public int getMaxLength()
Get max length for this text

Returns:

isRequired

public boolean isRequired()
Description copied from interface: IXUIRequiredSource
Get if this source is required

Specified by:
isRequired in interface IXUIRequiredSource
Returns:

setRequired

public void setRequired(boolean required)
Description copied from interface: IXUIRequiredSource
Set if this source is required

Specified by:
setRequired in interface IXUIRequiredSource

getErrorMessage

public java.lang.String getErrorMessage()
Description copied from interface: IXUIErrorSource
Get error message

Specified by:
getErrorMessage in interface IXUIErrorSource
Returns:

setErrorMessage

public void setErrorMessage(java.lang.String msg)
Description copied from interface: IXUIErrorSource
Set error message

Specified by:
setErrorMessage in interface IXUIErrorSource

handleErrorMessage

protected void handleErrorMessage(java.lang.String msg)
Handle error message logic

Parameters:
msg -

isNotFilled

public boolean isNotFilled()
Description copied from interface: IXUIRequiredSource
Get if this source is not filled

Specified by:
isNotFilled in interface IXUIRequiredSource
Returns:

getDataValue

public java.lang.String getDataValue()
Description copied from interface: IFieldDataHolder
Get field data value

Specified by:
getDataValue in interface IFieldDataHolder
Overrides:
getDataValue in class XUISWTFieldDataWidget
Returns:

setDataValue

public void setDataValue(java.lang.Object value)
Description copied from interface: IFieldDataHolder
Set field data value

Specified by:
setDataValue in interface IFieldDataHolder
Overrides:
setDataValue in class XUISWTFieldDataWidget

refresh

public void refresh()
Description copied from class: XUISWTFieldDataWidget
Refresh widget using latest data

Specified by:
refresh in class XUISWTFieldDataWidget

isAutoClear

public boolean isAutoClear()
Get if the text will full-selected when get focus

Returns:

setAutoClear

public void setAutoClear(boolean autoClear)
Set if the text will full-selected when get focus

Parameters:
autoClear -

isBorder

public boolean isBorder()
Get if this text has border

Returns:

setBorder

public void setBorder(boolean border)
Set if this text has border

Parameters:
border -

handleXUIEvent

public void handleXUIEvent(IXUIEventObject object)
Description copied from interface: IXUIEventListener
Logics when receive XUI events

Specified by:
handleXUIEvent in interface IXUIEventListener
Overrides:
handleXUIEvent in class XUISWTFieldDataWidget
Parameters:
object - XUI event object

getStyle

protected int getStyle()
Description copied from class: XUISWTWidget
Get SWT widget style

Overrides:
getStyle in class XUISWTWidget
Returns:
widget style

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011