Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 
 
 /*
  * Created on 04.07.2003
  *
  */
 package at.spardat.xma.boot.component;
 
 
 import  org.eclipse.swt.widgets.Composite;

This class defines the interface common for all cliend side components. Application data can be exchanged between components via name-value-pairs. Each component defines its own set of name-value-pairs which are supported by the component. Such name-value-pairs are called properties here.

Author(s):
s2877
 
 public interface IComponent {

    
Adds a ComponentListner to the listeners of the component. All listeners are notified of all property-changes and component-events.

Parameters:
listener the new listener to register
 
     void addEventListener(IComponentListener listener);

    
Remove a ComponentListener form the listners of the component. This ComponentListner will not be notified of propertiy-changes and component-events any more.

Parameters:
listener the ComponentListener to remove
 
     void removeEventListener(IComponentListener listener);

    
Adds a PropertyChangeListener to the listeners of the component. All listeners are notified of all property-changes.

Parameters:
listener the new listener to register
 
     public void addPropertyChangeListener(PropertyChangeListener listener);

    
Remove a PropertyChangeListener form the listners of the component. This PropertyChangeListener will not be notified of propertiy-changes any more.

Parameters:
listener the PropertyChangeListener to remove
 
     public void removePropertyChangeListener(PropertyChangeListener listener);

    
Sets all properties of the component. This method completly resets the set of properties of the component to the set given as input. If there are registered ComponentListeners, all ComponentListeners are notifyed of each property-change.

Parameters:
input the new set of properties
 
     void setProperties(Properties input);

    
Sets one property of the component. If there are registered ComponentListeners and the value of the property is differend from its old value, all ComponentListeners are notifyed of the property-change.

Parameters:
name the name of the property to change
value the new value of the property
 
     void setProperty(String nameString value);

    
Gives the value of a property. If the property is not defined null is returned.

Parameters:
name the name of the property
Returns:
the value of the named property
 
     String getProperty(String name);

    
Gives all properties of the component.

Returns:
the properties of the component.
    Properties getProperties();

    
This method is called to start the Component on the client side. This method must be implemented by the application programmer. It will typicaly create a DialogPage, copy some input data into the Page and start the DialogPage by calling DialogPage.invoke(). For modal components this method must block until the component is closed. For nonmodal components this method returns imediatly after the component is started. This method must not be called for visually embedded Components.

Parameters:
parent The shell of the dialog will be created as child of parent.
    void invoke(Composite parent);

    
Frees all allocated recources of the Component. This includes freeing all still living statefull PageModels at the server and disposing all SWT-resources like Images.
    void dispose();

    
Get the session of the component.

Returns:
the client side session this component belongs to.
New to GrepCode? Check out our FAQ X