plugins.adufour.ezplug
Class EzComponent

java.lang.Object
  extended by plugins.adufour.ezplug.EzComponent
Direct Known Subclasses:
EzButton, EzGroup, EzLabel, EzVar

public abstract class EzComponent
extends java.lang.Object

Abstract class defining a component of an EzPlug and its behavior in the graphical user interface.
An EzComponent can either be an input variable (through which users can select or input values), or a graphical object allowing to produce high-quality graphical interfaces to the EzPlug.
Methods in this class provide the ability to show and hide components directly from the interface using triggers from other EzComponents

Author:
Alexandre Dufour

Field Summary
 java.lang.String name
          The name of this variable (as it will appear in the interface).
protected  boolean visible
           
 
Constructor Summary
protected EzComponent(java.lang.String name)
           
 
Method Summary
protected abstract  void addTo(java.awt.Container container)
           
protected  void dispose()
           
protected  EzGroup getGroup()
          Gets the group to which this variable belongs (or null if this variable is top-level)
 boolean getVisible()
          Deprecated. use isVisible() instead
 boolean isVisible()
           
protected  void setGroup(EzGroup group)
          Sets the group to which this variable belongs
abstract  void setToolTipText(java.lang.String text)
          Assigns a tool-tip text to the variable, which pops up when the user hovers the mouse on it.
 void setVisible(boolean state)
          Sets the component's visibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final java.lang.String name
The name of this variable (as it will appear in the interface). This field is read-only (it is set once upon component creation)


visible

protected boolean visible
Constructor Detail

EzComponent

protected EzComponent(java.lang.String name)
Method Detail

isVisible

public boolean isVisible()
Returns:
true if this component is visible on the user interface

getVisible

public boolean getVisible()
Deprecated. use isVisible() instead


setVisible

public void setVisible(boolean state)
Sets the component's visibility

Parameters:
state - the new visibility state

addTo

protected abstract void addTo(java.awt.Container container)

getGroup

protected final EzGroup getGroup()
Gets the group to which this variable belongs (or null if this variable is top-level)

Returns:
the group to which this variable belongs (or null if this variable is top-level)

setGroup

protected void setGroup(EzGroup group)
                 throws java.lang.IllegalArgumentException
Sets the group to which this variable belongs

Parameters:
group - the parent group of this variable
Throws:
java.lang.IllegalArgumentException - if this component already belongs to a group

setToolTipText

public abstract void setToolTipText(java.lang.String text)
Assigns a tool-tip text to the variable, which pops up when the user hovers the mouse on it.

Parameters:
text - the text to display (usually no more than 20 words)

dispose

protected void dispose()