Java Doc for CompositeProgress.java in  » IDE-Netbeans » nbi » org » netbeans » installer » utils » progress » 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 » IDE Netbeans » nbi » org.netbeans.installer.utils.progress 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.installer.utils.progress.Progress
      org.netbeans.installer.utils.progress.CompositeProgress

CompositeProgress
final public class CompositeProgress extends Progress implements ProgressListener(Code)
A specialized subclass of Progress which is capable having child progresses.

Each registered child has an assosiated percentage number. It is called "relative percentage" and basically means which part of the composite's total percentage does this child "own". Additionally the composite has its "own percentage", which is independent of the children.

The composite registers itself as a listener on each added child and updates its total percentage according to the children's states. It also propagates the change information to its own listeners.

The synchronization behavior of a composite progress is not completely defined, if the composite serves as the target of a synchronization link. It will behave exactly as a regular progress if it has no children, but in the other case, errors may arise if the synchronization routine attempts to set an illegal percentage, i.e. if this "attempted" percentage will conflict with the children.

An additional capability of a composite progress is its ability to fetch children's detail status whenever a child is updated. This bahaior is controlled by the synchronizeDetails flag.
author:
   Kirill Sorokin
since:
   1.0



Field Summary
final public static  StringERROR_WRONG_PERCENTAGE
     The error message which will be displayed when a user tries to set an invalid percentage either directly or via a child.
final public static  StringERROR_WRONG_PROGRESS
     The error message which will be displayed when a user tries to remove a non-existent child.

Constructor Summary
public  CompositeProgress()
     Creates a new CompositeProgress instance.
public  CompositeProgress(ProgressListener initialListener)
     Creates a new CompositeProgress instance and registers the supplied listener.

Method Summary
public  voidaddChild(Progress progress, int percentage)
     Add a new child progress to the composite.
Parameters:
  progress - The child progress to add to the composite.
Parameters:
  percentage - The child's relative percentage within the composite.
public  voidaddPercentage(int addition)
     Adds the specified amount to the core composite's percentage.
public  intgetPercentage()
     Returns the total percentage of the composite, i.e.
public  voidprogressUpdated(Progress progress)
     This method will get called by the child progresses as they change state - the composite automatically registers itself as a listener on each of the children.
public  voidremoveChild(Progress progress)
     Remove a child progress from the composite.
Parameters:
  progress - The child progress to remove from the composite.
public  voidsetCanceled(boolean canceled)
     Sets the value of the canceled property.
public  voidsetPercentage(int percentage)
     Sets the core composite's percentage.
public  voidsynchronizeDetails(boolean synchronizeDetails)
     Sets the value of the synchronizeDetails property.

Field Detail
ERROR_WRONG_PERCENTAGE
final public static String ERROR_WRONG_PERCENTAGE(Code)
The error message which will be displayed when a user tries to set an invalid percentage either directly or via a child.



ERROR_WRONG_PROGRESS
final public static String ERROR_WRONG_PROGRESS(Code)
The error message which will be displayed when a user tries to remove a non-existent child.




Constructor Detail
CompositeProgress
public CompositeProgress()(Code)
Creates a new CompositeProgress instance.



CompositeProgress
public CompositeProgress(ProgressListener initialListener)(Code)
Creates a new CompositeProgress instance and registers the supplied listener.
Parameters:
  initialListener - A progress listener to register upon progresscreation.
See Also:   CompositeProgress.CompositeProgress()




Method Detail
addChild
public void addChild(Progress progress, int percentage)(Code)
Add a new child progress to the composite.
Parameters:
  progress - The child progress to add to the composite.
Parameters:
  percentage - The child's relative percentage within the composite. {@link IllegalArgumentException} if the supplied percentage cannot beadded.



addPercentage
public void addPercentage(int addition)(Code)
Adds the specified amount to the core composite's percentage. The added amount can be either positive or negative. The percentage value will be updated only if the result of the addition is different from the current core percentage. Also the listeners are notified only is the update actually took place.
Parameters:
  addition - The amount to add to the core composite's percentage. {@IllegalArgumentException} if the supplied percentage cannot beadded.



getPercentage
public int getPercentage()(Code)
Returns the total percentage of the composite, i.e. its own percentage and sum of percentages of its child progresses (each multiplied by the relative percentage of that child). The total percentage of the composite.



progressUpdated
public void progressUpdated(Progress progress)(Code)
This method will get called by the child progresses as they change state - the composite automatically registers itself as a listener on each of the children.
Parameters:
  progress - The child progress whose state has changed.



removeChild
public void removeChild(Progress progress)(Code)
Remove a child progress from the composite.
Parameters:
  progress - The child progress to remove from the composite. {@link IllegalArgumentException} if the supplied progress is not in composite.



setCanceled
public void setCanceled(boolean canceled)(Code)
Sets the value of the canceled property. The value is updated only if the supplied value is different from the current. Also the progress listeners are notified only if the update actually took place.

If the progress is in being synchronized from another progress. The cancelled status will be propagated to the synchronization source.

Additionally this method propagates the canceled value to the child progresses.
Parameters:
  canceled - The new value for the canceled property.




setPercentage
public void setPercentage(int percentage)(Code)
Sets the core composite's percentage. The value is updated only if the supplied percentage is different from the current. Also the progress listeners are notified only if the update actually took place.
Parameters:
  percentage - The new value for the core composite's percentage. {@link IllegalArgumentException} if the supplied percentage cannot be set.



synchronizeDetails
public void synchronizeDetails(boolean synchronizeDetails)(Code)
Sets the value of the synchronizeDetails property.
Parameters:
  synchronizeDetails - The new value for thesynchronizeDetails property.



Fields inherited from org.netbeans.installer.utils.progress.Progress
final public static int COMPLETE(Code)(Java Doc)
final public static String ERROR_WRONG_PERCENTAGE(Code)(Java Doc)
final public static int START(Code)(Java Doc)
protected boolean canceled(Code)(Java Doc)
protected String detail(Code)(Java Doc)
protected int percentage(Code)(Java Doc)
protected String title(Code)(Java Doc)

Methods inherited from org.netbeans.installer.utils.progress.Progress
public void addPercentage(int addition)(Code)(Java Doc)
public void addProgressListener(ProgressListener listener)(Code)(Java Doc)
public String getDetail()(Code)(Java Doc)
public int getPercentage()(Code)(Java Doc)
public String getTitle()(Code)(Java Doc)
public boolean isCanceled()(Code)(Java Doc)
protected void notifyListeners()(Code)(Java Doc)
public void removeProgressListener(ProgressListener listener)(Code)(Java Doc)
public void reverseSynchronizeFrom(Progress progress)(Code)(Java Doc)
public void reverseSynchronizeTo(Progress progress)(Code)(Java Doc)
public void setCanceled(boolean canceled)(Code)(Java Doc)
public void setDetail(String detail)(Code)(Java Doc)
public void setPercentage(int percentage)(Code)(Java Doc)
public void setPercentage(long percentage)(Code)(Java Doc)
public void setTitle(String title)(Code)(Java Doc)
public void synchronizeFrom(Progress progress)(Code)(Java Doc)
public void synchronizeTo(Progress progress)(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.