EchoPoint
1.0

echopoint
Class EmbeddedPane

java.lang.Object
  extended bynextapp.echo.Component
      extended byechopoint.EmbeddedPane
All Implemented Interfaces:
Borderable, ReflectionSetter, Scrollable, java.io.Serializable

public class EmbeddedPane
extends nextapp.echo.Component
implements Scrollable, Borderable, ReflectionSetter

The EmbeddedPane class provides a Component that can embedded a ContentPane inside itself. It is similar to ScrollablePanel but different in implementation (via an iframe).

The content of an EmbeddedPane must be single a ContentPane object.

Basic Usage:


ContentPane mycontent = new ContentPane();
mycontent.add(someComponents);
...
...
EmbeddedPane mypane = new EmbeddedPane(mycontent);

THE EMBEDDED PANE CLASS REQUIRES ECHO 1.1 IN ORDER TO WORK CORRECTLY.

Echo 1.1 adds IFRAME support that this component relies on.

Author:
Jason Dalton (jdalton@asset.com)
See Also:
Serialized Form

Nested Class Summary
static class EmbeddedPane.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
static java.lang.String CONTENT_CHANGED_PROPERTY
           
static java.lang.String INSETS_CHANGED_PROPERTY
           
static int PERCENT_UNITS
           
static int PIXEL_UNITS
           
static java.lang.String SCROLL_BAR_X_CHANGED_PROPERTY
           
static java.lang.String SCROLL_BAR_Y_CHANGED_PROPERTY
           
static java.lang.String STYLE_HEIGHT_UNITS
          A style constant for the Height Units property.
static java.lang.String STYLE_INSETS
          A style constant for the Insets property.
static java.lang.String STYLE_WIDTH_UNITS
          A style constant for the Width Units property.
static java.lang.String UNITS_CHANGED_PROPERTY
           
 
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
 
Fields inherited from interface echopoint.positionable.Scrollable
HEIGHT_CHANGED_PROPERTY, SCROLLBAR_POLICY_CHANGED_PROPERTY, SCROLLBARS_ALWAYS, SCROLLBARS_AUTO, SCROLLBARS_CLIPHIDE, SCROLLBARS_NEVER, STYLE_HEIGHT, STYLE_SCROLL_BAR_POLICY, STYLE_WIDTH, UNDEFINED, undefinedSymbolic, WIDTH_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.Borderable
BORDER_DASHED, BORDER_DOTTED, BORDER_DOUBLE, BORDER_GROOVE, BORDER_INSET, BORDER_NONE, BORDER_OUTSET, BORDER_RIDGE, BORDER_SOLID, borderStyleSymbolics, STYLE_BORDER_COLOR, STYLE_BORDER_SIZE, STYLE_BORDER_STYLE, STYLE_BOTTOM_BORDER_COLOR, STYLE_BOTTOM_BORDER_SIZE, STYLE_BOTTOM_BORDER_STYLE, STYLE_LEFT_BORDER_COLOR, STYLE_LEFT_BORDER_SIZE, STYLE_LEFT_BORDER_STYLE, STYLE_RIGHT_BORDER_COLOR, STYLE_RIGHT_BORDER_SIZE, STYLE_RIGHT_BORDER_STYLE, STYLE_TOP_BORDER_COLOR, STYLE_TOP_BORDER_SIZE, STYLE_TOP_BORDER_STYLE
 
Constructor Summary
EmbeddedPane()
          Creates an EmbeddedPane with no content that is 100 by 100 pixels in dimensions.
EmbeddedPane(nextapp.echo.ContentPane content)
          Creates an EmbeddedPane with the specified ContentPane as content that is 100 by 100 pixels in dimensions.
 
Method Summary
 void add(nextapp.echo.Component c, int n)
          You cannot add arbitary Components to an EmbeddedPane.
 void add(nextapp.echo.ContentPane c)
          This is the equivalent of setContent(c).
 void applyStyle(nextapp.echo.Style style)
          Applies the provided style to the component.
 nextapp.echo.Color getBorderColor()
           
 int getBorderSize()
           
 int getBorderStyle()
          Returns the border style of the Borderable.
 nextapp.echo.Color getBottomBorderColor()
           
 int getBottomBorderSize()
           
 int getBottomBorderStyle()
           
 nextapp.echo.ContentPane getContent()
          Returns the ContentPane content.
 int getHeight()
          Returns the height.
 int getHeightUnits()
          Returns the heightUnits.
 nextapp.echo.Insets getInsets()
          Returns the insets.
 nextapp.echo.Color getLeftBorderColor()
           
 int getLeftBorderSize()
           
 int getLeftBorderStyle()
           
 nextapp.echo.Color getRightBorderColor()
           
 int getRightBorderSize()
           
 int getRightBorderStyle()
           
 int getScrollBarPolicy()
          Returns the ScrollBarPolicy in place This can be one of : SCOLLBARS_NONE SCOLLBARS_ALWAYS SCOLLBARS_AUTO
 int getScrollBarX()
          Returns the position of the horizontal scroll bar, in pixels offset from the left of the component.
 int getScrollBarY()
          Returns the position of the vertical scroll bar, in pixels offset from the top the component.
 nextapp.echo.Color getTopBorderColor()
           
 int getTopBorderSize()
           
 int getTopBorderStyle()
           
 int getWidth()
          Returns the width.
 int getWidthUnits()
          Returns the widthUnits.
 void remove(nextapp.echo.Component c)
          This Component remove method is overridden and causes the content of the EmbeddedPane to be removed.
 void remove(int index)
          The Component remove method is overridden and causes the content of the EmbeddedPane to be removed.
 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 setBorderColor(nextapp.echo.Color newBorderColor)
          Sets the Color of the Borderable's border.
 void setBorderSize(int newBorderSize)
          Sets the size of the Borderables's border.
 void setBorderStyle(int borderStyle)
          Sets the border style of the Borderable.
 void setBottomBorderColor(nextapp.echo.Color borderColor)
          Sets the Color of the Borderable's bottom border.
 void setBottomBorderSize(int borderSize)
          Sets the size of the Borderables's bottom border.
 void setBottomBorderStyle(int borderStyle)
          Sets the border style of the Borderables's bottom border.
 void setContent(nextapp.echo.ContentPane content)
          Sets the content.
 void setHeight(int height)
          Sets the height.
 void setHeightUnits(int heightUnits)
          Sets the heightUnits.
 void setInsets(nextapp.echo.Insets insets)
          Sets the insets.
 void setLeftBorderColor(nextapp.echo.Color borderColor)
          Sets the Color of the Borderable's left border.
 void setLeftBorderSize(int borderSize)
          Sets the size of the Borderables's left border.
 void setLeftBorderStyle(int borderStyle)
          Sets the border style of the Borderables's left border.
 void setRightBorderColor(nextapp.echo.Color borderColor)
          Sets the Color of the Borderable's right border.
 void setRightBorderSize(int borderSize)
          Sets the size of the Borderables's right border.
 void setRightBorderStyle(int borderStyle)
          Sets the border style of the Borderables's right border.
 void setScrollBarPolicy(int policy)
          Sets the scroll bar policy of the component This can be one of : SCOLLBARS_NONE SCOLLBARS_ALWAYS SCOLLBARS_AUTO
 void setScrollBarX(int newValue)
          Sets the position of the horizontal scroll bar, in pixels offset from the left of the component.
 void setScrollBarY(int newValue)
          Sets the position of the vertical scroll bar, in pixels offset from the top of the component.
 void setTopBorderColor(nextapp.echo.Color borderColor)
          Sets the Color of the Borderable's top border.
 void setTopBorderSize(int borderSize)
          Sets the size of the Borderables's top border.
 void setTopBorderStyle(int borderStyle)
          Sets the border style of the Borderables's top border.
 void setWidth(int width)
          Sets the width.
 void setWidthUnits(int widthUnits)
          Sets the widthUnits.
 
