com.ibm.designer.domino.xsp.api.events
Class SimpleActionPanel

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by com.ibm.commons.swt.data.layouts.PropLayout
                      extended by com.ibm.commons.swt.data.layouts.PropLayout1
                          extended by com.ibm.designer.domino.xsp.api.events.SimpleActionPanel
All Implemented Interfaces:
IComplexPanel, IComplexPropertiesPanel, IPanelDataReciever, org.eclipse.swt.graphics.Drawable

public class SimpleActionPanel
extends PropLayout1
implements IComplexPropertiesPanel, IPanelDataReciever

A Composite that is used by the dialog that sets properties on the simple action via the Add Simple Action dialog and Edit Simple Action dialog.


Field Summary
 
Fields inherited from class com.ibm.commons.swt.data.layouts.PropLayout
TEXT_SUFFIX, UNITS_SUFFIX
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
SimpleActionPanel(org.eclipse.swt.widgets.Composite parent)
          Constructs a new instance of the class given the parent Composite.
 
Method Summary
protected  com.ibm.designer.domino.xsp.util.DCScriptingComposite createClientScriptEditor(java.lang.String attrName)
          Creates a client side script editor control for the provided attribute.
protected  org.eclipse.swt.layout.GridData createControlGD()
           
protected  DCCompositeCheckbox createDCCompositeCheck(java.lang.String attribute, java.lang.String label)
          Returns a DCCompositeCheckbox control with the specified parameters
protected  DCCompositeCombo createDCCompositeCombo(java.lang.String attrName, ILookup lookup, boolean hasFirstBlankLine, boolean isEditable)
          Creates a DCCompositeCombo control with the specified parameters
protected  DCCompositeText createDCCompositeMultiText(java.lang.String attribute, int lines)
          Creates a multi line DCCompositeText field corresponding to the given attribute
protected  DCCompositeText createDCCompositeText(java.lang.String attribute)
          Creates a DCCompositeText field corresponding to the given attribute
protected  com.ibm.designer.domino.ide.resources.util.XPagesNavigationRulePrepender createDesignElementNamePrepender()
           
protected  DCCompositeCombo createFormCombo()
          Creates a combo box that contains the names of all of the XPages.
protected  com.ibm.designer.domino.xsp.util.DCScriptingComposite createScriptEditor(java.lang.String attrName)
          Creates a server side script editor control for the provided attribute.
protected  DCCompositeCombo createVarComboBox(org.eclipse.swt.widgets.Composite parent)
          Creates a DCCompositeCombo that contains the names of all of the data sources on the page
protected  DCCompositeCombo createViewCombo()
          Creates an editable DCCompositeCombo which contains the ids of all of the viewPanel controls on the current XPage.
 org.eclipse.swt.widgets.Control getControl()
          Return the composite that is this panel.
 java.util.List<org.eclipse.swt.widgets.Control> getControlList()
           
 java.util.Map<org.eclipse.swt.widgets.Control,java.lang.String> getControlMap()
           
 IPanelExtraData getExtraData()
          Returns the panel data relating to the currently selected node on the XPage
 java.lang.String getPropertyName(org.eclipse.swt.widgets.Control control)
          Optional method to return the property name referring to a control.
protected  java.lang.String[] getViewIds()
           
protected  void initLayout()
          Creates the outer composite and grid layout.
protected  boolean isRequired(FacesProperty prop)
          Determines if the given property is required
protected  void registerControl(org.eclipse.swt.widgets.Control control, java.lang.String propName)
          Register the control so that it's focus listener works properly
 void setExtraData(IPanelExtraData data)
          Sets the extra panel data on the current panel.
 void setPropertyNode(org.w3c.dom.Node node)
          Set the node for the property being edited, which may not exist in the DOM.
 java.lang.String[] validate()
          Return a non-null string array to indicate a problem in validation.
 
Methods inherited from class com.ibm.commons.swt.data.layouts.PropLayout1
createContents, createContents, getControlId, getNumChildColumns, initChildComposite
 
Methods inherited from class com.ibm.commons.swt.data.layouts.PropLayout
addStateDependantChild, afterPanelCreation, cacheToolTip, checkEnableText, checkSelection, createChildLayout, createColorButton, createCombo, createCombo, createComboComputed, createComboComputed, createComboComputed, createComboComputed, createControlGDBigWidth, createControlGDDefWidth, createControlGDFill, createControlGDMultiLine, createControlGDNoWidth, createControlGDSmallWidth, createControlNonComputedGD, createDCCheckBox, createDCCheckBox, createDCCheckboxComputed, createDCCheckboxComputed, createDCCheckboxComputed, createDCCheckboxComputed, createDCLabel, createDCRadioButton, createDCText, createDCText, createDCTextComputed, createDCTextComputed, createDCTextComputed, createDCTextComputed, createDCTextComputedPositiveIntegerOnly, createDCTextNoWidth, createExtraIndentGD, createFillGD, createFillSpanGD, createFormatBean, createGroupBoxGridData, createGroupBoxLayout, createHeading, createHeightWidthSection, createIndentGD, createLabel, createLabel, createLabelSpanGD, createMultiLineText, createMultiLineTextComputed, createNoMarginGridLayout, createPanel, createResetButton, createResetButton, createSizeTextGD, createSpanGD, createTableSpanGD, createToggleButton, createUnitsGD, createUnitsTextAndCombo, createUnitsTextAndCombo, finishCreation, getComputedExtraWidthHint, getContextHelpId, getControlBigWidthHint, getControlForText, getControlForUnits, getControlIndentAmt, getControlSmallWidthHint, getControlWidthHint, getCSSLookup, getCurrentParent, getDataNode, getDefaultBackgroundColor, getDefaultTextCols, getExtraIndentAmt, getFigureContext, getHeightHint, getLabelToolTipText, getNumParentColumns, getResetImage, handleTooltip, initialize, installScrolledCompositeListeners, panelCreated, resetControlListeners, runAfterCreation, setCurrentParent, setFigureContext, showTooltips, useDCPanel
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getBorderWidth, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.designer.domino.xsp.api.panels.complex.IComplexPanel
createPanel
 

Constructor Detail

SimpleActionPanel

public SimpleActionPanel(org.eclipse.swt.widgets.Composite parent)
Constructs a new instance of the class given the parent Composite.

Parameters:
parent - - a Composite control which will be the parent of the new instance (CANNOT be null).
Method Detail

createControlGD

protected org.eclipse.swt.layout.GridData createControlGD()

createFormCombo

protected DCCompositeCombo createFormCombo()
Creates a combo box that contains the names of all of the XPages. The attribute that this combo box corresponds to is the "name" attribute. If users need to apply the combo box to a different attribute then setAttribute should be called on the resulting DCCompositeCombo.

Returns:
returns a combo containing all of the names of the XPages within the current application
See Also:
DCCompositeCombo

createDesignElementNamePrepender

protected com.ibm.designer.domino.ide.resources.util.XPagesNavigationRulePrepender createDesignElementNamePrepender()

createScriptEditor

protected com.ibm.designer.domino.xsp.util.DCScriptingComposite createScriptEditor(java.lang.String attrName)
Creates a server side script editor control for the provided attribute.

Parameters:
attrName - an attribute name corresponding to a simple action attribute.
Returns:

createClientScriptEditor

protected com.ibm.designer.domino.xsp.util.DCScriptingComposite createClientScriptEditor(java.lang.String attrName)
Creates a client side script editor control for the provided attribute.

Parameters:
attrName - an attribute name corresponding to a simple action attribute.
Returns:

createDCCompositeCombo

protected DCCompositeCombo createDCCompositeCombo(java.lang.String attrName,
                                                  ILookup lookup,
                                                  boolean hasFirstBlankLine,
                                                  boolean isEditable)
Creates a DCCompositeCombo control with the specified parameters

Parameters:
attrName - the name of the simple action attribute that this control represents
lookup - a lookup of values to populate the combo box with
hasFirstBlankLine - true if the first row in the combo box is to be empyu
isEditable - true if the combo box is to be editable
Returns:
returns a DCCompositeCombo corresponding to the provided arguments

createDCCompositeCheck

protected DCCompositeCheckbox createDCCompositeCheck(java.lang.String attribute,
                                                     java.lang.String label)
Returns a DCCompositeCheckbox control with the specified parameters

Parameters:
attribute - the name of the simple action attribute that this control represents
label - the label that is to correspond to this checkbox
Returns:
a DCCompositeCheckbox with the given label, and attribute

createDCCompositeText

protected DCCompositeText createDCCompositeText(java.lang.String attribute)
Creates a DCCompositeText field corresponding to the given attribute

Parameters:
attribute - the name of the simple action attribute that this control represents
Returns:
a DCCompositeText corresponding to the given attribute

createDCCompositeMultiText

protected DCCompositeText createDCCompositeMultiText(java.lang.String attribute,
                                                     int lines)
Creates a multi line DCCompositeText field corresponding to the given attribute

Parameters:
attribute - the name of the simple action attribute that this control represents
Returns:
a multi line DCCompositeText corresponding to the given attribute

createViewCombo

protected DCCompositeCombo createViewCombo()
Creates an editable DCCompositeCombo which contains the ids of all of the viewPanel controls on the current XPage.

Returns:
a DCCompositeCombo

getControl

public org.eclipse.swt.widgets.Control getControl()
Description copied from interface: IComplexPanel
Return the composite that is this panel. Helper method to get around multiple inheritance.

Specified by:
getControl in interface IComplexPanel
Returns:
the current Composite (this).

getExtraData

public IPanelExtraData getExtraData()
Returns the panel data relating to the currently selected node on the XPage

Returns:

getPropertyName

public java.lang.String getPropertyName(org.eclipse.swt.widgets.Control control)
Description copied from interface: IComplexPropertiesPanel
Optional method to return the property name referring to a control. Primarily used in simple actions.

Specified by:
getPropertyName in interface IComplexPropertiesPanel

getViewIds

protected java.lang.String[] getViewIds()
Returns:
the ids of all of the viewPanel controls on the current XPage

initLayout

protected void initLayout()
Creates the outer composite and grid layout. This will contain either 1 or 2 columns. The number of columns is determined by the value of PropLayout1.getNumChildColumns().

Overrides:
initLayout in class PropLayout

isRequired

protected boolean isRequired(FacesProperty prop)
Determines if the given property is required

Parameters:
prop - the FacesProperty whose 'required' value we are querying
Returns:
true if the property IS required

registerControl

protected void registerControl(org.eclipse.swt.widgets.Control control,
                               java.lang.String propName)
Register the control so that it's focus listener works properly


setExtraData

public void setExtraData(IPanelExtraData data)
Description copied from interface: IPanelDataReciever
Sets the extra panel data on the current panel. The data contained in IPanelExtraData is data that is typically very useful when working within a properties panel, data such as the current db etc.

Specified by:
setExtraData in interface IPanelDataReciever
Parameters:
data - extra data which might be needed when creating a properties panel

setPropertyNode

public void setPropertyNode(org.w3c.dom.Node node)
Description copied from interface: IComplexPropertiesPanel
Set the node for the property being edited, which may not exist in the DOM. The node set in IPanelExtraData is the node for the real top-level control.

Specified by:
setPropertyNode in interface IComplexPropertiesPanel

validate

public java.lang.String[] validate()
Description copied from interface: IComplexPropertiesPanel
Return a non-null string array to indicate a problem in validation. The string at index 0 will be converted to an int and used as the message severity in accordance with IMessageProvider and the string at index 1 will be used as the error message.

Specified by:
validate in interface IComplexPropertiesPanel

createVarComboBox

protected DCCompositeCombo createVarComboBox(org.eclipse.swt.widgets.Composite parent)
Creates a DCCompositeCombo that contains the names of all of the data sources on the page

Parameters:
parent - the Composite that is to be the parent of the combo
Returns:
an editable DCCompositeCombo

getControlMap

public java.util.Map<org.eclipse.swt.widgets.Control,java.lang.String> getControlMap()
Returns:
a map containing all of the registered controls on this panel a long with the attribute names they represent

getControlList

public java.util.List<org.eclipse.swt.widgets.Control> getControlList()
Returns:
a list of registered controls