Java Doc for Label.java in  » Web-Framework » Millstone » org » millstone » base » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » Millstone » org.millstone.base.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.millstone.base.ui.AbstractComponent
      org.millstone.base.ui.Label

Label
public class Label extends AbstractComponent implements Property,Property.Viewer,Property.ValueChangeListener,Property.ValueChangeNotifier,Comparable(Code)
Label component for showing non-editable short texts. The label content can be set to the modes specified by the final members CONTENT_*

The contents of the label may contain simple formatting:

  • <b> Bold
  • <i> Italic
  • <u> Underlined
  • <br/> Linebreak
  • <ul><li>item 1</li><li>item 2</li></ul> List of items
The b,i,u and li tags can contain all the tags in the list recursively.


author:
   IT Mill Ltd.
version:
   3.1.1
since:
   3.0

Inner Class :public class ValueChangeEvent extends Component.Event implements Property.ValueChangeEvent

Field Summary
final public static  intCONTENT_DEFAULT
    
final public static  intCONTENT_PREFORMATTED
     Content mode, where the label contains preformatted text.
final public static  intCONTENT_RAW
     Content mode, where the label contains RAW output.
final public static  intCONTENT_TEXT
     Content mode, where the label contains only plain text.
final public static  intCONTENT_UIDL
     Formatted content mode, where the contents is XML restricted to the UIDL 1.0 formatting markups.
final public static  intCONTENT_XHTML
     Content mode, where the label contains XHTML.
final public static  intCONTENT_XML
     Content mode, where the label contains well-formed or well-balanced XML.

Constructor Summary
public  Label()
     Creates an empty Label.
public  Label(String content)
     Creates a new instance of Label with text-contents.
public  Label(Property contentSource)
     Creates a new instance of Label with text-contents read from given datasource.
public  Label(String content, int contentMode)
     Creates a new instance of Label with text-contents.
public  Label(Property contentSource, int contentMode)
     Creates a new instance of Label with text-contents read from given datasource.

Method Summary
public  voidaddListener(Property.ValueChangeListener listener)
    
public  intcompareTo(Object other)
     Compare Label to other objects.
protected  voidfireValueChange()
     Emit options change event.
public  intgetContentMode()
     Get the content mode of the Label.

Possible content modes include:

  • CONTENT_TEXT Content mode, where the label contains only plain text.
public  PropertygetPropertyDataSource()
     Get viewing data-source property.
public  StringgetTag()
     Get component UIDL tag.
public  ClassgetType()
    
public  ObjectgetValue()
     Get the value of the label.
public  booleanisReadOnly()
     Is the component read-only ? Readonly is not used in label - this returns allways false.
public  voidpaintContent(PaintTarget target)
     Paint the content of this component.
public  voidremoveListener(Property.ValueChangeListener listener)
    
public  voidsetContentMode(int contentMode)
     Set the content mode of the Label.

Possible content modes include:

  • CONTENT_TEXT Content mode, where the label contains only plain text.
public  voidsetPropertyDataSource(Property newDataSource)
     Set the property as data-source for viewing.
public  voidsetReadOnly(boolean readOnly)
     Set the component to read-only.
public  voidsetValue(Object newValue)
     Set the value of the label.
public  StringtoString()
    
public  voidvalueChange(Property.ValueChangeEvent event)
     Listen value change events from data source.

Field Detail
CONTENT_DEFAULT
final public static int CONTENT_DEFAULT(Code)
The default content mode is plain text



CONTENT_PREFORMATTED
final public static int CONTENT_PREFORMATTED(Code)
Content mode, where the label contains preformatted text.



CONTENT_RAW
final public static int CONTENT_RAW(Code)
Content mode, where the label contains RAW output. Output is not required to comply to with XML. In Web Adapter output is inserted inside the resulting HTML document as-is. This is useful for some specific purposes where possibly broken HTML content needs to be shown, but in most cases XHTML mode should be preferred.



CONTENT_TEXT
final public static int CONTENT_TEXT(Code)
Content mode, where the label contains only plain text. The getValue() result is coded to XML when painting.



