com.ibm.designer.domino.xsp.api.panels.complex
Class ComplexPanelComposite

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.designer.domino.xsp.api.panels.complex.ComplexPanelComposite
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class ComplexPanelComposite
extends org.eclipse.swt.widgets.Composite

A composite that can be used to render panels for any given tag and uri. Queries the panels extension point for panels as this composite's contents. If a panel can not be found, it uses the object inspector (all properties) for the given tag.

Basically this Composite is VERY useful in a case where a parent composite is used to describe multiple objects (for instance a parent tag and child tag). If the the user makes a UI gesture that requires a new composite to be generated then this Composite is useful for such cases.

A good example is a data properties panel, whereby the panel is representing the 'data' attribute of the current tag. However the user may choose to add a Domino Document Data source as the data value. In this case it is desirable to show the properties panel for a Domino Document within the current data panel.


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
ComplexPanelComposite(org.eclipse.swt.widgets.Composite parent, int style)
          Constructs a new instance of the class given the parent Composite, and the style flags which are used to set the look/behavior of the control.
ComplexPanelComposite(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String uri, java.lang.String tagName, IPanelExtraData data)
          Create a new composite.
 
Method Summary
 void createContents()
          Creates the panel contents.
 java.lang.String getContextHelpId()
          Returns the context help id for the tag that is currently being displayed.
 java.lang.String getContextId()
          Returns the context id for the tag that is currently being displayed.
 IComplexPanel getCurrentPanel()
          Return the panel generated within the current ComplexPanelComposite.
 java.lang.String getNamespaceUri()
          Returns the namespace URI for the tag whose information is currently displayed
 com.ibm.designer.domino.xsp.internal.controls.XFacesPropertyTree getObjectInspector()
          Returns the All Properties tree for the given tag, may be null.
 java.lang.String getTagName()
          Returns the XML tag local name for the tag whose information is currently displayed
 void setContextHelpId(java.lang.String id)
          Sets the context help id.
 void setContextId(java.lang.String id)
          Sets the context id.
 void updatePanel(java.lang.String uri, java.lang.String tagName)
          Called to instruct the panel to update it's contents based on the new uri and tagname.
 void updatePanelData(IPanelExtraData data)
          Updates the IPenelExtraData used by the ComplexComposite.
 
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
 

Constructor Detail

ComplexPanelComposite

public ComplexPanelComposite(org.eclipse.swt.widgets.Composite parent,
                             int style)
Constructs a new instance of the class given the parent Composite, and the style flags which are used to set the look/behavior of the control.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. Style bits are also inherited from superclasses.

Parameters:
parent - a Composite control which will be the parent of the new instance (CANNOT be null).
style - the style of the control to construct.

ComplexPanelComposite

public ComplexPanelComposite(org.eclipse.swt.widgets.Composite parent,
                             int style,
                             java.lang.String uri,
                             java.lang.String tagName,
                             IPanelExtraData data)
Create a new composite. Initializes contents based on passed a URI, tag and name. These could be the default tag name / uri, the existing ones, or the first in the list, etc.. Data can be null.

Parameters:
parent - the parent of the ComplexPanelComposite
style - the bitwise OR'd (|) style for the Composite
uri - the namespace URI for the tag being represented
tagName - the tag name of the panel that is to be displayed
data - extra data which may be needed to initialize the panel
See Also:
updatePanel(String, String)
Method Detail

getNamespaceUri

public java.lang.String getNamespaceUri()
Returns the namespace URI for the tag whose information is currently displayed

Returns:
a namespace uri

getTagName

public java.lang.String getTagName()
Returns the XML tag local name for the tag whose information is currently displayed

Returns:
a tag name

getContextId

public java.lang.String getContextId()
Returns the context id for the tag that is currently being displayed.

Returns:
the context id for the current UI

setContextId

public void setContextId(java.lang.String id)
Sets the context id. This id must correspond to the ID defined via the panels extension point. May be null.

Parameters:
id -

getContextHelpId

public java.lang.String getContextHelpId()
Returns the context help id for the tag that is currently being displayed.

Returns:
the context help id for the current UI, may be null.

setContextHelpId

public void setContextHelpId(java.lang.String id)
Sets the context help id. May be null.

Parameters:
id -

createContents

public void createContents()
Creates the panel contents. Queries the panel registry - if a panel is not found, renders the object inspector. If no uri/tag name are set, nothing is rendered.


updatePanelData

public void updatePanelData(IPanelExtraData data)
Updates the IPenelExtraData used by the ComplexComposite. MUST be called before calling createContents()!

Parameters:
data - extra data used to initialize the panel

updatePanel

public void updatePanel(java.lang.String uri,
                        java.lang.String tagName)
Called to instruct the panel to update it's contents based on the new uri and tagname. Disposes old contents, and calls create contents.

Parameters:
uri - the uri of the new tag
tagName - the tag name of the new tag

getCurrentPanel

public IComplexPanel getCurrentPanel()
Return the panel generated within the current ComplexPanelComposite. Can be null.

Returns:
a complex panel

getObjectInspector

public com.ibm.designer.domino.xsp.internal.controls.XFacesPropertyTree getObjectInspector()
Returns the All Properties tree for the given tag, may be null.

Returns: