com.itmill.toolkit.terminal.web
Class DebugWindow

java.lang.Object
  extended by com.itmill.toolkit.terminal.Identifiable
      extended by com.itmill.toolkit.ui.AbstractComponent
          extended by com.itmill.toolkit.ui.AbstractComponentContainer
              extended by com.itmill.toolkit.ui.Panel
                  extended by com.itmill.toolkit.ui.Window
                      extended by com.itmill.toolkit.terminal.web.DebugWindow
All Implemented Interfaces:
MethodEventSource, Paintable, ParameterHandler, Scrollable, Sizeable, URIHandler, VariableOwner, Component, ComponentContainer, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachListener, EventListener

public class DebugWindow
extends Window

This class provides a debugging window where one may view the UIDL of the current window, or in a tabset the UIDL of an active frameset. It is primarily intended for creating and debugging themes.

Since:
3.0
Version:
4.1.4
Author:
IT Mill Ltd.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.itmill.toolkit.ui.Window
Window.CloseEvent, Window.CloseListener
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.URIHandler
URIHandler.ErrorEvent
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.ParameterHandler
ParameterHandler.ErrorEvent
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.ComponentContainer
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener
 
Field Summary
protected static String WINDOW_NAME
           
 
Fields inherited from class com.itmill.toolkit.ui.Window
BORDER_DEFAULT, BORDER_MINIMAL, BORDER_NONE
 
Fields inherited from interface com.itmill.toolkit.terminal.Sizeable
UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNITS_ROWS
 
Constructor Summary
protected DebugWindow(Application debuggedApplication, HttpSession session, ApplicationServlet servlet)
          Creates a new debug window for an application.
 
Method Summary
 void clearSession()
          Clears the session.
 void commitTheme()
          Commits the theme.
protected  Select createSelect(String caption, Object[] keys, String[] names)
           
protected  String getHTMLFormattedUIDL(String caption, String uidl)
           
protected  ApplicationServlet getServlet()
          Returns the servlet.
protected  HttpSession getSession()
          Returns the session.
protected static String replace(String text, int start, int end, String str)
          Replaces the characters in a substring of this String with characters in the specified String.
protected static String replaceAll(String text, String oldStr, String newStr)
           
 void restartApplication()
          Restarts the Application.
 void saveUIDL()
          Saves the UIDL.
protected  void setDebuggedApplication(Application application)
          Sets the application.
protected  void setServlet(ApplicationServlet servlet)
          Sets the servlet.
protected  void setSession(HttpSession session)
          Sets the session.
protected  void setWindowUIDL(Window window, String uidl)
           
 
Methods inherited from class com.itmill.toolkit.ui.Window
addListener, addParameterHandler, addURIHandler, changeVariables, fireClose, getApplication, getBorder, getFocusableById, getFocusedComponent, getName, getNewFocusableId, getParent, getPositionX, getPositionY, getTag, getTerminal, getTheme, getURL, getWindow, handleParameters, handleURI, open, open, open, paintContent, removeFocusableId, removeListener, removeParameterHandler, removeURIHandler, setApplication, setBorder, setFocusedComponent, setHeightUnits, setName, setParent, setPositionX, setPositionY, setTerminal, setTheme, setWidthUnits
 
Methods inherited from class com.itmill.toolkit.ui.Panel
addComponent, attach, componentAttachedToContainer, componentDetachedFromContainer, detach, getComponentIterator, getHeight, getHeightUnits, getLayout, getScrollOffsetX, getScrollOffsetY, getWidth, getWidthUnits, isScrollable, removeAllComponents, removeComponent, replaceComponent, setHeight, setLayout, setScrollable, setScrollOffsetX, setScrollOffsetY, setWidth
 
Methods inherited from class com.itmill.toolkit.ui.AbstractComponentContainer
addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeListener, removeListener
 
Methods inherited from class com.itmill.toolkit.ui.AbstractComponent
addListener, addListener, addListener, addListener, childRequestedRepaint, dependsOn, fireComponentErrorEvent, fireComponentEvent, fireEvent, getCaption, getComponentError, getData, getDescription, getDirectDependencies, getErrorMessage, getIcon, getLocale, getStyle, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeDirectDependency, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDescription, setEnabled, setIcon, setImmediate, setLocale, setReadOnly, setStyle, setVisible
 
Methods inherited from class com.itmill.toolkit.terminal.Identifiable
getDebugId, getUIID, setDebugId, setUIID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.itmill.toolkit.ui.Component
addListener, childRequestedRepaint, getCaption, getIcon, getLocale, getStyle, isEnabled, isReadOnly, isVisible, removeListener, setEnabled, setReadOnly, setStyle, setVisible
 
Methods inherited from interface com.itmill.toolkit.terminal.Paintable
addListener, paint, removeListener, requestRepaint, requestRepaintRequests
 
Methods inherited from interface com.itmill.toolkit.terminal.VariableOwner
dependsOn, getDirectDependencies, isImmediate, removeDirectDependency
 

Field Detail

WINDOW_NAME

protected static String WINDOW_NAME
Constructor Detail

DebugWindow

protected DebugWindow(Application debuggedApplication,
                      HttpSession session,
                      ApplicationServlet servlet)
Creates a new debug window for an application.

Parameters:
debuggedApplication - the Application to be debugged.
session - the Session to be debugged.
servlet - the Servlet to be debugged.
Method Detail

createSelect

protected Select createSelect(String caption,
                              Object[] keys,
                              String[] names)
Parameters:
caption -
keys -
names -
Returns:

saveUIDL

public void saveUIDL()
Saves the UIDL.


commitTheme

public void commitTheme()
Commits the theme.


clearSession

public void clearSession()
Clears the session.


restartApplication

public void restartApplication()
Restarts the Application.


setWindowUIDL

protected void setWindowUIDL(Window window,
                             String uidl)
Parameters:
window -
uidl -

getHTMLFormattedUIDL

protected String getHTMLFormattedUIDL(String caption,
                                      String uidl)
Parameters:
caption -
uidl -
Returns:

replace

protected static String replace(String text,
                                int start,
                                int end,
                                String str)
Replaces the characters in a substring of this String with characters in the specified String. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the String if no such character exists.

First the characters in the substring are removed and then the specified String is inserted at start. (The StringBuffer will be lengthened to accommodate the specified String if necessary.)

NOTE: This operation is slow.

Parameters:
text -
start - the beginning index, inclusive.
end - the ending index, exclusive.
str - the String that will replace previous contents.
Returns:
This string buffer.

replaceAll

protected static String replaceAll(String text,
                                   String oldStr,
                                   String newStr)
Parameters:
text -
oldStr -
newStr -
Returns:

setDebuggedApplication

protected void setDebuggedApplication(Application application)
Sets the application.

Parameters:
application - the application to set.

getServlet

protected ApplicationServlet getServlet()
Returns the servlet.

Returns:
the WebAdapterServlet.

getSession

protected HttpSession getSession()
Returns the session.

Returns:
the HttpSession.

setServlet

protected void setServlet(ApplicationServlet servlet)
Sets the servlet.

Parameters:
servlet - the servlet to set.

setSession

protected void setSession(HttpSession session)
Sets the session.

Parameters:
session - the session to set.


Copyright © 2000-2008 IT Mill Ltd. All Rights Reserved.