Methods inherited from class nextapp.echo.Component
add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_HEIGHT_UNITS

public static final java.lang.String STYLE_HEIGHT_UNITS
A style constant for the Height Units property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_INSETS

public static final java.lang.String STYLE_INSETS
A style constant for the Insets property. Values of this key must be of type Insets

See Also:
Constant Field Values

STYLE_WIDTH_UNITS

public static final java.lang.String STYLE_WIDTH_UNITS
A style constant for the Width Units property. Values of this key must be of type int

See Also:
Constant Field Values

CONTENT_CHANGED_PROPERTY

public static final java.lang.String CONTENT_CHANGED_PROPERTY
See Also:
Constant Field Values

UNITS_CHANGED_PROPERTY

public static final java.lang.String UNITS_CHANGED_PROPERTY
See Also:
Constant Field Values

INSETS_CHANGED_PROPERTY

public static final java.lang.String INSETS_CHANGED_PROPERTY
See Also:
Constant Field Values

SCROLL_BAR_X_CHANGED_PROPERTY

public static final java.lang.String SCROLL_BAR_X_CHANGED_PROPERTY
See Also:
Constant Field Values

SCROLL_BAR_Y_CHANGED_PROPERTY

public static final java.lang.String SCROLL_BAR_Y_CHANGED_PROPERTY
See Also:
Constant Field Values

PIXEL_UNITS

public static int PIXEL_UNITS

PERCENT_UNITS

public static int PERCENT_UNITS
Constructor Detail

EmbeddedPane

public EmbeddedPane()
Creates an EmbeddedPane with no content that is 100 by 100 pixels in dimensions.


EmbeddedPane

public EmbeddedPane(nextapp.echo.ContentPane content)
Creates an EmbeddedPane with the specified ContentPane as content that is 100 by 100 pixels in dimensions.

Method Detail

add

public void add(nextapp.echo.Component c,
                int n)
You cannot add arbitary Components to an EmbeddedPane. You must only add a single ContentPane.

See Also:
Component.add(nextapp.echo.Component, int)

add

public void add(nextapp.echo.ContentPane c)
This is the equivalent of setContent(c).


applyStyle

public void applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. The base nextapp.echo.Component style names can be used as well.

Specified by:
applyStyle in interface Scrollable

getContent

public nextapp.echo.ContentPane getContent()
Returns the ContentPane content.

Returns:
the ContentPane content

getHeight

public int getHeight()
Returns the height.

Specified by:
getHeight in interface Scrollable
Returns:
the height

getHeightUnits

public int getHeightUnits()
Returns the heightUnits.

Returns:
the heightUnits

getInsets

public nextapp.echo.Insets getInsets()
Returns the insets.

Returns:
Insets

getScrollBarPolicy

public int getScrollBarPolicy()
Description copied from interface: Scrollable
Returns the ScrollBarPolicy in place This can be one of :

Specified by:
getScrollBarPolicy in interface Scrollable
See Also:
Scrollable.getScrollBarPolicy()

getScrollBarX

public int getScrollBarX()
Returns the position of the horizontal scroll bar, in pixels offset from the left of the component.

Specified by:
getScrollBarX in interface Scrollable
Returns:
The position of the horizontal scroll bar.

getScrollBarY

public int getScrollBarY()
Returns the position of the vertical scroll bar, in pixels offset from the top the component.

Specified by:
getScrollBarY in interface Scrollable
Returns:
The position of the vertical scroll bar.

getWidth

public int getWidth()
Returns the width.

Specified by:
getWidth in interface Scrollable
Returns:
int

getWidthUnits

public int getWidthUnits()
Returns the widthUnits.

Returns:
int

remove

public void remove(int index)
The Component remove method is overridden and causes the content of the EmbeddedPane to be removed. It is the equivalent of calling setContent(null).

The index is not used.


remove

