http://sourceforge.net/tracker/?func=detail&atid=955896&aid=2893097&group_id=176962 [Contribution: ZKWebUI Enhancements]
- merge isHeading and isFieldOnly support.
This commit is contained in:
parent
d85ab868e5
commit
b9b1017d9c
|
@ -426,14 +426,21 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
|
||||||
editor.setGridTab(this.getGridTab());
|
editor.setGridTab(this.getGridTab());
|
||||||
field.addPropertyChangeListener(editor);
|
field.addPropertyChangeListener(editor);
|
||||||
editors.add(editor);
|
editors.add(editor);
|
||||||
editorIds.add(editor.getComponent().getUuid());
|
editorIds.add(editor.getComponent().getUuid());
|
||||||
Div div = new Div();
|
if (field.isFieldOnly())
|
||||||
div.setAlign("right");
|
{
|
||||||
Label label = editor.getLabel();
|
row.appendChild(createSpacer());
|
||||||
div.appendChild(label);
|
}
|
||||||
if (label.getDecorator() != null)
|
else
|
||||||
div.appendChild(label.getDecorator());
|
{
|
||||||
row.appendChild(div);
|
Div div = new Div();
|
||||||
|
div.setAlign("right");
|
||||||
|
Label label = editor.getLabel();
|
||||||
|
div.appendChild(label);
|
||||||
|
if (label.getDecorator() != null)
|
||||||
|
div.appendChild(label.getDecorator());
|
||||||
|
row.appendChild(div);
|
||||||
|
}
|
||||||
row.appendChild(editor.getComponent());
|
row.appendChild(editor.getComponent());
|
||||||
if (field.isLongField()) {
|
if (field.isLongField()) {
|
||||||
row.setSpans("1,3,1");
|
row.setSpans("1,3,1");
|
||||||
|
@ -463,15 +470,29 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
|
||||||
{
|
{
|
||||||
popupMenu.addMenuListener((ContextMenuListener)editor);
|
popupMenu.addMenuListener((ContextMenuListener)editor);
|
||||||
this.appendChild(popupMenu);
|
this.appendChild(popupMenu);
|
||||||
if (popupMenu.isZoomEnabled() && editor instanceof IZoomableEditor)
|
if (!field.isFieldOnly())
|
||||||
{
|
{
|
||||||
label.setStyle("cursor: pointer; text-decoration: underline;");
|
Label label = editor.getLabel();
|
||||||
label.addEventListener(Events.ON_CLICK, new ZoomListener((IZoomableEditor) editor));
|
if (popupMenu.isZoomEnabled() && editor instanceof IZoomableEditor)
|
||||||
|
{
|
||||||
|
label.setStyle("cursor: pointer; text-decoration: underline;");
|
||||||
|
label.addEventListener(Events.ON_CLICK, new ZoomListener((IZoomableEditor) editor));
|
||||||
|
}
|
||||||
|
|
||||||
|
label.setContext(popupMenu.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
label.setContext(popupMenu.getId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (field.isHeading())
|
||||||
|
{
|
||||||
|
//display just a label if we are "heading only"
|
||||||
|
Label label = new Label(field.getHeader());
|
||||||
|
Div div = new Div();
|
||||||
|
div.setAlign("center");
|
||||||
|
row.appendChild(createSpacer());
|
||||||
|
div.appendChild(label);
|
||||||
|
row.appendChild(div);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue