|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.javacore.internalapi; import java.util.EventObject; /** Progress event object. * * @author Martin Matula */ public class ProgressEvent extends EventObject { /** Start event id */ public static final int START = 1; /** Step event id */ public static final int STEP = 2; /** Stop event id */ public static final int STOP = 4; // event id private final int eventId; // type of opreation that is being processed (source-specific number) private final int operationType; // number of steps of the operation being processed private final int count; /** Creates ProgressEvent instance. * @param source Source of the event. * @param eventId ID of the event. */ public ProgressEvent(Object source, int eventId) { this(source, eventId, 0, 0); } /** Creates ProgressEvent instance. * @param source Source of the event. * @param eventId ID of the event. * @param operationType Source-specific number identifying source operation that * is being processed. * @param count Number of steps that the processed opration consists of. */ public ProgressEvent(Object source, int eventId, int operationType, int count) { super(source); this.eventId = eventId; this.operationType = operationType; this.count = count; } /** Returns ID of the event. * @return ID of the event. */ public int getEventId() { return eventId; } /** Returns operation type. * @return Source-specific number identifying operation being processed. Needs to * be valid for START events, can be 0 for STEP and STOP events. */ public int getOperationType() { return operationType; } /** Returns step count. * @return Number of step that the operation being processed consists of. Needs to * be valid for START events, can be 0 for STEP and STOP events. If it is not 0 * for STEP events, it is a new progress. */ public int getCount() { return count; } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.