public void remove(nextapp.echo.Component c)
This Component remove method is overridden and causes the content of the EmbeddedPane to be removed. It is the equivalent of calling setContent(null).


setContent

public void setContent(nextapp.echo.ContentPane content)
Sets the content.

Parameters:
content - The content to set

setHeight

public void setHeight(int height)
Sets the height.

Specified by:
setHeight in interface Scrollable
Parameters:
height - The height to set

setHeightUnits

public void setHeightUnits(int heightUnits)
Sets the heightUnits.

Parameters:
heightUnits - The heightUnits to set

setInsets

public void setInsets(nextapp.echo.Insets insets)
Sets the insets.

Parameters:
insets - The insets to set

setScrollBarPolicy

public void setScrollBarPolicy(int policy)
Description copied from interface: Scrollable
Sets the scroll bar policy of the component This can be one of :

Specified by:
setScrollBarPolicy in interface Scrollable
See Also:
Scrollable.setScrollBarPolicy(int)

setScrollBarX

public void setScrollBarX(int newValue)
Sets the position of the horizontal scroll bar, in pixels offset from the left of the component.

Specified by:
setScrollBarX in interface Scrollable
Parameters:
newValue - The new position of the horizontal scroll bar, in pixels.

setScrollBarY

public void setScrollBarY(int newValue)
Sets the position of the vertical scroll bar, in pixels offset from the top of the component.

Specified by:
setScrollBarY in interface Scrollable
Parameters:
newValue - The new position of the vertical scroll bar, in pixels.

setWidth

public void setWidth(int width)
Sets the width.

Specified by:
setWidth in interface Scrollable
Parameters:
width - The width to set

setWidthUnits

public void setWidthUnits(int widthUnits)
Sets the widthUnits.

Parameters:
widthUnits - The widthUnits to set

getBorderColor

public nextapp.echo.Color getBorderColor()
Specified by:
getBorderColor in interface Borderable
Returns:
The Color of the Borderable's border.
See Also:
Borderable.getBorderColor()

getBorderSize

public int getBorderSize()
Specified by:
getBorderSize in interface Borderable
Returns:
The size of the Borderables's border.
See Also:
Borderable.getBorderSize()

getBorderStyle

public int getBorderStyle()
Description copied from interface: Borderable
Returns the border style of the Borderable. This will be one of the following values :

Specified by:
getBorderStyle in interface Borderable
Returns:
int the current border style
See Also:
Borderable.getBorderStyle()

setBorderColor

