|
|||||||||
| Home >> All >> [ echopoint overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
echopoint
Class DialogPanel

java.lang.Objectnextapp.echo.Component
nextapp.echo.Panel
echopoint.Panel
echopoint.ScrollablePanel
echopoint.DialogPanel
- All Implemented Interfaces:
- nextapp.echo.event.ActionListener, echopoint.positionable.Borderable, echopoint.positionable.Clippable, java.util.EventListener, echopoint.layout.LayoutManageable, echopoint.positionable.Positionable, echopoint.util.reflect.ReflectionSetter, echopoint.positionable.Scrollable, echopoint.positionable.ScrollableContainer, java.io.Serializable
- public class DialogPanel
- extends ScrollablePanel
- implements nextapp.echo.event.ActionListener
- extends ScrollablePanel
DialogPanel, which extends ScrollablePanel is
a generic container that implements Scrollable,
Positionable and Clippable.
When a DialogPanel is placed into the Component heirarchy, it places itself over all other components and only allows the user to interact with the components within it. It is thus said to be "modal".
Typically you would use the DialogPanel to obtain information from the user while
not allowing them to interact further with the application Window until they provide
that information.
DialogPanels stack onto top of other DialogPanels. You can add child DialogPanels to parent DialogPanels and the child ones will be "modal" with respect to the parent ones. Hence you can have a DialogPanel invoke another and have it "stack" on top of the original.
DialogPanels use a special zIndex range to "stack" themselves over other content. There are always
placed starting at DialogPanel.ZINDEX_RANGE. Therefore any content you want to be "under" the
DialogPanel must have a zIndex less that this. In general most components will work
however this is something you will want to be aware of. If you choose to set
the zIndex parameter yourself, then you will need to manage z-Index values inside
your program.
The DialogPanel will center itself vertically and horizontally
on the screen, unless its Positionable parameters are set, in which case
these will values apply.
DialogPanel uses the DialogListener interface to raise
DialogEvent's when it is opened, about to be closed and closed.
You can receive this events by implementing DialogListener and adding
it to the DialogPanel.
The default TitleBar provide with DialogPanel has a close icon on it.
DialogPanel is wired to listen to this TitleBar and will close itself when the
close button is pressed. If you replace the default TitleBar, you must rewire the
ActionListener interface yourself.
| Nested Class Summary | |
private class |
DialogPanel.OurDialogListener
|
| Nested classes inherited from class echopoint.positionable.ScrollableContainer |
echopoint.positionable.ScrollableContainer.NestedStyleInfo |
| Field Summary | |
static java.lang.String |
ACTION_CLOSE
This close action command with close the DialogPanel |
private boolean |
backgroundDithered
|
static nextapp.echo.Color |
defaultBackground
default background color is greyish |
static nextapp.echo.Color |
defaultTitleBarBackground
default titlebar background color is blueish |
static nextapp.echo.Font |
defaultTitleBarFont
default titlebar font is sans serif 10 |
static nextapp.echo.Color |
defaultTitleBarForeground
default titlebar foreground color is white |
static java.lang.String |
DITHERING_CHANGED_PROPERTY
|
static java.lang.String |
DRAG_WINDOW_USED_CHANGED_PROPERTY
|
private boolean |
dragWindowUsed
|
private DialogPanel.OurDialogListener |
ourDialogListener
|
private TitleBar |
titleBar
the internal titlebar reference |
static java.lang.String |
TITLEBAR_CHANGED_PROPERTY
|
static int |
ZINDEX_RANGE
DialogPanels always start out with this ZINDEX value |
| Fields inherited from class echopoint.ScrollablePanel |
DEFAULT_POSITONABLE_POLICY, DEFAULT_SCROLLBAR_POLICY |
| Fields inherited from class echopoint.Panel |
|
| 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_CHANGED_PROPERTY, 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 |
| Fields inherited from interface echopoint.layout.LayoutManageable |
LAYOUT_MANAGED_CHANGED_PROPERTY |
| Constructor Summary | |
DialogPanel()
DialogPanel constructor. |
|
DialogPanel(int left,
int top)
DialogPanel constructor. |
|
DialogPanel(int left,
int top,
int right,
int bottom)
DialogPanel constructor. |
|
DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex)
DialogPanel constructor. |
|
DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex,
int positioning)
DialogPanel constructor. |
|
DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex,
int positioning,
int scrollBarPolicy)
DialogPanel constructor. |
|
DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex,
int positioning,
int scrollBarPolicy,
int[] clipRect)
DialogPanel constructor. |
|
DialogPanel(echopoint.layout.LayoutManager layoutManager)
Constructs a DialogPanel with a LayoutManager |
|
DialogPanel(java.lang.String dialogTitle)
DialogPanel constructor. |
|
| Method Summary | |
private void |
_construct()
A private common constructor method |
private void |
_reRegisterComponents(nextapp.echo.Component oldValue,
nextapp.echo.Component newValue)
adds and removes an Component from the current hierarchy tree |
void |
actionPerformed(nextapp.echo.event.ActionEvent e)
The DialogPanel is an ActionListener and
it listens for an ActionEvent with a command
of DialogPanel.ACTION_CLOSE. |
void |
addDialogListener(echopoint.event.DialogListener l)
Adds a DialogListener to the dialog |
void |
close()
Closes the dialog. |
private void |
fireDialogClosed()
Notifies DialogListeners that the dialog has been closed. |
private void |
fireDialogClosing()
Notifies DialogListeners that dialog is closing. |
private void |
fireDialogOpened()
Notifies DialogListeners that the dialog has been opened. |
TitleBar |
getTitleBar()
Gets the titlebar used by the DialogPanel |
int |
getzIndex()
Returns the z-index of the component |
boolean |
isBackgroundDithered()
Retursn true if the background, under the DialogPanel, is to be dithered. |
boolean |
isDragWindowUsed()
Returns whether a drag window is used when dragging. |
void |
removeDialogListener(echopoint.event.DialogListener l)
Removes a DialogListener from the dialog |
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 |
setBackgroundDithered(boolean newBackgroundDithered)
Sets whether the background, under the DialogPanel, is to be dithered. |
void |
setDragWindowUsed(boolean newValue)
Sets whether a drag window is used when dragging. |
void |
setTitleBar(TitleBar newTitleBar)
Sets the titlebar used by the DialogPanel |
void |
setzIndex(int newValue)
Sets the z-index of the component |
| Methods inherited from class echopoint.ScrollablePanel |
applyStyle, 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 |
add, add, add, add, addImpl, getBorderColor, getBorderSize, getBorderStyle, getLayoutManager, remove, remove, setBorderColor, setBorderSize, setBorderStyle, setLayoutManager |
| Methods inherited from class nextapp.echo.Panel |
getHorizontalAlignment, getInsets, getVerticalAlignment, setHorizontalAlignment, setInsets, setVerticalAlignment |
| 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, setBorderColor, setBorderSize, setBorderStyle |
| Methods inherited from interface echopoint.layout.LayoutManageable |
add, add, add, add, getLayoutManager, remove, remove, setLayoutManager |
| Field Detail |
defaultBackground
public static nextapp.echo.Color defaultBackground
- default background color is greyish
defaultTitleBarBackground
public static nextapp.echo.Color defaultTitleBarBackground
- default titlebar background color is blueish
defaultTitleBarFont
public static nextapp.echo.Font defaultTitleBarFont
- default titlebar font is sans serif 10
ZINDEX_RANGE
public static int ZINDEX_RANGE
- DialogPanels always start out with this ZINDEX value
ACTION_CLOSE
public static java.lang.String ACTION_CLOSE
- This close action command with close the DialogPanel
defaultTitleBarForeground
public static nextapp.echo.Color defaultTitleBarForeground
- default titlebar foreground color is white
DITHERING_CHANGED_PROPERTY
public static java.lang.String DITHERING_CHANGED_PROPERTY
DRAG_WINDOW_USED_CHANGED_PROPERTY
public static java.lang.String DRAG_WINDOW_USED_CHANGED_PROPERTY
TITLEBAR_CHANGED_PROPERTY
public static java.lang.String TITLEBAR_CHANGED_PROPERTY
backgroundDithered
private boolean backgroundDithered
dragWindowUsed
private boolean dragWindowUsed
ourDialogListener
private DialogPanel.OurDialogListener ourDialogListener
titleBar
private TitleBar titleBar
- the internal titlebar reference
| Constructor Detail |
DialogPanel
public DialogPanel()
- DialogPanel constructor.
DialogPanel
public DialogPanel(echopoint.layout.LayoutManager layoutManager)
- Constructs a
DialogPanelwith a LayoutManager
DialogPanel
public DialogPanel(int left,
int top)
- DialogPanel constructor.
DialogPanel
public DialogPanel(int left,
int top,
int right,
int bottom)
- DialogPanel constructor.
DialogPanel
public DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex)
- DialogPanel constructor.
DialogPanel
public DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex,
int positioning)
- DialogPanel constructor.
DialogPanel
public DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex,
int positioning,
int scrollBarPolicy)
- DialogPanel constructor.
DialogPanel
public DialogPanel(int left,
int top,
int right,
int bottom,
int zIndex,
int positioning,
int scrollBarPolicy,
int[] clipRect)
- DialogPanel constructor.
DialogPanel
public DialogPanel(java.lang.String dialogTitle)
- DialogPanel constructor.
| Method Detail |
_construct
private void _construct()
- A private common constructor method
_reRegisterComponents
private void _reRegisterComponents(nextapp.echo.Component oldValue, nextapp.echo.Component newValue)
- adds and removes an Component from the current hierarchy tree
addDialogListener
public void addDialogListener(echopoint.event.DialogListener l)
- Adds a
DialogListenerto the dialog
close
public void close()
- Closes the dialog.
This helper method removes the dialog from its parent, if it has one, and hence the dialog will not longer appear.
fireDialogClosed
private void fireDialogClosed()
- Notifies
DialogListeners that the dialog has been closed.
fireDialogClosing
private void fireDialogClosing()
- Notifies
DialogListeners that dialog is closing.
fireDialogOpened
private void fireDialogOpened()
- Notifies
DialogListeners that the dialog has been opened.
getTitleBar
public TitleBar getTitleBar()
- Gets the titlebar used by the DialogPanel
isBackgroundDithered
public boolean isBackgroundDithered()
- Retursn true if the background, under the DialogPanel, is to be dithered.
removeDialogListener
public void removeDialogListener(echopoint.event.DialogListener l)
- Removes a
DialogListenerfrom the dialog
setBackgroundDithered
public void setBackgroundDithered(boolean newBackgroundDithered)
- Sets whether the background, under the DialogPanel, is to be dithered.
setTitleBar
public void setTitleBar(TitleBar newTitleBar)
- Sets the titlebar used by the DialogPanel
isDragWindowUsed
public boolean isDragWindowUsed()
- Returns whether a drag window is used when dragging.
setDragWindowUsed
public void setDragWindowUsed(boolean newValue)
- Sets whether a drag window is used when dragging. This is a
semi-transparent visual artifact that indicates where DialogPanel
can be dragged.
getzIndex
public int getzIndex()
- Description copied from class:
ScrollablePanel - Returns the z-index of the component
- Specified by:
getzIndexin interfaceechopoint.positionable.Positionable- Overrides:
getzIndexin classScrollablePanel
setzIndex
public void setzIndex(int newValue)
- Description copied from class:
ScrollablePanel - Sets the z-index of the component
- Specified by:
setzIndexin interfaceechopoint.positionable.Positionable- Overrides:
setzIndexin classScrollablePanel
actionPerformed
public void actionPerformed(nextapp.echo.event.ActionEvent e)
- The
DialogPanelis anActionListenerand it listens for anActionEventwith a command ofDialogPanel.ACTION_CLOSE. If it receives such an event then it will close itself.- Specified by:
actionPerformedin interfacenextapp.echo.event.ActionListener
set
public java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
- Description copied from interface:
echopoint.util.reflect.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:
setin interfaceechopoint.util.reflect.ReflectionSetter- Overrides:
setin classScrollablePanel
|
|||||||||
| Home >> All >> [ echopoint overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC