org.drools.guvnor.client.ruleeditor
Class RuleViewer

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.drools.guvnor.client.common.DirtyableComposite
                  extended by org.drools.guvnor.client.ruleeditor.GuvnorEditor
                      extended by org.drools.guvnor.client.ruleeditor.RuleViewer
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, DirtyableWidget, IDirtyable

public class RuleViewer
extends GuvnorEditor

The main layout parent/controller the rule viewer.


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
protected  RuleAsset asset
           
 com.google.gwt.user.client.Command checkedInCommand
           
 com.google.gwt.user.client.Command refreshCommand
           
 
Fields inherited from class org.drools.guvnor.client.common.DirtyableComposite
dirtyflag
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
RuleViewer(RuleAsset asset, OpenItemCommand openItemCommand)
           
RuleViewer(RuleAsset asset, OpenItemCommand openItemCommand, boolean historicalReadOnly)
           
RuleViewer(RuleAsset asset, OpenItemCommand openItemCommand, com.google.gwt.user.client.Command closeCommand, com.google.gwt.user.client.Command checkedInCommand, com.google.gwt.user.client.Command archiveCommand, com.google.gwt.user.client.Command refreshCommand, boolean historicalReadOnly, ActionToolbarButtonsConfigurationProvider actionToolbarButtonsConfigurationProvider, RuleViewerSettings ruleViewerSettings)
           
 
Method Summary
 void doCheckin(String comment)
           
protected  void doCheckinConfirm(boolean closeAfter)
          Called when user wants to checkin. set closeAfter to true if it should close this whole thing after saving it.
protected  void doCloseUnsavedWarning()
          Called when user wants to close, but there is "dirtyness".
 void flushSuggestionCompletionCache()
          In some cases we will want to flush the package dependency stuff for suggestion completions.
 ActionToolbar getActionToolbar()
           
protected  boolean hasDirty()
           
 boolean isDirty()
           
 void showInfoMessage(String message)
           
protected  void showWorkingSetsSelection(RuleModeller modeller)
           
protected  void verifyAndDoCheckinConfirm(boolean closeAfter)
           
 
Methods inherited from class org.drools.guvnor.client.common.DirtyableComposite
getHeight, getWidth, makeDirty, onBrowserEvent, resetDirty
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addDomHandler, addHandler, asWidget, 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, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

checkedInCommand

public com.google.gwt.user.client.Command checkedInCommand

refreshCommand

public com.google.gwt.user.client.Command refreshCommand

asset

protected RuleAsset asset
Constructor Detail

RuleViewer

public RuleViewer(RuleAsset asset,
                  OpenItemCommand openItemCommand)
Parameters:
historicalReadOnly - true if this is a read only view for historical purposes.

RuleViewer

public RuleViewer(RuleAsset asset,
                  OpenItemCommand openItemCommand,
                  boolean historicalReadOnly)
Parameters:
historicalReadOnly - true if this is a read only view for historical purposes.

RuleViewer

public RuleViewer(RuleAsset asset,
                  OpenItemCommand openItemCommand,
                  com.google.gwt.user.client.Command closeCommand,
                  com.google.gwt.user.client.Command checkedInCommand,
                  com.google.gwt.user.client.Command archiveCommand,
                  com.google.gwt.user.client.Command refreshCommand,
                  boolean historicalReadOnly,
                  ActionToolbarButtonsConfigurationProvider actionToolbarButtonsConfigurationProvider,
                  RuleViewerSettings ruleViewerSettings)
Parameters:
historicalReadOnly - true if this is a read only view for historical purposes.
actionToolbarButtonsConfigurationProvider - used to change the default button configuration provider.
Method Detail

getActionToolbar

public ActionToolbar getActionToolbar()

isDirty

public boolean isDirty()
Specified by:
isDirty in interface DirtyableWidget
Overrides:
isDirty in class DirtyableComposite

verifyAndDoCheckinConfirm

protected void verifyAndDoCheckinConfirm(boolean closeAfter)

doCheckinConfirm

protected void doCheckinConfirm(boolean closeAfter)
Called when user wants to checkin. set closeAfter to true if it should close this whole thing after saving it.


doCheckin

public void doCheckin(String comment)

showWorkingSetsSelection

protected void showWorkingSetsSelection(RuleModeller modeller)

hasDirty

protected boolean hasDirty()

showInfoMessage

public void showInfoMessage(String message)

flushSuggestionCompletionCache

public void flushSuggestionCompletionCache()
In some cases we will want to flush the package dependency stuff for suggestion completions. The user will still need to reload the asset editor though.


doCloseUnsavedWarning

protected void doCloseUnsavedWarning()
Called when user wants to close, but there is "dirtyness".



Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.