|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget com.google.gwt.user.client.ui.Panel com.google.gwt.user.client.ui.SimplePanel com.google.gwt.user.client.ui.PopupPanel com.google.gwt.user.client.ui.DecoratedPopupPanel com.google.gwt.user.client.ui.DialogBox org.kuali.student.common.ui.client.widgets.KSLightBox
public class KSLightBox
A KSLightBox is a dialog box that lays out its contents as follows using a
DockLayoutPanel
:
------------------
HEADER (either static caption / header widget that is not part of the scrollable area)
------------------
CONTENT (part of the scrollable area that will fill available space)
------------------
BUTTONS (static button area that is not part of the scrollable area)
------------------
The size of the dock panel will determine the size of the lightbox. Thus only the dock
panel size will need to be set.
The size of the dock panel is usually determined dynamically when the lightbox is
displayed, but you can also statically set it with one of the 'setSize' methods.
If you however set the size statically, the lightbox won't resize.
If you're making use of the static sizes, the non-caption header and displaying the
buttons, don't set the height of the dialog smaller than about 155px. Otherwise
there's too little space left for the content and the content (even if its just one line
of text) will be displayed in a scroll panel.
Nested Class Summary | |
---|---|
static class |
KSLightBox.Size
An enum that specifies predefined width and height values (in pixels) for the lightbox. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.DialogBox |
---|
com.google.gwt.user.client.ui.DialogBox.Caption, com.google.gwt.user.client.ui.DialogBox.CaptionImpl |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel |
---|
com.google.gwt.user.client.ui.PopupPanel.PositionCallback |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
KSLightBox()
|
|
KSLightBox(boolean addCloseLink)
|
|
KSLightBox(String title)
|
|
KSLightBox(String title,
KSLightBox.Size size)
|
Method Summary | |
---|---|
void |
addButton(com.google.gwt.user.client.ui.Widget button)
Adds a button to the bottom of the lightbox. |
void |
addButtonGroup(ButtonGroup group)
Adds a ButtonGroup to the button panel at the bottom of the lightbox. |
void |
addButtonGroup(ButtonGroup group)
Adds a ButtonGroup to the button panel at the bottom of the lightbox. |
com.google.gwt.event.shared.HandlerRegistration |
addCloseLinkClickHandler(com.google.gwt.event.dom.client.ClickHandler clickHandler)
|
void |
clearButtons()
Removes all the buttons at the bottom of the lightbox. |
com.google.gwt.user.client.ui.Widget |
getWidget()
|
void |
hide()
|
void |
installResizeHandler()
|
protected void |
onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent preview)
|
void |
removeCloseLink()
|
void |
setCloseLinkVisible(boolean visible)
|
void |
setMaxHeight(int height)
Set the maximum height in pixels that this dialog will grow to. Please note: If the lightbox's size was set explicitly, this call will have no effect. |
void |
setMaxWidth(int width)
Set the maximum width in pixels that this dialog will grow to. Please note: If the lightbox's size was set explicitly, this call will have no effect. |
void |
setNonCaptionHeader(com.google.gwt.user.client.ui.Widget widget)
Sets the header that will be displayed at the top of the lightbox. Please note: This header will not be displayed in the caption, but in the actual lightbox content area. |
void |
setSize(int width,
int height)
Set the width and height of the lightbox in pixels. Please note: These values will not be affected by resizing. |
void |
setSize(KSLightBox.Size size)
Set the width and height of the lightbox in pixels using the KSLightBox.Size enum. |
void |
setText(String text)
|
void |
setWidget(com.google.gwt.user.client.ui.Widget content)
|
void |
show()
|
void |
showButtons(boolean show)
|
void |
uninstallResizeHandler()
|
Methods inherited from class com.google.gwt.user.client.ui.DialogBox |
---|
beginDragging, continueDragging, doAttachChildren, doDetachChildren, endDragging, getCaption, getHTML, getText, onBrowserEvent, onEnsureDebugId, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, setHTML, setHTML |
Methods inherited from class com.google.gwt.user.client.ui.DecoratedPopupPanel |
---|
clear, getCellElement, iterator, remove |
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel |
---|
addAutoHidePartner, addCloseHandler, addPopupListener, center, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidth, showRelativeTo |
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel |
---|
add, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, adopt, disown, orphan, remove |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public KSLightBox()
public KSLightBox(boolean addCloseLink)
public KSLightBox(String title)
public KSLightBox(String title, KSLightBox.Size size)
Method Detail |
---|
public void setCloseLinkVisible(boolean visible)
public void removeCloseLink()
public com.google.gwt.event.shared.HandlerRegistration addCloseLinkClickHandler(com.google.gwt.event.dom.client.ClickHandler clickHandler)
public void setNonCaptionHeader(com.google.gwt.user.client.ui.Widget widget)
widget
- The header widget.public void setText(String text)
setText
in interface com.google.gwt.user.client.ui.HasText
setText
in class com.google.gwt.user.client.ui.DialogBox
public void clearButtons()
public void addButton(com.google.gwt.user.client.ui.Widget button)
public void addButtonGroup(ButtonGroup group)
ButtonGroup
to the button panel at the bottom of the lightbox.
group
- public void addButtonGroup(ButtonGroup group)
ButtonGroup
to the button panel at the bottom of the lightbox.
group
- public void showButtons(boolean show)
public void setMaxWidth(int width)
width
- The dialog's maximum width in pixels.public void setMaxHeight(int height)
height
- The dialog's maximum height in pixels.public void setSize(int width, int height)
width
- The specified width in pixels.height
- The specified height in pixels.public void setSize(KSLightBox.Size size)
KSLightBox.Size
enum.
size
- A predefined dialog size.public void setWidget(com.google.gwt.user.client.ui.Widget content)
setWidget
in interface com.google.gwt.user.client.ui.HasOneWidget
setWidget
in class com.google.gwt.user.client.ui.DecoratedPopupPanel
public com.google.gwt.user.client.ui.Widget getWidget()
getWidget
in interface com.google.gwt.user.client.ui.HasOneWidget
getWidget
in class com.google.gwt.user.client.ui.DecoratedPopupPanel
public void hide()
hide
in class com.google.gwt.user.client.ui.DialogBox
public void show()
show
in class com.google.gwt.user.client.ui.DialogBox
protected void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent preview)
onPreviewNativeEvent
in class com.google.gwt.user.client.ui.DialogBox
public void uninstallResizeHandler()
public void installResizeHandler()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |