SComponentUI.java :  » Swing-Library » Swinglets » com » javelin » swinglets » plaf » Java Open Source

Java Open Source » Swing Library » Swinglets 
Swinglets » com » javelin » swinglets » plaf » SComponentUI.java
/*
 * Copyright Javelin Software, All rights reserved.
 */
 
package com.javelin.swinglets.plaf;

 
import java.awt.*;
import java.awt.event.*;

import java.io.*;
import java.util.*;

import com.javelin.swinglets.*;

/**
 * SComponentSI is a SComponent user interface.
 * 
 * @author Robin Sharp
 */

public interface SComponentUI
{
    public final static int COMPONENT_ADDED = 300;
    public final static int COMPONENT_REMOVED = 301;
    
    /**
     * Get the look and feel class for this UI.
     */
    public Class getLookAndFeel();
    
    /**
     * Render the UI on the output, in the Header.
     */
    public void updateHeader( Object out, SComponent c );
    
   /**
    * Render the script code for a text the Header. 
    */
    public void updateScript( Object out, SComponent c );
    
    /**
     * Update the component header.
     */
    public void updateComponentHeader( Object out, SComponent c );

    /**
     * Render the UI on the output, in the Body.
     */
    public void update( Object out, SComponent c );

    /**
     * Update the component footer.
     */
    public void updateComponentFooter( Object out, SComponent c );

    /**
     * Render the event handling script on the output, in the Body.
     */
     public void updateEvent( Object out, SComponent c );

     // EVENTS /////////////////////////////////////////////////////////////////////
     
    /**
     * Adds the specified listener to receive component events from
     * the SComponent.
     */
    public void addListener( EventListener listener );
    
    /**
     * Removes the specified listener so that it no longer
     * receives events from the SComponent. 
     */
    public void removeListener( EventListener listener );
    
    /**
     * Adds the listeners to receive component events from
     * the SComponent at initialisation.
     */
    public void addListeners( SComponent component ) throws TooManyListenersException;
    
    /**
     * Removes all the listeners that received component events from
     * the SComponent at initialisation. 
     */
    public void removeListeners( SComponent component );
    
    /**
     * Tell the underlying UI that the container has been changed
     */
    public void update( SComponent c, int id, int index );
    
    /**
     * Tell the underlying UI that the container has been changed, when 
     * added to a layout manager.
     */
    public void update( SComponent c, int id, Object constraint );

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.