|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.Panel
echopoint.Panel
echopoint.ScrollablePanel
echopoint.DialogPanel
public class DialogPanel
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.
Positionable
,
Scrollable
,
Clippable
,
AbstractScrollableComponent
,
Serialized FormNested 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 | |
---|---|
static java.lang.String |
ACTION_CLOSE
This close action command with close the DialogPanel |
static Color |
defaultBackground
default background color is greyish |
static Color |
defaultTitleBarBackground
default titlebar background color is blueish |
static Font |
defaultTitleBarFont
default titlebar font is sans serif 10 |
static Color |
defaultTitleBarForeground
default titlebar foreground color is white |
static java.lang.String |
DITHERING_CHANGED_PROPERTY
|
static java.lang.String |
DRAG_WINDOW_USED_CHANGED_PROPERTY
|
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 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.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 |
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(LayoutManager layoutManager)
Constructs a DialogPanel with a LayoutManager |
|
DialogPanel(java.lang.String dialogTitle)
DialogPanel constructor. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
The DialogPanel is an ActionListener and it
listens for an ActionEvent with a command of
DialogPanel.ACTION_CLOSE . |
void |
addDialogListener(DialogListener l)
Adds a DialogListener to the dialog |
void |
close()
Closes the dialog. |
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(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 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.layout.LayoutManageable |
---|
add, add, add, add, getLayoutManager, remove, remove, setLayoutManager |
Field Detail |
---|
public static Color defaultBackground
public static Color defaultTitleBarBackground
public static Font defaultTitleBarFont
public static int ZINDEX_RANGE
public static java.lang.String ACTION_CLOSE
public static Color defaultTitleBarForeground
public static java.lang.String DITHERING_CHANGED_PROPERTY
public static java.lang.String DRAG_WINDOW_USED_CHANGED_PROPERTY
public static java.lang.String TITLEBAR_CHANGED_PROPERTY
Constructor Detail |
---|
public DialogPanel()
public DialogPanel(LayoutManager layoutManager)
DialogPanel
with a LayoutManager
public DialogPanel(int left, int top)
left
- inttop
- intpublic DialogPanel(int left, int top, int right, int bottom)
left
- inttop
- intright
- intbottom
- intpublic DialogPanel(int left, int top, int right, int bottom, int zIndex)
left
- inttop
- intright
- intbottom
- intzIndex
- intpublic DialogPanel(int left, int top, int right, int bottom, int zIndex, int positioning)
left
- inttop
- intright
- intbottom
- intzIndex
- intpositioning
- intpublic DialogPanel(int left, int top, int right, int bottom, int zIndex, int positioning, int scrollBarPolicy)
left
- inttop
- intright
- intbottom
- intzIndex
- intpositioning
- intscrollBarPolicy
- intpublic DialogPanel(int left, int top, int right, int bottom, int zIndex, int positioning, int scrollBarPolicy, int[] clipRect)
left
- inttop
- intright
- intbottom
- intzIndex
- intpositioning
- intscrollBarPolicy
- intclipRect
- int[]public DialogPanel(java.lang.String dialogTitle)
Method Detail |
---|
public void addDialogListener(DialogListener l)
DialogListener
to the dialog
l
- The DialogListener
to be added.public void close()
This helper method removes the dialog from its parent, if it has one, and hence the dialog will not longer appear.
public TitleBar getTitleBar()
public boolean isBackgroundDithered()
public void removeDialogListener(DialogListener l)
DialogListener
from the dialog
l
- The DialogListener
to be removed.public void setBackgroundDithered(boolean newBackgroundDithered)
newBackgroundDithered
- booleanpublic void setTitleBar(TitleBar newTitleBar)
newTitleBar
- echopoint.TitleBarpublic boolean isDragWindowUsed()
public void setDragWindowUsed(boolean newValue)
newValue
- -
whether a drag window is used while dragging.public int getzIndex()
ScrollablePanel
getzIndex
in interface Positionable
getzIndex
in class ScrollablePanel
Positionable.getzIndex()
public void setzIndex(int newValue)
ScrollablePanel
setzIndex
in interface Positionable
setzIndex
in class ScrollablePanel
ScrollablePanel.setzIndex(int)
public void actionPerformed(ActionEvent e)
DialogPanel
is an ActionListener
and it
listens for an ActionEvent
with a command of
DialogPanel.ACTION_CLOSE
. If it receives such an event
then it will close itself.
actionPerformed
in interface ActionListener
e
- The event describing the action.ActionListener.actionPerformed(nextapp.echo.event.ActionEvent)
public java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
set
in class ScrollablePanel
field
- - the field to be setnewValue
- - the new value to be set
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |