IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

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

java.lang.Object
  extended by com.ibm.btt.rcp.xui.widgets.XUIWidget
      extended by com.ibm.btt.rcp.xui.widgets.XUISWTWidget
All Implemented Interfaces:
IKeyHolder, IXUIEventListener, IXUIWidget, java.util.EventListener, org.eclipse.swt.events.FocusListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
AbstractXUIButton, XUIComposite, XUISWTFieldDataWidget, XUISWTTableDataWidget, XUITableColumn

public abstract class XUISWTWidget
extends XUIWidget
implements org.eclipse.swt.events.FocusListener

XUI SWT widget abstract class, all XUI SWT wrapped classes should extends from this class


Field Summary
protected  org.eclipse.swt.graphics.Color background
           
protected  boolean focusLost
           
protected  org.eclipse.swt.graphics.Color foreground
           
 
Constructor Summary
XUISWTWidget()
           
 
Method Summary
 void addListener(org.eclipse.swt.internal.SWTEventListener listener)
          Add SWT listener to this widget
 void cacheProperty(java.lang.String name, java.lang.Object value)
          Cache property which not been found in XUI widget, after create SWT widget, then inject them.
protected  org.eclipse.swt.widgets.Widget createWidget(org.eclipse.swt.widgets.Composite parent)
          Create wrapped SWT widget using java reflection
 void dispose()
          Dispose this widget, release resources.
 void focusGained(org.eclipse.swt.events.FocusEvent e)
           
 void focusLost(org.eclipse.swt.events.FocusEvent e)
           
protected  java.util.Map<java.lang.String,java.lang.Object> getCachedProperties()
          Get cached properties which not been found in XUI widget, after create SWT widget, then inject them.
protected  int getStyle()
          Get SWT widget style
 org.eclipse.swt.widgets.Widget getWidget()
          Get wrapped widget instance
protected  void handleRequired()
          Logic execute when widget is required
 void initialize(org.eclipse.swt.widgets.Composite parent)
          Initialize this XUI widget.
protected  void installListeners()
          Install SWT listeners to this widget.
 void removeListener(org.eclipse.swt.internal.SWTEventListener listener)
          Remove SWT listener to this widget
protected  void setColors()
          The setColors sequence is: 1 standard(self) -> 2 error -> 3 required -> 4 selected
 void setListeners(java.util.List<org.eclipse.swt.internal.SWTEventListener> listeners)
          Set SWT listeners for this widget
 
Methods inherited from class com.ibm.btt.rcp.xui.widgets.XUIWidget
fireXUIEvent, getActions, getHelpId, getId, getInitializers, getParent, getTabIndex, getXUIView, handleXUIEvent, 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.widgets.IXUIWidget
getWidgetType
 

Field Detail

background

protected org.eclipse.swt.graphics.Color background

foreground

protected org.eclipse.swt.graphics.Color foreground

focusLost

protected boolean focusLost
Constructor Detail

XUISWTWidget

public XUISWTWidget()
Method Detail

initialize

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

Parameters:
parent -

createWidget

protected org.eclipse.swt.widgets.Widget createWidget(org.eclipse.swt.widgets.Composite parent)
Create wrapped SWT widget using java reflection

Parameters:
parent -
Returns:

installListeners

protected void installListeners()
Install SWT listeners to this widget.


getWidget

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

Specified by:
getWidget in interface IXUIWidget
Returns:

setListeners

public void setListeners(java.util.List<org.eclipse.swt.internal.SWTEventListener> listeners)
Set SWT listeners for this widget

Parameters:
listeners -

addListener

public void addListener(org.eclipse.swt.internal.SWTEventListener listener)
Add SWT listener to this widget

Parameters:
listener -

removeListener

public void removeListener(org.eclipse.swt.internal.SWTEventListener listener)
Remove SWT listener to this widget

Parameters:
listener -

getStyle

protected int getStyle()
Get SWT widget style

Returns:
widget style

cacheProperty

public void cacheProperty(java.lang.String name,
                          java.lang.Object value)
Cache property which not been found in XUI widget, after create SWT widget, then inject them.

Parameters:
name -
value -

getCachedProperties

protected java.util.Map<java.lang.String,java.lang.Object> getCachedProperties()
Get cached properties which not been found in XUI widget, after create SWT widget, then inject them.

Returns:

focusGained

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

focusLost

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

handleRequired

protected void handleRequired()
Description copied from class: XUIWidget
Logic execute when widget is required

Overrides:
handleRequired in class XUIWidget

setColors

protected void setColors()
The setColors sequence is: 1 standard(self) -> 2 error -> 3 required -> 4 selected


dispose

public void dispose()
Description copied from class: XUIWidget
Dispose this widget, release resources.

Specified by:
dispose in interface IXUIWidget
Overrides:
dispose in class XUIWidget

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009