Fixed #336 (FeatureBrowser: Javadoc tabs are empty) svn changeset:618/svn branch:toolkittags/6.7.0.beta1
protected PropertyPanel propertyPanel; | protected PropertyPanel propertyPanel; | ||||
private Label javadoc; | |||||
/** Constuctor for the feature component */ | /** Constuctor for the feature component */ | ||||
public Feature() { | public Feature() { | ||||
layout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL); | layout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL); | ||||
setCompositionRoot(layout); | setCompositionRoot(layout); | ||||
} | } | ||||
/** | |||||
* Actual URL consists of "/doc/api/com/itmill/toolkit/"+url | |||||
* @param url | |||||
*/ | |||||
public void setJavadocURL(String url) { | |||||
javadoc.setValue("<iframe width=\"100%\" src=\"/doc/api/com/itmill/toolkit/"+url+"\"></iframe>"); | |||||
} | |||||
/** | /** | ||||
* Feature component initialization is lazily done when the feature is | * Feature component initialization is lazily done when the feature is | ||||
if (initialized) | if (initialized) | ||||
return; | return; | ||||
initialized = true; | initialized = true; | ||||
// Javadoc | |||||
javadoc = new Label(); | |||||
javadoc.setContentMode(Label.CONTENT_RAW); | |||||
// Demo | // Demo | ||||
Component demo = getDemoComponent(); | Component demo = getDemoComponent(); | ||||
ts = new TabSheet(); | ts = new TabSheet(); | ||||
layout.addComponent(ts); | layout.addComponent(ts); | ||||
// Description | |||||
// Description tab | |||||
String desc = getDescriptionXHTML(); | String desc = getDescriptionXHTML(); | ||||
String title = getTitle(); | String title = getTitle(); | ||||
if (desc != null && title != null) { | if (desc != null && title != null) { | ||||
ts.addTab(gl, "Description", null); | ts.addTab(gl, "Description", null); | ||||
} | } | ||||
// Code Sample | |||||
// Code Sample tab | |||||
String example = getExampleSrc(); | String example = getExampleSrc(); | ||||
if (example != null) { | if (example != null) { | ||||
OrderedLayout l = new OrderedLayout(); | OrderedLayout l = new OrderedLayout(); | ||||
l.addComponent(new Label(example, Label.CONTENT_PREFORMATTED)); | l.addComponent(new Label(example, Label.CONTENT_PREFORMATTED)); | ||||
ts.addTab(l, "Code Sample", null); | ts.addTab(l, "Code Sample", null); | ||||
} | } | ||||
// Javadoc | |||||
Label javadocPlaceholder = new Label( | |||||
"This is a placeholder for Javadoc"); | |||||
ts.addTab(javadocPlaceholder, "Javadoc", null); | |||||
// Javadoc tab | |||||
ts.addTab(javadoc, "Javadoc", null); | |||||
// Properties tab | // Properties tab | ||||
// if (properties != null) | // if (properties != null) |
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("data/Buffered.html"); | |||||
return l; | return l; | ||||
} | } | ||||
.createBeanPropertySet(new String[] { "switchMode" }); | .createBeanPropertySet(new String[] { "switchMode" }); | ||||
propertyPanel.addProperties("Button Properties", ap); | propertyPanel.addProperties("Button Properties", ap); | ||||
setJavadocURL("ui/Button.html"); | |||||
return l; | return l; | ||||
} | } | ||||
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("data/Container.html"); | |||||
return l; | return l; | ||||
} | } | ||||
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("ui/CustomLayout.html"); | |||||
return l; | return l; | ||||
} | } |
themes.addItem("calendar").getItemProperty( | themes.addItem("calendar").getItemProperty( | ||||
themes.getItemCaptionPropertyId()).setValue("calendar"); | themes.getItemCaptionPropertyId()).setValue("calendar"); | ||||
propertyPanel.addProperties("DateField Properties", ap); | propertyPanel.addProperties("DateField Properties", ap); | ||||
setJavadocURL("ui/DateField"); | |||||
return l; | return l; | ||||
} | } |
.setDescription( | .setDescription( | ||||
"Unique object id. This can be used for example to identify windows components."); | "Unique object id. This can be used for example to identify windows components."); | ||||
setJavadocURL("ui/Embedded.html"); | |||||
return l; | return l; | ||||
} | } | ||||
demo = new OrderedLayout(); | demo = new OrderedLayout(); | ||||
createDemo(); | createDemo(); | ||||
} | } | ||||
setJavadocURL("ui/Form.html"); | |||||
return demo; | return demo; | ||||
} | } |
"None", "Minimal" }); | "None", "Minimal" }); | ||||
propertyPanel.addProperties("FrameWindow Properties", ap); | propertyPanel.addProperties("FrameWindow Properties", ap); | ||||
setJavadocURL("ui/FrameWindow.html"); | |||||
return l; | return l; | ||||
} | } |
propertyPanel.addProperties("GridLayout Features", ap); | propertyPanel.addProperties("GridLayout Features", ap); | ||||
propertyPanel.getField("height").dependsOn( | propertyPanel.getField("height").dependsOn( | ||||
propertyPanel.getField("add component")); | propertyPanel.getField("add component")); | ||||
setJavadocURL("ui/GridLayout.html"); | |||||
return l; | return l; | ||||
} | } |
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("data/Items.html"); | |||||
return l; | return l; | ||||
} | } | ||||
"XML (Subtree with namespace)" }); | "XML (Subtree with namespace)" }); | ||||
propertyPanel.addProperties("Label Properties", ap); | propertyPanel.addProperties("Label Properties", ap); | ||||
setJavadocURL("ui/Label.html"); | |||||
return l; | return l; | ||||
} | } | ||||
"Default", "Minimal", "None" }); | "Default", "Minimal", "None" }); | ||||
propertyPanel.addProperties("Link Properties", ap); | propertyPanel.addProperties("Link Properties", ap); | ||||
setJavadocURL("ui/Link.html"); | |||||
return l; | return l; | ||||
} | } | ||||
themes.getItemCaptionPropertyId()).setValue("form"); | themes.getItemCaptionPropertyId()).setValue("form"); | ||||
propertyPanel.addProperties("OrderedLayout Properties", ap); | propertyPanel.addProperties("OrderedLayout Properties", ap); | ||||
setJavadocURL("ui/OrderedLayout.html"); | |||||
return l; | return l; | ||||
} | } | ||||
themes.getItemCaptionPropertyId()).setValue("strong"); | themes.getItemCaptionPropertyId()).setValue("strong"); | ||||
propertyPanel.addProperties("Panel Properties", ap); | propertyPanel.addProperties("Panel Properties", ap); | ||||
setJavadocURL("ui/Panel.html"); | |||||
return l; | return l; | ||||
} | } | ||||
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("ui/package-summary.html"); | |||||
return l; | return l; | ||||
} | } | ||||
themes.getItemCaptionPropertyId()).setValue("optiongroup"); | themes.getItemCaptionPropertyId()).setValue("optiongroup"); | ||||
themes.addItem("twincol").getItemProperty( | themes.addItem("twincol").getItemProperty( | ||||
themes.getItemCaptionPropertyId()).setValue("twincol"); | themes.getItemCaptionPropertyId()).setValue("twincol"); | ||||
setJavadocURL("ui/Select.html"); | |||||
return l; | return l; | ||||
} | } |
// Properties | // Properties | ||||
propertyPanel = new PropertyPanel(ts); | propertyPanel = new PropertyPanel(ts); | ||||
setJavadocURL("ui/TabSheet.html"); | |||||
return l; | return l; | ||||
} | } |
import com.itmill.toolkit.ui.Button; | import com.itmill.toolkit.ui.Button; | ||||
import com.itmill.toolkit.ui.Component; | import com.itmill.toolkit.ui.Component; | ||||
import com.itmill.toolkit.ui.Form; | import com.itmill.toolkit.ui.Form; | ||||
import com.itmill.toolkit.ui.Label; | |||||
import com.itmill.toolkit.ui.OrderedLayout; | import com.itmill.toolkit.ui.OrderedLayout; | ||||
import com.itmill.toolkit.ui.Select; | import com.itmill.toolkit.ui.Select; | ||||
import com.itmill.toolkit.ui.Table; | import com.itmill.toolkit.ui.Table; | ||||
t.setColumnReorderingAllowed(true); | t.setColumnReorderingAllowed(true); | ||||
t.setSelectable(true); | t.setSelectable(true); | ||||
setJavadocURL("ui/Table.html"); | |||||
return l; | return l; | ||||
} | } | ||||
"rows", "wordwrap", "writeThrough", "readThrough", | "rows", "wordwrap", "writeThrough", "readThrough", | ||||
"nullRepresentation", "nullSettingAllowed", "secret" }); | "nullRepresentation", "nullSettingAllowed", "secret" }); | ||||
propertyPanel.addProperties("Text field properties", f); | propertyPanel.addProperties("Text field properties", f); | ||||
setJavadocURL("ui/TextField.html"); | |||||
return l; | return l; | ||||
} | } | ||||
themes.addItem("menu").getItemProperty( | themes.addItem("menu").getItemProperty( | ||||
themes.getItemCaptionPropertyId()).setValue("menu"); | themes.getItemCaptionPropertyId()).setValue("menu"); | ||||
propertyPanel.addProperties("Tree Properties", ap); | propertyPanel.addProperties("Tree Properties", ap); | ||||
setJavadocURL("ui/Tree.html"); | |||||
return l; | return l; | ||||
} | } | ||||
// Properties | // Properties | ||||
propertyPanel = new PropertyPanel(up); | propertyPanel = new PropertyPanel(up); | ||||
setJavadocURL("ui/Upload.html"); | |||||
return l; | return l; | ||||
} | } |
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("data/Validator.html"); | |||||
return l; | return l; | ||||
} | } | ||||
new Integer(Window.BORDER_MINIMAL) }, new Object[] { "Default", | new Integer(Window.BORDER_MINIMAL) }, new Object[] { "Default", | ||||
"None", "Minimal" }); | "None", "Minimal" }); | ||||
propertyPanel.addProperties("Window Properties", windowProperties); | propertyPanel.addProperties("Window Properties", windowProperties); | ||||
setJavadocURL("ui/Window.html"); | |||||
return l; | return l; | ||||
} | } | ||||
Label lab = new Label(); | Label lab = new Label(); | ||||
lab.setStyle("featurebrowser-none"); | lab.setStyle("featurebrowser-none"); | ||||
l.addComponent(lab); | l.addComponent(lab); | ||||
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("ui/package-summary.html"); | |||||
return l; | return l; | ||||
} | } | ||||
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("ui/package-summary.html"); | |||||
return l; | return l; | ||||
} | } | ||||
// Properties | // Properties | ||||
propertyPanel = null; | propertyPanel = null; | ||||
setJavadocURL("package-summary.html"); | |||||
return l; | return l; | ||||
} | } | ||||