|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Composite com.ibm.commons.swt.data.layouts.PropLayout com.ibm.commons.swt.data.layouts.PropLayout2 com.ibm.commons.swt.data.layouts.PropLayoutGroupBox com.ibm.commons.swt.data.layouts.BasicsPanel com.ibm.designer.ide.xsp.components.api.panels.XSPBasicsPanel
public class XSPBasicsPanel
A panel that dynamically builds its contents based on what is available in the FacesRegistry for the
selected control.
By default this panel will lay out its controls in two distinct columns. This panel is used by the
VAST majority of XPage controls for their basics panel. It is highly recommended to reuse this panel
if possible.
PropLayoutGroupBox
Field Summary | |
---|---|
protected DataNodeAdapter |
_listener
|
protected java.util.Map<org.eclipse.swt.widgets.Control,java.lang.String> |
controlTooltipMap
|
Fields inherited from class com.ibm.commons.swt.data.layouts.BasicsPanel |
---|
NAME_REGEX |
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 | |
---|---|
XSPBasicsPanel(org.eclipse.swt.widgets.Composite parent,
int style)
Constructs a new instance of the class given the parent Composite, and style flags which are used to set the look/behavior of the control. |
Method Summary | |
---|---|
protected void |
cacheToolTip(org.eclipse.swt.widgets.Control control,
java.lang.String tooltip)
Should be overridden by subclasses who need to keep track of tooltips for some reason, e.g. |
protected void |
checkComputed(org.eclipse.swt.widgets.Label label,
DataNode node)
Checks if a label should be computed/visible based on presence of the style attribute. |
void |
createContents()
Called to create the panel's contents. |
protected com.ibm.commons.css.FormatBean |
createFormatBean(DataNode node)
Can be overriden by subclass to provider thier own format bean implementation. |
protected java.lang.String |
getAcceleratorAttr()
Returns the attribute name of the Accelerator attribute. |
protected java.lang.String |
getBidiAttr()
Returns the attribute name of the Bidi attribute. |
protected StringLookup |
getBidiTypesLookup()
Returns a StringLookup that is to be used to populate the Bidi field. |
protected java.lang.String |
getEnabledAttr()
Returns the attribute name of the Enabled attribute. |
protected IPanelExtraData |
getExtraData()
Returns the IPanelExtraData object associated with this panel. |
protected java.util.List |
getHeightUnits()
|
protected ILookup |
getIdLookup()
Returns a lookup that contains the IDs of all of the controls on the current XPage. |
protected java.lang.String |
getLabelToolTipText(java.lang.String propName)
Should be overridden by subclasses to return an appropriate tool tip for the given property name. |
protected java.lang.String |
getNameAttr()
Returns the attribute name for the Name field (normally 'id'). |
protected IValidator |
getNameValidator()
Returns a validator to be used with the Name field. |
protected java.lang.String |
getReadOnlyAttr()
Returns the attribute name of the Read-Only attribute. |
protected java.lang.String |
getShowReadOnlyAsDisabledAttr()
Returns the attribute name of the Show Read Only As Disabled attribute. |
protected java.lang.String |
getStyleAttribute()
Returns the name of the style attribte. |
protected java.lang.String |
getTabOrderAttr()
Returns the attribute name of the Tab Order attribute. |
protected java.lang.String |
getValueAttr()
Returns the attribute name of the Value attribute. |
protected java.lang.String |
getVisibleAttr()
Returns the attribute name of the Visible attribute. |
protected java.util.List |
getWidthUnits()
|
protected boolean |
hasAccelerator()
Returns true if the panel should have an Accelerator field. |
protected boolean |
hasBidi()
Returns true if the panel should have a Bidi field. |
protected boolean |
hasEnabled()
Returns true if the panel should have an Enabled field. |
protected boolean |
hasField(java.lang.String fieldName)
Determines whether or not the current control has a particular attribute. |
protected boolean |
hasHeight()
Returns true if the panel should have a Height field. |
protected boolean |
hasName()
Returns true if the panel should have a Name field. |
protected boolean |
hasReadOnly()
Returns true if the panel should have a Read-Only field. |
protected boolean |
hasShowReadOnlyAsDisabled()
Returns true if the panel should have a Show Read Only As Disabled field. |
protected boolean |
hasTabOrder()
Returns true if the panel should have a Tab Order field. |
protected boolean |
hasValue()
Returns true if the panel should have a Value field. |
protected boolean |
hasVisible()
Returns true if the panel should have a Visible field. |
protected boolean |
hasWidth()
Returns true if the panel should have a Width field. |
protected void |
initPropertyEditor(PropertyEditor propertyEditor,
java.lang.String attrName)
Utility method which is used to initialize a property editor so that it may be used in the context of the current properties panel. |
void |
setExtraData(IPanelExtraData data)
Sets the extra panel data on the current panel. |
protected boolean |
showTooltips()
Should be overridden by subclasses who need to show tooltips conditionally (e.g. |
protected void |
toggleControls(java.lang.String attribute,
boolean val)
For internal use.. |
protected void |
toggleHeightAndWidth(boolean val)
|
protected boolean |
usesStyleForHeightWidth()
Determines if the height and width should be set via the style property. |
Methods inherited from class com.ibm.commons.swt.data.layouts.BasicsPanel |
---|
createAccelerator, createAutomatedSection, createBidi, createEnabled, createHeightAndWidth, createLeftContents, createName, createPostSection, createPreSection, createReadOnly, createRightContents, createShowReadOnlyAsDisabled, createTabOrder, createValue, createVisible, getAcceleratorValidator, getContextHelpId, getEnabledDefaultValue, getNumLeftColumns, getReadOnlyDefaultValue, getTabOrderValidator, getVisibleDefaultValue, hasGroupBox |
Methods inherited from class com.ibm.commons.swt.data.layouts.PropLayoutGroupBox |
---|
createGroupBoxContents, getGroupTitle, getNumGroupBoxColumns, getNumRightColumns |
Methods inherited from class com.ibm.commons.swt.data.layouts.PropLayout2 |
---|
createChildComposites, createColumnGridData, getNumParentColumns, isFirstColumnUsed, isSecondColumnUsed |
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 |
Field Detail |
---|
protected DataNodeAdapter _listener
protected java.util.Map<org.eclipse.swt.widgets.Control,java.lang.String> controlTooltipMap
Constructor Detail |
---|
public XSPBasicsPanel(org.eclipse.swt.widgets.Composite parent, int style)
#getNumChildColumns()
.
parent
- a Composite control which will be the parent of the new instance (CANNOT be null).style
- the style of control to constructMethod Detail |
---|
protected void checkComputed(org.eclipse.swt.widgets.Label label, DataNode node)
label
- node
- public void createContents()
PropLayout2
createContents
in class PropLayout2
protected com.ibm.commons.css.FormatBean createFormatBean(DataNode node)
PropLayout
createFormatBean
in class PropLayout
node
- The DataNode associated with the current model
FormatBean
protected java.lang.String getAcceleratorAttr()
BasicsPanel
getAcceleratorAttr
in class BasicsPanel
protected java.lang.String getBidiAttr()
BasicsPanel
getBidiAttr
in class BasicsPanel
protected StringLookup getBidiTypesLookup()
BasicsPanel
getBidiTypesLookup
in class BasicsPanel
protected java.lang.String getEnabledAttr()
BasicsPanel
getEnabledAttr
in class BasicsPanel
protected java.lang.String getShowReadOnlyAsDisabledAttr()
BasicsPanel
getShowReadOnlyAsDisabledAttr
in class BasicsPanel
protected IPanelExtraData getExtraData()
protected java.util.List getHeightUnits()
getHeightUnits
in class BasicsPanel
protected ILookup getIdLookup()
protected java.lang.String getNameAttr()
BasicsPanel
getNameAttr
in class BasicsPanel
protected IValidator getNameValidator()
BasicsPanel
getNameValidator
in class BasicsPanel
protected java.lang.String getReadOnlyAttr()
BasicsPanel
getReadOnlyAttr
in class BasicsPanel
protected java.lang.String getTabOrderAttr()
BasicsPanel
getTabOrderAttr
in class BasicsPanel
protected java.lang.String getValueAttr()
BasicsPanel
getValueAttr
in class BasicsPanel
protected java.lang.String getVisibleAttr()
BasicsPanel
getVisibleAttr
in class BasicsPanel
protected java.util.List getWidthUnits()
getWidthUnits
in class BasicsPanel
protected boolean hasAccelerator()
BasicsPanel
hasAccelerator
in class BasicsPanel
protected boolean hasBidi()
BasicsPanel
hasBidi
in class BasicsPanel
protected boolean hasEnabled()
BasicsPanel
hasEnabled
in class BasicsPanel
protected boolean hasField(java.lang.String fieldName)
fieldName
- the field being tested for
protected boolean hasHeight()
BasicsPanel
hasHeight
in class BasicsPanel
protected boolean hasName()
BasicsPanel
hasName
in class BasicsPanel
protected boolean hasReadOnly()
BasicsPanel
hasReadOnly
in class BasicsPanel
protected boolean hasTabOrder()
BasicsPanel
hasTabOrder
in class BasicsPanel
protected boolean hasValue()
BasicsPanel
hasValue
in class BasicsPanel
protected boolean hasVisible()
BasicsPanel
hasVisible
in class BasicsPanel
protected boolean hasWidth()
BasicsPanel
hasWidth
in class BasicsPanel
protected boolean hasShowReadOnlyAsDisabled()
BasicsPanel
hasShowReadOnlyAsDisabled
in class BasicsPanel
protected void initPropertyEditor(PropertyEditor propertyEditor, java.lang.String attrName)
propertyEditor
- the property editor that is to be initializedattrName
- the attribute that the property editor is to editpublic void setExtraData(IPanelExtraData data)
IPanelDataReciever
setExtraData
in interface IPanelDataReciever
data
- extra data which might be needed when creating a properties panelprotected void toggleControls(java.lang.String attribute, boolean val)
attribute
- val
- protected void toggleHeightAndWidth(boolean val)
val
- protected boolean usesStyleForHeightWidth()
protected java.lang.String getLabelToolTipText(java.lang.String propName)
PropLayout
getLabelToolTipText
in class PropLayout
propName
- the name of the property whose tooltip is sought
protected boolean showTooltips()
PropLayout
showTooltips
in class PropLayout
protected void cacheToolTip(org.eclipse.swt.widgets.Control control, java.lang.String tooltip)
PropLayout
cacheToolTip
in class PropLayout
control
- the control whose tooltip is providedtooltip
- the tooltip textprotected java.lang.String getStyleAttribute()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |