org.opennms.gwt.web.ui.asset.client.view
Class AssetNodePageImpl

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.Composite
              extended by org.opennms.gwt.web.ui.asset.client.view.AssetNodePageImpl
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget, AssetPagePresenter.Display

public class AssetNodePageImpl
extends com.google.gwt.user.client.ui.Composite
implements AssetPagePresenter.Display

Author:
Markus Neumann AssetNodePage java part. Corresponding ui-binder xml AssetNodePage.ui.xml. Most parts are mapping code to fill the ui FieldSets from the command objects AssetCommand AssetSuggCommand and back. Adding some validators to FieldSets. Mapping code may be replaced by implementing GWT Editor framework.

Nested Class Summary
 
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
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
AssetNodePageImpl()
           
 
Method Summary
 com.google.gwt.user.client.ui.Widget asWidget()
          Recommend by GWT MVP design.
 void cleanUp()
          Cleans all ui changes, notes....
 AssetCommand getData()
          Fetches all data from the display as an AssetCommand.
 com.google.gwt.event.dom.client.HasClickHandlers getResetButton()
          get the reset button to add manage the related actions
 com.google.gwt.event.dom.client.HasClickHandlers getSaveButton()
          get the save button to add manage the related actions
 boolean isUiValid()
          Checks if the display ui is in a valid status.
 void setData(AssetCommand asset)
          Puts an AssetCommand to the display.
 void setDataSugg(AssetSuggCommand assetSugg)
          Puts an AssetSuggCommand to the display.
 void setEnable(Boolean enabled)
          Set the display ui in write enable or disable mode.
 void setError(String description, Throwable throwable)
          Puts an error with description and throwable to the display ui.
 void setInfo(String info)
          Sets status info to the display ui.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssetNodePageImpl

public AssetNodePageImpl()
Method Detail

asWidget

public com.google.gwt.user.client.ui.Widget asWidget()
Description copied from interface: AssetPagePresenter.Display
Recommend by GWT MVP design. Get the ui widgets up.

Specified by:
asWidget in interface com.google.gwt.user.client.ui.IsWidget
Specified by:
asWidget in interface AssetPagePresenter.Display
Overrides:
asWidget in class com.google.gwt.user.client.ui.Widget
Returns:
Widget

cleanUp

public void cleanUp()
Description copied from interface: AssetPagePresenter.Display
Cleans all ui changes, notes....

Specified by:
cleanUp in interface AssetPagePresenter.Display

getData

public AssetCommand getData()
Description copied from interface: AssetPagePresenter.Display
Fetches all data from the display as an AssetCommand.

Specified by:
getData in interface AssetPagePresenter.Display
Returns:
AssetCommand

getResetButton

public com.google.gwt.event.dom.client.HasClickHandlers getResetButton()
Description copied from interface: AssetPagePresenter.Display
get the reset button to add manage the related actions

Specified by:
getResetButton in interface AssetPagePresenter.Display
Returns:
HasClickHandlers

getSaveButton

public com.google.gwt.event.dom.client.HasClickHandlers getSaveButton()
Description copied from interface: AssetPagePresenter.Display
get the save button to add manage the related actions

Specified by:
getSaveButton in interface AssetPagePresenter.Display
Returns:
HasClickHandlers

isUiValid

public boolean isUiValid()
Description copied from interface: AssetPagePresenter.Display
Checks if the display ui is in a valid status. So all inputs are valid an ready for save or update.

Specified by:
isUiValid in interface AssetPagePresenter.Display
Returns:
boolean ui is valid ture / false

setData

public void setData(AssetCommand asset)
Description copied from interface: AssetPagePresenter.Display
Puts an AssetCommand to the display. To show all necessary content into the ui. AssetCommand contains asset-data and additional.

Specified by:
setData in interface AssetPagePresenter.Display

setDataSugg

public void setDataSugg(AssetSuggCommand assetSugg)
Description copied from interface: AssetPagePresenter.Display
Puts an AssetSuggCommand to the display. That contains all suggestions for all FieldSetSuggestBoxes at Display.

Specified by:
setDataSugg in interface AssetPagePresenter.Display

setEnable

public void setEnable(Boolean enabled)
Description copied from interface: AssetPagePresenter.Display
Set the display ui in write enable or disable mode. So changing data is possible or not.

Specified by:
setEnable in interface AssetPagePresenter.Display
Parameters:
enabled - for edit-mode.

setError

public void setError(String description,
                     Throwable throwable)
Description copied from interface: AssetPagePresenter.Display
Puts an error with description and throwable to the display ui.

Specified by:
setError in interface AssetPagePresenter.Display
Parameters:
description - of the error
throwable - of the error

setInfo

public void setInfo(String info)
Description copied from interface: AssetPagePresenter.Display
Sets status info to the display ui.

Specified by:
setInfo in interface AssetPagePresenter.Display


Copyright © 2011. All Rights Reserved.