com.fruitioninc.jwc
Class Component

java.lang.Object
  |
  +--com.fruitioninc.jwc.Component
Direct Known Subclasses:
Button, Container, HyperLink, Label, ListBox, TextArea, TextField

public class Component
extends java.lang.Object

A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user. Every component is a split into 3 parts: model, view, and controller.


Field Summary
static char NAME_DELIMITER
           
 
Constructor Summary
Component(Model model, View view)
           
Component(java.lang.String name, Model model, View view)
           
 
Method Summary
 void addComponentListener(ComponentListener listener)
          Adds a ComponentListener to this component.
 void addMouseListener(MouseListener listener)
          Adds a MouseListener to this component.
 void fireComponentSerialize(ComponentEvent event)
          Fires a ComponentEvent that signifies that the component is about to be serialized.
 void fireMouseClicked(MouseEvent event)
          Fires a MouseEvent that signifies that the user as clicked on the component with the mouse.
 Application getApplication()
          Returns the application this component is a part of.
 int getComponentListenerCount()
          Returns the number of ComponentListeners added to this component.
 java.util.Iterator getComponentListeners()
          Returns an iteration of the ComponentListeners added to this component.
 Container getContainer()
           
 Model getModel()
           
 int getMouseListenerCount()
          Returns the number of MouseListeners added to this component.
 java.util.Iterator getMouseListeners()
          Returns an iteration of the MouseListeners added to this component.
 java.lang.String getName()
           
 java.lang.String getPathName()
           
 View getView()
           
 void setModel(Model model)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_DELIMITER

public static final char NAME_DELIMITER
See Also:
Constant Field Values
Constructor Detail

Component

public Component(Model model,
                 View view)

Component

public Component(java.lang.String name,
                 Model model,
                 View view)
Method Detail

getContainer

public Container getContainer()

getApplication

public Application getApplication()
Returns the application this component is a part of.


getView

public View getView()

getModel

public Model getModel()

setModel

public void setModel(Model model)

getName

public java.lang.String getName()

getPathName

public java.lang.String getPathName()

addMouseListener

public void addMouseListener(MouseListener listener)
Adds a MouseListener to this component.


getMouseListeners

public java.util.Iterator getMouseListeners()
Returns an iteration of the MouseListeners added to this component.

Returns:
an iterator of MouseListener objects

getMouseListenerCount

public int getMouseListenerCount()
Returns the number of MouseListeners added to this component.


fireMouseClicked

public void fireMouseClicked(MouseEvent event)
Fires a MouseEvent that signifies that the user as clicked on the component with the mouse.


addComponentListener

public void addComponentListener(ComponentListener listener)
Adds a ComponentListener to this component.


getComponentListeners

public java.util.Iterator getComponentListeners()
Returns an iteration of the ComponentListeners added to this component.

Returns:
an iterator of ComponentListener objects

getComponentListenerCount

public int getComponentListenerCount()
Returns the number of ComponentListeners added to this component.


fireComponentSerialize

public void fireComponentSerialize(ComponentEvent event)
Fires a ComponentEvent that signifies that the component is about to be serialized.