Class symantec.itools.db.beans.binding.Mediator
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class symantec.itools.db.beans.binding.Mediator
Object
   |
   +----symantec.itools.db.beans.binding.Mediator
  -  public class Mediator
  
-  extends Object
  
-  implements DataItemChangedListener, DataBusEventListener, DataBusMember
   
  
  -  
	Blank
   -   A constant indicating how an empty string will be set when updating
 data on the dbANYWHERE server.
  
 -  
	Component
   -    
 -  
	DBus
   -    
 -  
	Default
   -   A constant indicating how an empty string will be set when updating
 data on the dbANYWHERE server.
  
 -  
	Input
   -    
 -  
	Null
   -   A constant indicating how an empty string will be set when updating
 data on the dbANYWHERE server.
  
 -  
	currentCursorNumber
   -    
 -  
	dataBinding
   -   name of the DataItem.
  
 -  
	emptyMeansNull
   -    
 -  
	getMethods
   -    
 -  
	hasFoundGetMethod
   -    
 -  
	hasFoundSetMethod
   -    
 -  
	notifyOn
   -    
 -  
	offset
   -    
 -  
	output
   -    
 -  
	recursionLevel
   -    
 -  
	setMethods
   -  
 
  
  -  
	symantec.itools.db.beans.binding.Mediator()
   -   Constructs the default mediator.
  
 -  
	symantec.itools.db.beans.binding.Mediator(Object, String)
   -   Constructs a Mediator given its output component and the full name of
 the fields it is supposed to show
 
 
  
  -  
	addVetoableChangeListener(VetoableChangeListener)
   -   adds and removes vetoable change listeners for the data bus.
  
 -  
	commit()
   -   Updates the DataItem with the values present in the output component.
  
 -  
	commitUI(TriggerUIEvent)
   -    
 -  
	createDataItemFromArray(DataItem, Object[][])
   -    
 -  
	finalize()
   -   
  
 -  
	findDI()
   -   finds a DataItem given its name
  
 -  
	getCollectionSize(DataItem)
   -    
 -  
	getDataBinding()
   -   Returns the full name of the DataItem.
  
 -  
	getDataBus()
   -  Returns the current DataBus
  
 -  
	getEmptyMeansNull()
   -    
 -  
	getGetMethods()
   -   Returns the full name of the current get method.
  
 -  
	getNumberOfRows()
   -    
 -  
	getOutput()
   -   Returns the actual output component
 
  
 -  
	getOutputSize()
   -   Returns the actual size of the output component.
  
 -  
	getSetMethods()
   -   Returns the full name of the current set method.
  
 -  
	getSlice(int, Object[][], int)
   -    
 -  
	handleDataBusEvent(DataBusEvent)
   -   Handles the DataBus events, in particular the Data available events sent by the QueryNavigators.
  
 -  
	hasFoundDI()
   -   returns true if the mediator has found his data Item;
  
 -  
	killActualInput()
   -    
 -  
	notifyDataItemChanged(DataItemChangedEvent)
   -   Responds to the sollicitations of the DataItem.
  
 -  
	notifyEnabled(boolean)
   -   Sets the notify flag.
  
 -  
	removeVetoableChangeListener(VetoableChangeListener)
   -    
 -  
	requestDataItem(DataBusEvent)
   -   Changes the value of the DataItem when requested by the DataBus
 
  
 -  
	setDataBinding(String)
   -   Sets the name for the actual Data Item.And searches the DataBus for it
 This method is very important in the sense that it is the one that actually connects the
 mediator to the data bus
 The format is "Tablename
  
 -  
	setDataBus(DataBus)
   -   Connects to the DataBus
 
  
 -  
	setEmptyMeansNull(boolean)
   -    
 -  
	setGetMethods(String[])
   -   Sets the methods for displaying a value in the component.
  
 -  
	setOutput(Object)
   -   Sets the output component in witch the Mediator is going to display
 the data.
  
 -  
	setOutputSize(Dimension)
   -   Sets the dimension of the output component, meaning how many cells
 is it going to display.
  
 -  
	setSetMethods(String[])
   -   Sets the methods for retrieving a value from the component.
  
 -  
	suicide()
   -    
 -  
	update(DataItem)
   -   Updates the values displayed in the output component if they are
 different from those in the DataItem.
  
 -  
	update(DataItem, int, int)
   -    
 -  
	update(DataItem, int[], int, int)
   -  
 
  
Blank
public static final int Blank
  -  A constant indicating how an empty string will be set when updating
 data on the dbANYWHERE server.
 
Component
protected symantec.itools.db.beans.binding.OutputComponent Component
DBus
protected symantec.itools.db.beans.binding.databus.DataBus DBus
Default
public static final int Default
  -  A constant indicating how an empty string will be set when updating
 data on the dbANYWHERE server.
 
Input
protected symantec.itools.db.beans.binding.databus.DataItem Input
Null
public static final int Null
  -  A constant indicating how an empty string will be set when updating
 data on the dbANYWHERE server.
 
currentCursorNumber
protected int currentCursorNumber
dataBinding
protected java.lang.String dataBinding
  -  name of the DataItem. This Name class contains all the methods for
 parsing and using the names.
 
emptyMeansNull
protected boolean emptyMeansNull
getMethods
protected java.lang.String[] getMethods
hasFoundGetMethod
protected boolean hasFoundGetMethod
hasFoundSetMethod
protected boolean hasFoundSetMethod
notifyOn
protected boolean notifyOn
offset
protected int offset
output
protected java.lang.Object output
recursionLevel
protected int recursionLevel
setMethods
protected java.lang.String[] setMethods
  
Mediator
public Mediator()
  -  Constructs the default mediator.
  
 
 
Mediator
public Mediator(Object Out,
                String name)
  -  Constructs a Mediator given its output component and the full name of
 the fields it is supposed to show
  
 
 
    -  Parameters:
    
 -  Out -  output component
    
-  name - fullname of the fields
  
  
 
 
  
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
  -  adds and removes vetoable change listeners for the data bus.
  
 
 
commit
public void commit()
  -  Updates the DataItem with the values present in the output component.
  
 
 
commitUI
public void commitUI(TriggerUIEvent trui)
createDataItemFromArray
protected symantec.itools.db.beans.binding.databus.DataItem createDataItemFromArray(DataItem DI,
                                                                                    Object[][] obj)
finalize
protected void finalize() throws Throwable
  -  
  
 
 
    -  Throws: Throwable
    
 -  
    
 -  Overrides:
    
 -  finalize in class Object
  
 
 
 
findDI
protected void findDI()
  -  finds a DataItem given its name
  
 
 
getCollectionSize
protected java.awt.Dimension getCollectionSize(DataItem DI)
getDataBinding
public java.lang.String getDataBinding()
  -  Returns the full name of the DataItem.
  
 
 
    -  Returns:
    
 -  the full name of the DataItem.
  
 
 
 
getDataBus
public symantec.itools.db.beans.binding.databus.DataBus getDataBus()
  -  Returns the current DataBus
  
 
 
    -  Returns:
    
 -  the current DataBus
  
 
 
 
getEmptyMeansNull
public boolean getEmptyMeansNull()
getGetMethods
public java.lang.String[] getGetMethods()
  -  Returns the full name of the current get method.
  
 
 
    -  Returns:
    
 -  the method for getting.
  
 
 
 
getNumberOfRows
public int getNumberOfRows()
getOutput
public java.lang.Object getOutput()
  -  Returns the actual output component
  
 
 
    -  Returns:
    
 -  the output component
  
 
 
 
getOutputSize
public java.awt.Dimension getOutputSize()
  -  Returns the actual size of the output component.
  
 
 
    -  Returns:
    
 -  the dimension of the output component
  
 
 
 
getSetMethods
public java.lang.String[] getSetMethods()
  -  Returns the full name of the current set method.
  
 
 
    -  Returns:
    
 -  the method for setting.
  
 
 
 
getSlice
protected java.lang.Object[][] getSlice(int type,
                                        Object[][] obj,
                                        int j)
handleDataBusEvent
public void handleDataBusEvent(DataBusEvent ibe)
  -  Handles the DataBus events, in particular the Data available events sent by the QueryNavigators.
  
 
 
    -  Parameters:
    
 -  ibe - the DataBusEvent
  
 
 
 
hasFoundDI
public boolean hasFoundDI()
  -  returns true if the mediator has found his data Item;
  
 
 
killActualInput
protected void killActualInput()
notifyDataItemChanged
public void notifyDataItemChanged(DataItemChangedEvent e)
  -  Responds to the sollicitations of the DataItem.
  
 
 
    -  Parameters:
    
 -  e - the DataItemChangedEvent
  
 
 
 
notifyEnabled
protected void notifyEnabled(boolean value)
  -  Sets the notify flag.
  
 
 
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
requestDataItem
public void requestDataItem(DataBusEvent ibe)
  -  Changes the value of the DataItem when requested by the DataBus
  
 
 
    -  Parameters:
    
 -  ibe - the DataBusEvent
  
 
 
 
setDataBinding
public void setDataBinding(String name)
  -  Sets the name for the actual Data Item.And searches the DataBus for it
 This method is very important in the sense that it is the one that actually connects the
 mediator to the data bus
 The format is "Tablename@col1,col2%NumberOfRows"
  
 
 
    -  Parameters:
    
 -  name - the name of the data to be shown
  
 
 
 
setDataBus
public void setDataBus(DataBus b) throws PropertyVetoException
  -  Connects to the DataBus
  
 
 
    -  Parameters:
    
 -  b -    the DataBus the mediator connects to
    
 -  Throws: PropertyVetoException
    
 -  
  
 
 
 
setEmptyMeansNull
public void setEmptyMeansNull(boolean propertyValue)
setGetMethods
public void setGetMethods(String[] methodNames)
  -  Sets the methods for displaying a value in the component.
  
 
 
    -  Parameters:
    
 -  methodNames - the names of the methods including their parameters
  i.e. {"get Focus(Row,Col)","getText()"}
  
 
 
 
setOutput
public void setOutput(Object Out)
  -  Sets the output component in witch the Mediator is going to display
 the data.
  
 
 
    -  Parameters:
    
 -  Out - the output component
  
 
 
 
setOutputSize
protected void setOutputSize(Dimension size)
  -  Sets the dimension of the output component, meaning how many cells
 is it going to display.
  
 
 
    -  Parameters:
    
 -  size - The desired size
  
 
 
 
setSetMethods
public void setSetMethods(String[] methodNames)
  -  Sets the methods for retrieving a value from the component.
 therte methods are in an array of strings and will be executed one after the other
  
 
 
    -  Parameters:
    
 -  methodNames -   the names of the methods including their parameters
  i.e. "setText(Value,Row,Col)"
  
 
 
 
suicide
protected void suicide()
update
protected void update(DataItem Input)
  -  Updates the values displayed in the output component if they are
 different from those in the DataItem.
  
 
 
update
protected void update(DataItem Input,
                      int xcursor,
                      int ycursor)
update
protected void update(DataItem Input,
                      int columns,
                      int xcursor,
                      int ycursor)
All Packages  Class Hierarchy  This Package  Previous  Next  Index