org.gwtwidgets.client.ui
Class SimpleCalcPanel

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by com.google.gwt.user.client.ui.FlowPanel
                      extended by org.gwtwidgets.client.ui.SimpleCalcPanel
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.IndexedPanel

public class SimpleCalcPanel
extends com.google.gwt.user.client.ui.FlowPanel

A simple calculator panel. The panel follows the template design pattern, which should make it fairly easy to change the layout and behavior by extending the class. A default set of styles are provided when including the following style-sheet declaration in your HTML file.

Author:
rhanson

Constructor Summary
SimpleCalcPanel()
           
 
Method Summary
protected  void buildCalcLayout(CalcEngine calcEngine, com.google.gwt.user.client.ui.TextBox textDisplay)
           
 void clearValue()
           
protected  void createCalc(CalcDisplayListener cdl, com.google.gwt.user.client.ui.TextBox textDisplay)
           
protected  CalcDisplayListener createDisplayListener(com.google.gwt.user.client.ui.TextBox textDisplay)
           
protected  com.google.gwt.user.client.ui.TextBox createTextDisplay()
           
 java.lang.String getValue()
           
protected  void init()
           
protected  void initComplete()
           
protected  void setKeyboardListener(com.google.gwt.user.client.ui.TextBox textDisplay)
           
 
Methods inherited from class com.google.gwt.user.client.ui.FlowPanel
add, insert
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleCalcPanel

public SimpleCalcPanel()
Method Detail

init

protected void init()

createDisplayListener

protected CalcDisplayListener createDisplayListener(com.google.gwt.user.client.ui.TextBox textDisplay)

setKeyboardListener

protected void setKeyboardListener(com.google.gwt.user.client.ui.TextBox textDisplay)

initComplete

protected void initComplete()

createCalc

protected void createCalc(CalcDisplayListener cdl,
                          com.google.gwt.user.client.ui.TextBox textDisplay)

createTextDisplay

protected com.google.gwt.user.client.ui.TextBox createTextDisplay()

buildCalcLayout

protected void buildCalcLayout(CalcEngine calcEngine,
                               com.google.gwt.user.client.ui.TextBox textDisplay)

getValue

public java.lang.String getValue()

clearValue

public void clearValue()


Copyright © 2009. All Rights Reserved.