Class VDebugWindow
- 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.vaadin.client.widgets.Overlay
-
- com.vaadin.client.ui.VOverlay
-
- com.vaadin.client.debug.internal.VDebugWindow
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>
,com.google.gwt.event.shared.EventHandler
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.EventPreview
,com.google.gwt.user.client.ui.AcceptsOneWidget
,com.google.gwt.user.client.ui.HasAnimation
,com.google.gwt.user.client.ui.HasOneWidget
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,com.google.gwt.user.client.ui.SourcesPopupEvents
,Iterable<com.google.gwt.user.client.ui.Widget>
public final class VDebugWindow extends VOverlay
Debug window implementation.- Since:
- 7.1
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
VDebugWindow.Menu
Popup menu forVDebugWindow
.protected class
VDebugWindow.MouseHandler
Handler for resizing and moving window, also updates cursor on mousemove.-
Nested classes/interfaces inherited from class com.vaadin.client.widgets.Overlay
Overlay.PositionAndSize, Overlay.ResizeAnimation
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected Section
activeSection
protected com.google.gwt.user.client.ui.Button
close
protected com.google.gwt.user.client.ui.SimplePanel
content
protected com.google.gwt.user.client.ui.FlowPanel
controls
protected int
fontSize
protected int
fullH
protected int
fullW
protected int
fullX
protected int
fullY
protected static int
HANDLE_SIZE
protected com.google.gwt.user.client.ui.FlowPanel
head
protected com.google.gwt.user.client.ui.Button
menu
protected VDebugWindow.Menu
menuPopup
protected static int
MIN_HEIGHT
protected com.google.gwt.user.client.ui.Button
minimize
protected boolean
minimized
protected int
minX
protected int
minY
protected com.google.gwt.event.shared.HandlerRegistration
mouseDownHandler
protected com.google.gwt.event.shared.HandlerRegistration
mouseMoveHandler
protected static int
MOVE_TRESHOLD
protected com.google.gwt.user.client.ui.FlowPanel
sectionHead
protected ArrayList<Section>
sections
protected static String
STYLENAME_CONTENT
protected static String
STYLENAME_CONTROLS
protected static String
STYLENAME_HEAD
protected static String
STYLENAME_SECTION_HEAD
protected static String
STYLENAME_SELECTED
protected static String
STYLENAME_TAB
protected static String
STYLENAME_TABS
protected com.google.gwt.user.client.ui.FlowPanel
tabs
protected com.google.gwt.user.client.ui.FlowPanel
window
-
Fields inherited from class com.vaadin.client.widgets.Overlay
ADDITIONAL_CLASSNAME_ANIMATE_IN, ADDITIONAL_CLASSNAME_ANIMATE_OUT, CLASSNAME_CONTAINER, CLASSNAME_SHADOW, Z_INDEX
-
-
Constructor Summary
Constructors Constructor Description VDebugWindow()
This class should only be instantiated by the framework, useget()
instead to get the singleton instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSection(Section section)
Adds the givenSection
as a tab in theVDebugWindow
UI.void
close()
Closes the window and stops visual logging.static VDebugWindow
get()
Gets theVDebugWindow()
singleton instance.com.google.gwt.user.client.Element
getOverlayContainer()
Gets the container element for this window.void
init()
Called when the window is initialized.void
meta(ApplicationConnection ac, ValueMap meta)
Called when the result from analyzeLayouts is received.void
uidl(ApplicationConnection ac, ValueMap uidl)
Called when a response is received-
Methods inherited from class com.vaadin.client.ui.VOverlay
getApplicationConnection, getOverlayContainer, setOverlayContainerLabel
-
Methods inherited from class com.vaadin.client.widgets.Overlay
center, getOwner, hide, hide, hide, isFitInWindow, isShadowEnabled, isShimElementEnabled, isSinkShadowEvents, needsShimElement, onAttach, onClose, onDetach, positionOrSizeUpdated, setFitInWindow, setHeight, setOwner, setPopupPosition, setShadowEnabled, setShadowStyle, setSinkShadowEvents, setVisible, setWidth, setZIndex, show, sinkEvents, updateShadowSizeAndPosition, useShadowDiv
-
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, getAnimationType, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onPreviewNativeEvent, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setWidget, showRelativeTo
-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getWidget, iterator, remove, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, 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, onBrowserEvent, onLoad, removeFromParent, setLayoutData, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
STYLENAME_HEAD
protected static final String STYLENAME_HEAD
- See Also:
- Constant Field Values
-
STYLENAME_TABS
protected static final String STYLENAME_TABS
- See Also:
- Constant Field Values
-
STYLENAME_TAB
protected static final String STYLENAME_TAB
- See Also:
- Constant Field Values
-
STYLENAME_CONTROLS
protected static final String STYLENAME_CONTROLS
- See Also:
- Constant Field Values
-
STYLENAME_SECTION_HEAD
protected static final String STYLENAME_SECTION_HEAD
- See Also:
- Constant Field Values
-
STYLENAME_CONTENT
protected static final String STYLENAME_CONTENT
- See Also:
- Constant Field Values
-
STYLENAME_SELECTED
protected static final String STYLENAME_SELECTED
- See Also:
- Constant Field Values
-
MOVE_TRESHOLD
protected static final int MOVE_TRESHOLD
- See Also:
- Constant Field Values
-
MIN_HEIGHT
protected static final int MIN_HEIGHT
- See Also:
- Constant Field Values
-
HANDLE_SIZE
protected static final int HANDLE_SIZE
- See Also:
- Constant Field Values
-
activeSection
protected Section activeSection
-
minimized
protected boolean minimized
-
fullX
protected int fullX
-
fullY
protected int fullY
-
fullW
protected int fullW
-
fullH
protected int fullH
-
minX
protected int minX
-
minY
protected int minY
-
fontSize
protected int fontSize
-
window
protected com.google.gwt.user.client.ui.FlowPanel window
-
head
protected com.google.gwt.user.client.ui.FlowPanel head
-
tabs
protected com.google.gwt.user.client.ui.FlowPanel tabs
-
controls
protected com.google.gwt.user.client.ui.FlowPanel controls
-
minimize
protected com.google.gwt.user.client.ui.Button minimize
-
menu
protected com.google.gwt.user.client.ui.Button menu
-
close
protected com.google.gwt.user.client.ui.Button close
-
menuPopup
protected VDebugWindow.Menu menuPopup
-
sectionHead
protected com.google.gwt.user.client.ui.FlowPanel sectionHead
-
content
protected com.google.gwt.user.client.ui.SimplePanel content
-
mouseDownHandler
protected com.google.gwt.event.shared.HandlerRegistration mouseDownHandler
-
mouseMoveHandler
protected com.google.gwt.event.shared.HandlerRegistration mouseMoveHandler
-
-
Constructor Detail
-
VDebugWindow
public VDebugWindow()
This class should only be instantiated by the framework, useget()
instead to get the singleton instance.VDebugWindow
provides windowing functionality and showsSection
s added withaddSection(Section)
as tabs.Section.getTabButton()
is called to obtain a unique id for the Sections; the id should actually be an identifier for an icon in the icon-font in use.Section.getControls()
andSection.getContent()
is called when the Section is activated (displayed). AdditionallySection.show()
is called to allow the Section to initialize itself as needed when shown. ConverselySection.hide()
is called when the Section is deactivated.Sections should take care to prefix CSS classnames used with
VDebugWindow
.STYLENAME
to avoid that application theme interferes with the debug window content.Some of the window state, such as position and size, is persisted to localStorage. Sections can use
writeState(Storage, String, Object)
andreadState(Storage, String, String)
(and relatives) to write and read own persisted settings, keys will automatically be prefixed with "v-debug-".
-
-
Method Detail
-
get
public static VDebugWindow get()
Gets theVDebugWindow()
singleton instance.- Returns:
-
close
public void close()
Closes the window and stops visual logging.
-
addSection
public void addSection(Section section)
Adds the givenSection
as a tab in theVDebugWindow
UI.Section.getTabButton()
is called to obtain a button which is used tab.- Parameters:
section
-
-
init
public void init()
Called when the window is initialized.
-
meta
public void meta(ApplicationConnection ac, ValueMap meta)
Called when the result from analyzeLayouts is received.- Parameters:
ac
-meta
-
-
uidl
public void uidl(ApplicationConnection ac, ValueMap uidl)
Called when a response is received- Parameters:
ac
-uidl
-
-
getOverlayContainer
public com.google.gwt.user.client.Element getOverlayContainer()
Gets the container element for this window. The debug window is always global to the document and not related to anyApplicationConnection
in particular.- Overrides:
getOverlayContainer
in classVOverlay
- Returns:
- The global overlay container element.
-
-