net.sf.jzeno.echo.components
Class Dialog

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.Panel
          extended by echopoint.Panel
              extended by echopoint.ScrollablePanel
                  extended by echopoint.DialogPanel
                      extended by net.sf.jzeno.echo.components.Dialog
All Implemented Interfaces:
LayoutManageable, Borderable, Clippable, MouseCursorable, Positionable, Scrollable, ScrollableContainer, ReflectionSetter, java.io.Serializable, java.util.EventListener, BindingTarget, PropertyComponent, EventSink, EventSource, Component, ActionListener, FastComponent
Direct Known Subclasses:
AskScriptNameDialog, AskVariableNameDialog, ComponentInspectorDialog, DynaColorChooserDialog, DynaQuickSelectFieldDialog, DynaTableSortDialog, InsetsEditorDialog, JavaBeanPropertyEditorDialog, PickScriptVariableDialog, ScrapDialog, SelectScriptDialog, ServerFileNameDialog, StackTraceViewerDialog, StyleManagerEditStyleDialog, TestDialog, ValidationDialog

public class Dialog
extends DialogPanel
implements FastComponent, EventSink, EventSource, PropertyComponent, BindingTarget

Base class for all dialogs.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface echopoint.positionable.ScrollableContainer
ScrollableContainer.NestedStyleInfo
 
Nested classes/interfaces inherited from interface echopoint.positionable.MouseCursorable
MouseCursorable.NestedStyleInfo
 
Field Summary
 
Fields inherited from class echopoint.DialogPanel
ACTION_CLOSE, defaultBackground, defaultTitleBarBackground, defaultTitleBarFont, defaultTitleBarForeground, DITHERING_CHANGED_PROPERTY, DRAG_WINDOW_USED_CHANGED_PROPERTY, TITLEBAR_CHANGED_PROPERTY, ZINDEX_RANGE
 
Fields inherited from class echopoint.ScrollablePanel
DEFAULT_POSITONABLE_POLICY, DEFAULT_SCROLLBAR_POLICY
 
Fields inherited from class nextapp.echo.Panel
DEFAULT_INSETS, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_INSETS, STYLE_VERTICAL_ALIGNMENT, VERTICAL_ALIGNMENT_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.ScrollableContainer
HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_INSETS, STYLE_VERTICAL_ALIGNMENT, VERTICAL_ALIGNMENT_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.Scrollable
HEIGHT_CHANGED_PROPERTY, SCROLL_BAR_X_CHANGED_PROPERTY, SCROLL_BAR_Y_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.Positionable
POSITION_CHANGED_PROPERTY, POSITIONING_ABSOLUTE, POSITIONING_FLOW, POSITIONING_RELATIVE, positioningSymbolics, STYLE_BOTTOM, STYLE_LEFT, STYLE_POSITIONING, STYLE_RIGHT, STYLE_TOP, STYLE_ZINDEX, UNDEFINED, undefinedSymbolic
 
Fields inherited from interface echopoint.positionable.Clippable
CLIP_RECT_CHANGED_PROPERTY, STYLE_CLIP_RECT
 
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
 
Fields inherited from interface echopoint.layout.LayoutManageable
LAYOUT_MANAGED_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
Dialog()
           
Dialog(java.lang.Class beanClass, java.lang.String property, java.lang.String constructionHints)
           
 
Method Summary
 void add(Component c)
          Adds a Component to the Panel This method then informs any LayoutManager that is present.
 void add(Component c, int index)
          Adds a Component to the Panel at the specified index This method then informs any LayoutManager that is present.
 DynaGrid.Cell add(Component comp, int verticalAlignment, int horizontalAlignment)
           
 void add(Component comp, java.lang.Object constraints)
          Adds a Component to the Panel at the end of the list.
 void add(Component comp, java.lang.Object constraints, int index)
          Adds a Component to the Panel at the specified index.
 DynaGrid.Cell add(Component comp, java.lang.String cellConstructionHints)
           
 DynaGrid.Cell addCentered(Component component)
           
 DynaGrid.Cell addCentered(Component component, java.lang.String cellConstructionHints)
           
 DynaGrid.Cell addLeft(Component component)
           
 DynaGrid.Cell addLeft(Component component, java.lang.String cellConstructionHints)
           
 DynaGrid.Cell addRight(Component component)
           
 DynaGrid.Cell addRight(Component component, java.lang.String cellConstructionHints)
           
 void addValidator(Validator validator)
           Add extra validators to this component.
 void applyStyle(Style style)
          Applies the provided style to the component.
 void close()
          Closes the dialog.
protected  void fireActionEvent()
           
protected  void fireActionEvent(ActionEvent e)
           
protected  void fireActionEvent(java.lang.String actionCommand)
           
 java.lang.String getActionCommand()
           
 java.lang.Object getBean()
           Retrieve the root bean this editor is bound to.
 java.lang.Class getBeanClass()
           Determine the type of bean we are bound to.
 Decorator getDecorator()
           Gets the decorator, if any is configured.
 java.lang.Object getNullObject()
           
 java.lang.String getProperty()
           Retrieve the property path to bind to on the domain model cluster.
 java.lang.String getTitle()
           
 java.util.List getValidationErrors()
           Retrieves a list of currently pending validation errors on this component.
 java.util.List getValidators()
           Retrieve the list of active validators on this component.
 java.lang.Object getValue()
           Retrieve the property value from the domain model cluster.
 boolean isAllowLineWrap()
           
 boolean isMarkedInvalid()
           
 boolean isReadOnly()
           
 boolean isRequired()
           Query if the editor is required to be filled in.
 boolean isValid()
           Check if this component contains valid user input.
 void markInvalid()
           Marks the component as invalid.
 void markValid()
           Marks the component as valid (remove error marking)
 void preRender()
           Make changes to the visual representation of this component before Echo starts rendering the component.
 void rebind()
           
 void removeValidator(Validator validator)
           Remove an existing validator from this component.
 void setActionCommand(java.lang.String command)
           
 void setAllowLineWrap(boolean allowLineWrap)
           
 void setBean(java.lang.Object bean)
           sets the root bean for property-binding.
 void setBeanClass(java.lang.Class beanClass)
           Change the type of model bean this property component will be bound to.
 void setDecorator(Decorator decorator)
           Sets the decorator.
 void setNullObject(java.lang.Object nullObject)
           
 void setProperty(java.lang.String property)
           Set the property(path) to bind to on the domain model cluster.
 void setReadOnly(boolean readOnly)
           Mark this component as read-only.
 void setRequired(boolean required)
           Determine if the editor is required to be filled in.
 void setTitle(java.lang.String title)
           
 void setValue(java.lang.Object value)
           Writes the supplied data into the property we are bound to.
 void setVisible(boolean value)
          Sets the component visible or invisible.
 
Methods inherited from class echopoint.DialogPanel
actionPerformed, addDialogListener, getTitleBar, getzIndex, isBackgroundDithered, isDragWindowUsed, removeDialogListener, set, setBackgroundDithered, setDragWindowUsed, setTitleBar, setzIndex
 
Methods inherited from class echopoint.ScrollablePanel
clearPositioning, getBottom, getClipRect, getHeight, getLeft, getPositioning, getRight, getScreenHeight, getScreenWidth, getScrollBarPolicy, getScrollBarX, getScrollBarY, getTop, getWidth, isPositioned, setBottom, setClipRect, setClipRect, setClipRect, setHeight, setLeft, setPositioning, setRight, setScrollBarPolicy, setScrollBarX, setScrollBarY, setTop, setWidth
 
Methods inherited from class echopoint.Panel
addImpl, getBorderColor, getBorderSize, getBorderStyle, getBottomBorderColor, getBottomBorderSize, getBottomBorderStyle, getLayoutManager, getLeftBorderColor, getLeftBorderSize, getLeftBorderStyle, getMouseCursor, getMouseCursorURI, getRightBorderColor, getRightBorderSize, getRightBorderStyle, getTopBorderColor, getTopBorderSize, getTopBorderStyle, remove, remove, setBorderColor, setBorderSize, setBorderStyle, setBottomBorderColor, setBottomBorderSize, setBottomBorderStyle, setLayoutManager, setLeftBorderColor, setLeftBorderSize, setLeftBorderStyle, setMouseCursor, setMouseCursorURI, setRightBorderColor, setRightBorderSize, setRightBorderStyle, setTopBorderColor, setTopBorderSize, setTopBorderStyle
 
Methods inherited from class nextapp.echo.Panel
getHorizontalAlignment, getInsets, getVerticalAlignment, setHorizontalAlignment, setInsets, setVerticalAlignment
 
Methods inherited from class nextapp.echo.AbstractComponent
addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface echopoint.positionable.ScrollableContainer
getHorizontalAlignment, getInsets, getVerticalAlignment, setHorizontalAlignment, setInsets, setVerticalAlignment
 
Methods inherited from interface echopoint.positionable.Borderable
getBorderColor, getBorderSize, getBorderStyle, getBottomBorderColor, getBottomBorderSize, getBottomBorderStyle, getLeftBorderColor, getLeftBorderSize, getLeftBorderStyle, getRightBorderColor, getRightBorderSize, getRightBorderStyle, getTopBorderColor, getTopBorderSize, getTopBorderStyle, setBorderColor, setBorderSize, setBorderStyle, setBottomBorderColor, setBottomBorderSize, setBottomBorderStyle, setLeftBorderColor, setLeftBorderSize, setLeftBorderStyle, setRightBorderColor, setRightBorderSize, setRightBorderStyle, setTopBorderColor, setTopBorderSize, setTopBorderStyle
 
Methods inherited from interface echopoint.layout.LayoutManageable
getLayoutManager, remove, remove, setLayoutManager
 

Constructor Detail

Dialog

public Dialog()

Dialog

public Dialog(java.lang.Class beanClass,
              java.lang.String property,
              java.lang.String constructionHints)
Method Detail

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

close

public void close()
Description copied from class: DialogPanel
Closes the dialog.

This helper method removes the dialog from its parent, if it has one, and hence the dialog will not longer appear.

Overrides:
close in class DialogPanel

setVisible

public void setVisible(boolean value)
Description copied from interface: Component
Sets the component visible or invisible.

Specified by:
setVisible in interface Component
Overrides:
setVisible in class AbstractComponent
Parameters:
value - The new visibility state of the component.

isAllowLineWrap

public boolean isAllowLineWrap()

setAllowLineWrap

public void setAllowLineWrap(boolean allowLineWrap)

add

public void add(Component c,
                int index)
Description copied from class: Panel
Adds a Component to the Panel at the specified index

This method then informs any LayoutManager that is present.

Specified by:
add in interface LayoutManageable
Specified by:
add in interface Component
Overrides:
add in class Panel
Parameters:
c - The child component to add.
index - The index at which to add the child component, or -1 to add the component at the end.

add

public void add(Component comp,
                java.lang.Object constraints,
                int index)
Description copied from class: Panel
Adds a Component to the Panel at the specified index.

This method then informs any LayoutManager that is present.

Specified by:
add in interface LayoutManageable
Overrides:
add in class Panel

add

public void add(Component comp,
                java.lang.Object constraints)
Description copied from class: Panel
Adds a Component to the Panel at the end of the list.

This method then informs any LayoutManager that is present.

Specified by:
add in interface LayoutManageable
Overrides:
add in class Panel

add

public void add(Component c)
Description copied from class: Panel
Adds a Component to the Panel

This method then informs any LayoutManager that is present.

Specified by:
add in interface LayoutManageable
Specified by:
add in interface Component
Overrides:
add in class Panel
Parameters:
c - The child component to add.

add

public DynaGrid.Cell add(Component comp,
                         int verticalAlignment,
                         int horizontalAlignment)

add

public DynaGrid.Cell add(Component comp,
                         java.lang.String cellConstructionHints)

addCentered

public DynaGrid.Cell addCentered(Component component)

addCentered

public DynaGrid.Cell addCentered(Component component,
                                 java.lang.String cellConstructionHints)

addLeft

public DynaGrid.Cell addLeft(Component component)

addLeft

public DynaGrid.Cell addLeft(Component component,
                             java.lang.String cellConstructionHints)

addRight

public DynaGrid.Cell addRight(Component component)

addRight

public DynaGrid.Cell addRight(Component component,
                              java.lang.String cellConstructionHints)

applyStyle

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

Specified by:
applyStyle in interface Borderable
Specified by:
applyStyle in interface Clippable
Specified by:
applyStyle in interface MouseCursorable
Specified by:
applyStyle in interface Positionable
Specified by:
applyStyle in interface Scrollable
Specified by:
applyStyle in interface Component
Overrides:
applyStyle in class ScrollablePanel
Parameters:
style - The style object from which to retrieve properties for this Component.
See Also:
Borderable.applyStyle(nextapp.echo.Style)

getActionCommand

public java.lang.String getActionCommand()
Specified by:
getActionCommand in interface EventSource

setActionCommand

public void setActionCommand(java.lang.String command)
Specified by:
setActionCommand in interface EventSource

fireActionEvent

protected void fireActionEvent(java.lang.String actionCommand)

fireActionEvent

protected void fireActionEvent()

fireActionEvent

protected void fireActionEvent(ActionEvent e)

setBean

