com.vaadin.client.debug.internal
Class VDebugWindow

java.lang.Object
  extended by PopupPanel
      extended by com.vaadin.client.widgets.Overlay
          extended by com.vaadin.client.ui.VOverlay
              extended by com.vaadin.client.debug.internal.VDebugWindow
All Implemented Interfaces:
com.google.gwt.event.logical.shared.CloseHandler<PopupPanel>, com.google.gwt.event.shared.EventHandler

public final class VDebugWindow
extends VOverlay

Debug window implementation.

Since:
7.1
Author:
Vaadin Ltd

Nested Class Summary
protected  class VDebugWindow.Menu
          Popup menu for VDebugWindow.
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
 
Field Summary
protected  Section activeSection
           
protected  Button close
           
protected  SimplePanel content
           
protected  FlowPanel controls
           
protected  int fontSize
           
protected  int fullH
           
protected  int fullW
           
protected  int fullX
           
protected  int fullY
           
protected static int HANDLE_SIZE
           
protected  FlowPanel head
           
protected  Button menu
           
protected  VDebugWindow.Menu menuPopup
           
protected static int MIN_HEIGHT
           
protected  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  FlowPanel sectionHead
           
protected  java.util.ArrayList<Section> sections
           
protected static java.lang.String STYLENAME_CONTENT
           
protected static java.lang.String STYLENAME_CONTROLS
           
protected static java.lang.String STYLENAME_HEAD
           
protected static java.lang.String STYLENAME_SECTION_HEAD
           
protected static java.lang.String STYLENAME_SELECTED
           
protected static java.lang.String STYLENAME_TAB
           
protected static java.lang.String STYLENAME_TABS
           
protected  FlowPanel tabs
           
protected  FlowPanel window
           
 
Fields inherited from class com.vaadin.client.ui.VOverlay
ac, current
 
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
VDebugWindow()
          This class should only be instantiated by the framework, use get() instead to get the singleton instance.
 
Method Summary
 void addSection(Section section)
          Adds the given Section as a tab in the VDebugWindow UI.
 void close()
          Closes the window and stops visual logging.
static VDebugWindow get()
          Gets the VDebugWindow() 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, isShadowEnabled, isShimElementEnabled, isSinkShadowEvents, needsShimElement, onAttach, onClose, onDetach, positionOrSizeUpdated, setHeight, setOwner, setPopupPosition, setShadowEnabled, setShadowStyle, setSinkShadowEvents, setVisible, setWidth, setZIndex, show, sinkEvents, updateShadowSizeAndPosition, useShadowDiv
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.logical.shared.CloseHandler
onClose
 

Field Detail

STYLENAME_HEAD

protected static final java.lang.String STYLENAME_HEAD
See Also:
Constant Field Values

STYLENAME_TABS

protected static final java.lang.String STYLENAME_TABS
See Also:
Constant Field Values

STYLENAME_TAB

protected static final java.lang.String STYLENAME_TAB
See Also:
Constant Field Values

STYLENAME_CONTROLS

protected static final java.lang.String STYLENAME_CONTROLS
See Also:
Constant Field Values

STYLENAME_SECTION_HEAD

protected static final java.lang.String STYLENAME_SECTION_HEAD
See Also:
Constant Field Values

STYLENAME_CONTENT

protected static final java.lang.String STYLENAME_CONTENT
See Also:
Constant Field Values

STYLENAME_SELECTED

protected static final java.lang.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 FlowPanel window

head

protected FlowPanel head

tabs

protected FlowPanel tabs

controls

protected FlowPanel controls

minimize

protected Button minimize

menu

protected Button menu

close

protected Button close

menuPopup

protected VDebugWindow.Menu menuPopup

sectionHead

protected FlowPanel sectionHead

content

protected SimplePanel content

sections

protected java.util.ArrayList<Section> sections

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, use get() instead to get the singleton instance.

VDebugWindow provides windowing functionality and shows Sections added with addSection(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() and Section.getContent() is called when the Section is activated (displayed). Additionally Section.show() is called to allow the Section to initialize itself as needed when shown. Conversely Section.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) and readState(Storage, String, String) (and relatives) to write and read own persisted settings, keys will automatically be prefixed with .

Method Detail

get

public static VDebugWindow get()
Gets the VDebugWindow() singleton instance.

Returns:

close

public void close()
Closes the window and stops visual logging.


addSection

public void addSection(Section section)
Adds the given Section as a tab in the VDebugWindow 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 any ApplicationConnection in particular.

Overrides:
getOverlayContainer in class VOverlay
Returns:
The global overlay container element.


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.