com.irisel.oms.guiom.comp
Class ComponentMapper

java.lang.Object
  extended by com.irisel.oms.guiom.control.MouseListenerBase
      extended by com.irisel.oms.guiom.comp.ComponentMapper
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener

public class ComponentMapper
extends MouseListenerBase

Description: This class is used to encapsulate the mapping logic between model and gui components. This class delegates in the ControlFactory which is pluggable. The ControlFactory classname is taken from the configuration item record with name "ComponentFactory".

Copyright: Copyright (c) 2003

Company: Irisel Consulting

Version:
1.0
Author:
Jose Manuel Gomez Alvarez

Constructor Summary
ComponentMapper()
           
 
Method Summary
 java.awt.Component getComponent(ClassVO clsvo, Instance instance, int propId)
          It returns a JComponent object used as input control for a OMS Property.
 java.awt.Component getComponent(ClassVO clsvo, PropertyVO propvo, java.lang.Object value)
           
 java.lang.Object getComponentValue(java.awt.Component component)
           
 java.lang.Object getComponentValue(java.awt.Component thisInput, int type1, int sqltype)
           
 javax.swing.JLabel getLabel(ClassVO clsvo, int propId)
           
 javax.swing.JLabel getLabel(ClassVO clsvo, PropertyVO prop)
           
 java.awt.Component getTableCellComponent(ClassVO cvo, Instance inst, int col)
           
 void setComponentValue(java.awt.Component component, java.lang.Object value)
           
 
Methods inherited from class com.irisel.oms.guiom.control.MouseListenerBase
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentMapper

public ComponentMapper()
Method Detail

getLabel

public javax.swing.JLabel getLabel(ClassVO clsvo,
                                   PropertyVO prop)

getLabel

public javax.swing.JLabel getLabel(ClassVO clsvo,
                                   int propId)

getComponent

public java.awt.Component getComponent(ClassVO clsvo,
                                       Instance instance,
                                       int propId)
It returns a JComponent object used as input control for a OMS Property. The property is defined by its class (clsvo), and property id (propId).

Parameters:
clsvo - ClassVO object
instance - Instance object used to initialize the control
propId - Index of the property in the instance associated with this control
Returns:
JComponent

getComponent

public java.awt.Component getComponent(ClassVO clsvo,
                                       PropertyVO propvo,
                                       java.lang.Object value)

getTableCellComponent

public java.awt.Component getTableCellComponent(ClassVO cvo,
                                                Instance inst,
                                                int col)

getComponentValue

public java.lang.Object getComponentValue(java.awt.Component component)

setComponentValue

public void setComponentValue(java.awt.Component component,
                              java.lang.Object value)

getComponentValue

public java.lang.Object getComponentValue(java.awt.Component thisInput,
                                          int type1,
                                          int sqltype)