EchoPoint
1.0

echopoint
Class DevNull

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Container
          extended byechopoint.DevNull
All Implemented Interfaces:
ReflectionSetter, java.io.Serializable
Direct Known Subclasses:
ToolTipPopUp

public class DevNull
extends nextapp.echo.Container
implements ReflectionSetter

The DevNull class is a component that will NEVER render itself or any of its children. This allows them to be added to the Echo component hierarchy without necessarily being rendered. This will also allow Style application to take place for example on Components that are not otherwise designed to be seen.

The DevNull is always invisible and hence does not get a rendering peer, nor do any of the children placed inside it. This can lead to a more conservative use of memory for components that you know will not be rendered.

You will know when you need to use this class, which is not very often.

The name of this component is inspired by the UNIX bit bucket called /dev/null

See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
DevNull()
          Constructs a DevNull that is always invisible and hence does get a rendering peer for itself nor any of its children..
 
Method Summary
 java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue)
          Called to save the old value of a field, set in a new value and return the old value of a field.
 void setVisible(boolean newValue)
          The DevNull is always invisible and hence does not get a rendering peer for itself nor any of its children.
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DevNull

public DevNull()
Constructs a DevNull that is always invisible and hence does get a rendering peer for itself nor any of its children..

Method Detail

setVisible

public void setVisible(boolean newValue)
The DevNull is always invisible and hence does not get a rendering peer for itself nor any of its children.

See Also:
Component.setVisible(boolean)

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Specified by:
set in interface ReflectionSetter
Parameters:
field - - the field to be set
newValue - - the new value to be set
Returns:
the oldValue of the field
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0