public void setBorderColor(nextapp.echo.Color newBorderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's border. This will also set the left, top, right and bottom border color.

Specified by:
setBorderColor in interface Borderable
See Also:
Borderable.setBorderColor(nextapp.echo.Color)

setBorderSize

public void setBorderSize(int newBorderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's border. This will also set the left, top, right and bottom border size.

Specified by:
setBorderSize in interface Borderable
See Also:
Borderable.setBorderSize(int)

setBorderStyle

public void setBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderable. This must be one of the following values : This will also set the left, top, right and bottom border style.

Specified by:
setBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

getLeftBorderColor

public nextapp.echo.Color getLeftBorderColor()
Specified by:
getLeftBorderColor in interface Borderable
Returns:
The Color of the Borderable's left border.
See Also:
Borderable.getLeftBorderColor()

getLeftBorderSize

public int getLeftBorderSize()
Specified by:
getLeftBorderSize in interface Borderable
Returns:
The size of the Borderables's left border.
See Also:
Borderable.getLeftBorderSize()

getLeftBorderStyle

public int getLeftBorderStyle()
Specified by:
getLeftBorderStyle in interface Borderable
Returns:
The style of the Borderables's left border.
See Also:
Borderable.getLeftBorderStyle()

setLeftBorderColor

public void setLeftBorderColor(nextapp.echo.Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's left border.

Specified by:
setLeftBorderColor in interface Borderable
See Also:
Borderable.setLeftBorderColor(nextapp.echo.Color)

setLeftBorderSize

public void setLeftBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's left border.

Specified by:
setLeftBorderSize in interface Borderable
See Also:
Borderable.setLeftBorderSize(int)

setLeftBorderStyle

public void setLeftBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's left border.

Specified by:
setLeftBorderStyle in interface Borderable
See Also:
Borderable.setLeftBorderStyle(int)

getTopBorderColor

public nextapp.echo.Color getTopBorderColor()
Specified by:
getTopBorderColor in interface Borderable
Returns:
The Color of the Borderable's top border.
See Also:
Borderable.getTopBorderColor()

getTopBorderSize

public int getTopBorderSize()
Specified by:
getTopBorderSize in interface Borderable
Returns:
The size of the Borderables's top border.
See Also:
Borderable.getTopBorderSize()

getTopBorderStyle

public int getTopBorderStyle()
Specified by:
getTopBorderStyle in interface Borderable
Returns:
The style of the Borderables's top border.
See Also:
Borderable.getTopBorderStyle()

setTopBorderColor

public void setTopBorderColor(nextapp.echo.Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's top border.

Specified by:
setTopBorderColor in interface Borderable
See Also:
Borderable.setTopBorderColor(nextapp.echo.Color)

setTopBorderSize

public void setTopBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's top border.

Specified by:
setTopBorderSize in interface Borderable
See Also:
Borderable.setTopBorderSize(int)

setTopBorderStyle

public void setTopBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's top border.

Specified by:
setTopBorderStyle in interface Borderable
See Also:
Borderable.setTopBorderStyle(int)

getRightBorderColor

public nextapp.echo.Color getRightBorderColor()
Specified by:
getRightBorderColor in interface Borderable
Returns:
The Color of the Borderable's right border.
See Also:
Borderable.getRightBorderColor()

getRightBorderSize

public int getRightBorderSize()
Specified by:
getRightBorderSize in interface Borderable
Returns:
The size of the Borderables's right border.
See Also:
Borderable.getRightBorderSize()

getRightBorderStyle

public int getRightBorderStyle()
Specified by:
getRightBorderStyle in interface Borderable
Returns:
The style of the Borderables's right border.
See Also:
Borderable.getRightBorderStyle()

setRightBorderColor

public void setRightBorderColor(nextapp.echo.Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's right border.

Specified by:
setRightBorderColor in interface Borderable
See Also:
Borderable.setRightBorderColor(nextapp.echo.Color)

setRightBorderSize

public void setRightBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's right border.

Specified by:
setRightBorderSize in interface Borderable
See Also:
Borderable.setRightBorderSize(int)

setRightBorderStyle

public void setRightBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's right border.

Specified by:
setRightBorderStyle in interface Borderable
See Also:
Borderable.setRightBorderStyle(int)

getBottomBorderColor

public nextapp.echo.Color getBottomBorderColor()
Specified by:
getBottomBorderColor in interface Borderable
Returns:
The Color of the Borderable's bottom border.
See Also:
Borderable.getBottomBorderColor()

getBottomBorderSize

public int getBottomBorderSize()
Specified by:
getBottomBorderSize in interface Borderable
Returns:
The size of the Borderables's bottom border.
See Also:
Borderable.getBottomBorderSize()

getBottomBorderStyle

public int getBottomBorderStyle()
Specified by:
getBottomBorderStyle in interface Borderable
Returns:
The style of the Borderables's bottom border.
See Also:
Borderable.getBottomBorderStyle()

setBottomBorderColor

public void setBottomBorderColor(nextapp.echo.Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's bottom border.

Specified by:
setBottomBorderColor in interface Borderable
See Also:
Borderable.setBottomBorderColor(nextapp.echo.Color)

setBottomBorderSize

public void setBottomBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's bottom border.

Specified by:
setBottomBorderSize in interface Borderable
See Also:
Borderable.setBottomBorderSize(int)

setBottomBorderStyle

public void setBottomBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's bottom border.

Specified by:
setBottomBorderStyle in interface Borderable
See Also:
Borderable.setBottomBorderStyle(int)

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