CONTENT_UIDL
final public static int CONTENT_UIDL(Code)
Formatted content mode, where the contents is XML restricted to the UIDL 1.0 formatting markups.



CONTENT_XHTML
final public static int CONTENT_XHTML(Code)
Content mode, where the label contains XHTML. Contents is then enclosed in DIV elements having namespace of "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd".



CONTENT_XML
final public static int CONTENT_XML(Code)
Content mode, where the label contains well-formed or well-balanced XML. Each of the root elements must have their default namespace specified.




Constructor Detail
Label
public Label()(Code)
Creates an empty Label.



Label
public Label(String content)(Code)
Creates a new instance of Label with text-contents.



Label
public Label(Property contentSource)(Code)
Creates a new instance of Label with text-contents read from given datasource.



Label
public Label(String content, int contentMode)(Code)
Creates a new instance of Label with text-contents.



Label
public Label(Property contentSource, int contentMode)(Code)
Creates a new instance of Label with text-contents read from given datasource.




Method Detail
addListener
public void addListener(Property.ValueChangeListener listener)(Code)
Add value change listener
Parameters:
  listener - Listener to be added.



compareTo
public int compareTo(Object other)(Code)
Compare Label to other objects.

Labels can be compared to other labels for sorting label contents. This is especially handy for sorting table columns.

In RAW, PREFORMATTED and TEXT modes, the label contents are compared as is. In XML, UIDL and XHTML modes, only CDATA is compared and tags ignored. If the other object is not a Label, its toString() return value is used in comparison.


See Also:   java.lang.Comparable.compareTo(java.lang.Object)
Parameters:
  other - Other object to compare to a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.



fireValueChange
protected void fireValueChange()(Code)
Emit options change event.



getContentMode
public int getContentMode()(Code)
Get the content mode of the Label.

Possible content modes include:

  • CONTENT_TEXT Content mode, where the label contains only plain text. The getValue() result is coded to XML when painting.
  • CONTENT_PREFORMATTED Content mode, where the label contains preformatted text.
  • CONTENT_UIDL Formatted content mode, where the contents is XML restricted to the UIDL 1.0 formatting markups.
  • CONTENT_XHTML Content mode, where the label contains XHTML. Contents is then enclosed in DIV elements having namespace of "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd".
  • CONTENT_XML Content mode, where the label contains well-formed or well-balanced XML. Each of the root elements must have their default namespace specified.
  • CONTENT_RAW Content mode, where the label contains RAW output. Output is not required to comply to with XML. In Web Adapter output is inserted inside the resulting HTML document as-is. This is useful for some specific purposes where possibly broken HTML content needs to be shown, but in most cases XHTML mode should be preferred.

Content mode of the label.



getPropertyDataSource
public Property getPropertyDataSource()(Code)
Get viewing data-source property.



getTag
public String getTag()(Code)
Get component UIDL tag. Component UIDL tag as string.



getType
public Class getType()(Code)



getValue
public Object getValue()(Code)
Get the value of the label. Value of the label is the XML contents of the label. Value of the label



isReadOnly
public boolean isReadOnly()(Code)
Is the component read-only ? Readonly is not used in label - this returns allways false. True iff the component is in read only mode



paintContent
public void paintContent(PaintTarget target) throws PaintException(Code)
Paint the content of this component.
Parameters:
  event - PaintEvent.



removeListener
public void removeListener(Property.ValueChangeListener listener)(Code)
Remove value change listener
Parameters:
  listener - Listener to be removed.



setContentMode
public void setContentMode(int contentMode)(Code)
Set the content mode of the Label.

Possible content modes include:

  • CONTENT_TEXT Content mode, where the label contains only plain text. The getValue() result is coded to XML when painting.
  • CONTENT_PREFORMATTED Content mode, where the label contains preformatted text.
  • CONTENT_UIDL Formatted content mode, where the contents is XML restricted to the UIDL 1.0 formatting markups.
  • CONTENT_XHTML Content mode, where the label contains XHTML. Contents is then enclosed in DIV elements having namespace of "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd".
  • CONTENT_XML Content mode, where the label contains well-formed or well-balanced XML. Each of the root elements must have their default namespace specified.
  • CONTENT_RAW Content mode, where the label contains RAW output. Output is not required to comply to with XML. In Web Adapter output is inserted inside the resulting HTML document as-is. This is useful for some specific purposes where possibly broken HTML content needs to be shown, but in most cases XHTML mode should be preferred.


Parameters:
  contentMode - New content mode of the label.



setPropertyDataSource
public void setPropertyDataSource(Property newDataSource)(Code)
Set the property as data-source for viewing.



setReadOnly
public void setReadOnly(boolean readOnly)(Code)
Set the component to read-only. Readonly is not used in label.
Parameters:
  readOnly - True to enable read-only mode, False to disable it



setValue
public void setValue(Object newValue)(Code)
Set the value of the label. Value of the label is the XML contents of the label.
Parameters:
  newValue - New value of the label



toString
public String toString()(Code)



valueChange
public void valueChange(Property.ValueChangeEvent event)(Code)
Listen value change events from data source.
See Also:   org.millstone.base.data.Property.ValueChangeListener.valueChange(Property.ValueChangeEvent)



Methods inherited from org.millstone.base.ui.AbstractComponent
public void addListener(RepaintRequestListener listener)(Code)(Java Doc)
public void addListener(Class eventType, Object object, Method method)(Code)(Java Doc)
public void addListener(Class eventType, Object object, String methodName)(Code)(Java Doc)
public void addListener(Component.Listener listener)(Code)(Java Doc)
public void attach()(Code)(Java Doc)
public void changeVariables(Object source, Map variables)(Code)(Java Doc)
public void childRequestedRepaint(Collection alreadyNotified)(Code)(Java Doc)
public void dependsOn(VariableOwner depended)(Code)(Java Doc)
public void detach()(Code)(Java Doc)
protected void fireComponentErrorEvent()(Code)(Java Doc)
protected void fireComponentEvent()(Code)(Java Doc)
protected void fireEvent(Component.Event event)(Code)(Java Doc)
public Application getApplication()(Code)(Java Doc)
public String getCaption()(Code)(Java Doc)
public ErrorMessage getComponentError()(Code)(Java Doc)
public Object getData()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public Set getDirectDependencies()(Code)(Java Doc)
public ErrorMessage getErrorMessage()(Code)(Java Doc)
public Resource getIcon()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public Component getParent()(Code)(Java Doc)
public String getStyle()(Code)(Java Doc)
abstract public String getTag()(Code)(Java Doc)
public Window getWindow()(Code)(Java Doc)
public boolean isEnabled()(Code)(Java Doc)
public boolean isImmediate()(Code)(Java Doc)
public boolean isReadOnly()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
final public void paint(PaintTarget target) throws PaintException(Code)(Java Doc)
public void paintContent(PaintTarget target) throws PaintException(Code)(Java Doc)
public void removeDirectDependency(VariableOwner depended)(Code)(Java Doc)
public void removeListener(RepaintRequestListener listener)(Code)(Java Doc)
public void removeListener(Class eventType, Object target)(Code)(Java Doc)
public void removeListener(Class eventType, Object target, Method method)(Code)(Java Doc)
public void removeListener(Class eventType, Object target, String methodName)(Code)(Java Doc)
public void removeListener(Component.Listener listener)(Code)(Java Doc)
public void requestRepaint()(Code)(Java Doc)
public void requestRepaintRequests()(Code)(Java Doc)
public void setCaption(String caption)(Code)(Java Doc)
public void setComponentError(ErrorMessage componentError)(Code)(Java Doc)
public void setData(Object data)(Code)(Java Doc)
public void setDescription(String description)(Code)(Java Doc)
public void setEnabled(boolean enabled)(Code)(Java Doc)
public void setIcon(Resource icon)(Code)(Java Doc)
public void setImmediate(boolean immediate)(Code)(Java Doc)
public void setLocale(Locale locale)(Code)(Java Doc)
public void setParent(Component parent)(Code)(Java Doc)
public void setReadOnly(boolean readOnly)(Code)(Java Doc)
public void setStyle(String style)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.