1 19 20 package org.netbeans.api.progress.aggregate; 21 22 import javax.swing.Action ; 23 import javax.swing.JComponent ; 24 import javax.swing.JLabel ; 25 import org.openide.util.Cancellable; 26 27 33 public final class AggregateProgressFactory { 34 35 36 private AggregateProgressFactory() { 37 } 38 39 51 public static AggregateProgressHandle createHandle(String displayName, ProgressContributor[] contributors, 52 Cancellable allowToCancel, Action linkOutput) { 53 return new AggregateProgressHandle(displayName, contributors, allowToCancel, linkOutput, false); 54 } 55 56 public static ProgressContributor createProgressContributor(String trackingId) { 57 return new ProgressContributor(trackingId); 58 } 59 60 72 public static AggregateProgressHandle createSystemHandle(String displayName, ProgressContributor[] contributors, 73 Cancellable allowToCancel, Action linkOutput) { 74 return new AggregateProgressHandle(displayName, contributors, allowToCancel, linkOutput, true); 75 } 76 77 83 public static JComponent createProgressComponent(AggregateProgressHandle handle) { 84 return handle.extractComponent(); 85 } 86 87 93 public static JLabel createMainLabelComponent(AggregateProgressHandle handle) { 94 return handle.extractMainLabel(); 95 } 96 97 103 public static JLabel createDetailLabelComponent(AggregateProgressHandle handle) { 104 return handle.extractDetailLabel(); 105 } 106 107 } 108 | Popular Tags |