public void setBean(java.lang.Object bean)
Description copied from interface: PropertyComponent

sets the root bean for property-binding.

Specified by:
setBean in interface PropertyComponent

getBeanClass

public java.lang.Class getBeanClass()
Description copied from interface: PropertyComponent

Determine the type of bean we are bound to.

During the lifecycle of a property component, this may NOT change ! In other words, if this component has been bound to, let's say, an Address object, this component must at all times remain bound to Address components ! (It may ofcourse change the specific instance to which it is bound, by calling setBean.)

Specified by:
getBeanClass in interface PropertyComponent

getProperty

public java.lang.String getProperty()
Description copied from interface: PropertyComponent

Retrieve the property path to bind to on the domain model cluster.

Specified by:
getProperty in interface PropertyComponent

setProperty

public void setProperty(java.lang.String property)
Description copied from interface: PropertyComponent

Set the property(path) to bind to on the domain model cluster.

Specified by:
setProperty in interface PropertyComponent

getBean

public java.lang.Object getBean()
Description copied from interface: PropertyComponent

Retrieve the root bean this editor is bound to.

Specified by:
getBean in interface PropertyComponent

getDecorator

public Decorator getDecorator()
Description copied from interface: PropertyComponent

Gets the decorator, if any is configured.

Specified by:
getDecorator in interface PropertyComponent

getValue

public java.lang.Object getValue()
Description copied from interface: PropertyComponent

Retrieve the property value from the domain model cluster.

Specified by:
getValue in interface PropertyComponent

isRequired

public boolean isRequired()
Description copied from interface: PropertyComponent

Query if the editor is required to be filled in.

Specified by:
isRequired in interface PropertyComponent

isValid

public final boolean isValid()
Description copied from interface: PropertyComponent

Check if this component contains valid user input. In itself this operation will not mark the component in error. In order to apply error marking on invalid components you should use EchoSupport.doValidationRecursively(Component).

Specified by:
isValid in interface PropertyComponent

setDecorator

public void setDecorator(Decorator decorator)
Description copied from interface: PropertyComponent

Sets the decorator.

Specified by:
setDecorator in interface PropertyComponent

setRequired

public void setRequired(boolean required)
Description copied from interface: PropertyComponent

Determine if the editor is required to be filled in.

Specified by:
setRequired in interface PropertyComponent

setValue

public void setValue(java.lang.Object value)
Description copied from interface: PropertyComponent

Writes the supplied data into the property we are bound to.

Specified by:
setValue in interface PropertyComponent

setBeanClass

public void setBeanClass(java.lang.Class beanClass)
Description copied from interface: PropertyComponent

Change the type of model bean this property component will be bound to.

Specified by:
setBeanClass in interface PropertyComponent

getNullObject

public java.lang.Object getNullObject()

setNullObject

public void setNullObject(java.lang.Object nullObject)

getValidationErrors

public final java.util.List getValidationErrors()
Description copied from interface: PropertyComponent

Retrieves a list of currently pending validation errors on this component.

Specified by:
getValidationErrors in interface PropertyComponent

addValidator

public void addValidator(Validator validator)
Description copied from interface: PropertyComponent

Add extra validators to this component.

Specified by:
addValidator in interface PropertyComponent

removeValidator

public void removeValidator(Validator validator)
Description copied from interface: PropertyComponent

Remove an existing validator from this component.

Specified by:
removeValidator in interface PropertyComponent

getValidators

public java.util.List getValidators()
Description copied from interface: PropertyComponent

Retrieve the list of active validators on this component.

Specified by:
getValidators in interface PropertyComponent

rebind

public void rebind()

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface PropertyComponent

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from interface: PropertyComponent

Mark this component as read-only.

Specified by:
setReadOnly in interface PropertyComponent

preRender

public void preRender()
Description copied from interface: PropertyComponent

Make changes to the visual representation of this component before Echo starts rendering the component.

Do not modify any bound javabeans in this method, as the changes to these will not be reflected properly on the screen.

Specified by:
preRender in interface PropertyComponent

markInvalid

public final void markInvalid()
Description copied from interface: PropertyComponent

Marks the component as invalid. Typically puts a colored border around it to indicate the error.

Specified by:
markInvalid in interface PropertyComponent

markValid

public void markValid()
Description copied from interface: PropertyComponent

Marks the component as valid (remove error marking)

Specified by:
markValid in interface PropertyComponent

isMarkedInvalid

public boolean isMarkedInvalid()
Specified by:
isMarkedInvalid in interface PropertyComponent