Annotate in Java"

From Documentation
m (remove empty version history (via JWB))
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{ZKDevelopersReferencePageHeader}}
 
{{ZKDevelopersReferencePageHeader}}
  
You could annotate a component in Java by use of <javadoc method="addAnnotation(java.lang.String, java.util.Map)" type="interface">org.zkoss.zk.ui.sys.ComponentCtrl</javadoc>, and annotate a property by <javadoc method="addAnnotation(java.lang.String, java.lang.String, java.util.Map)" type="interface">org.zkoss.zk.ui.sys.ComponentCtrl</javadoc>.
+
You could annotate a component or a property in Java by the use of <javadoc method="addAnnotation(java.lang.String, java.lang.String, java.util.Map)" type="interface">org.zkoss.zk.ui.sys.ComponentCtrl</javadoc>.
  
 
For example,
 
For example,
 
<source lang="java" >
 
<source lang="java" >
 
Listbox listbox = new Listbox();
 
Listbox listbox = new Listbox();
listbox.addAnnotation("foo", null); //annotate listbox
+
listbox.addAnnotation(null, "foo", null); //null in the first argument means to annotate listbox
 
Label label = new Label();
 
Label label = new Label();
 
label.addAnnotation("value", "fun", null); //annotate the value property of label
 
label.addAnnotation("value", "fun", null); //annotate the value property of label
 
</source>
 
</source>
  
=Version History=
+
 
{{LastUpdated}}
 
{| border='1px' | width="100%"
 
! Version !! Date !! Content
 
|-
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
|}
 
  
 
{{ZKDevelopersReferencePageFooter}}
 
{{ZKDevelopersReferencePageFooter}}

Latest revision as of 04:32, 5 February 2024


Annotate in Java


You could annotate a component or a property in Java by the use of ComponentCtrl.addAnnotation(String, String, Map).

For example,

Listbox listbox = new Listbox();
listbox.addAnnotation(null, "foo", null); //null in the first argument means to annotate listbox
Label label = new Label();
label.addAnnotation("value", "fun", null); //annotate the value property of label




Last Update : 2024/02/05

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.