1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 package com.sun.star.report; 24 25 /** 26 * Based on 27 * http://api.openoffice.org/docs/common/ref/com/sun/star/task/XStatusIndicator.html 28 * 29 * @author Thomas Morgner 30 */ 31 public interface JobProgressIndicator 32 { 33 34 /** 35 * Updates the progress description. 36 * 37 * @param string the new description 38 */ setText(String string)39 void setText(String string); 40 41 /** 42 * Initializes the progress indicator and sets the progress description to 43 * the text given in the parameter <code>text</code>. The progress values 44 * passed to this indicator will not exceed the given <code>maxValue</code>. 45 * The value range of this indicator is set to 0 to <code>maxValue</code> 46 * Stopped indicators must ignore that call. 47 * 48 * @param string the progress description 49 * @param text 50 * @param maxValue the maximum value 51 * @see JobProgressIndicator#setText(String) 52 */ start(String text, int maxValue)53 void start(String text, int maxValue); 54 55 /** 56 * Updates the value to the specified value. Invalid values must be ignored. 57 * Stopped indicators must ignore that call. 58 * 59 * @param value the new value that should be shown now. This must fit the 60 * range [0..maxValue] as defined in {@link JobProgressIndicator#start(String, int)}. 61 */ setValue(int value)62 void setValue(int value); 63 64 /** 65 * Stop the progress. A progress indicator cannot be destructed before end() 66 * has been called. 67 */ end()68 void end(); 69 70 /** 71 * Clear progress value and description. Calling of setValue(0) and 72 * setText("") should do the same. Stopped indicators must ignore this call. 73 */ reset()74 void reset(); 75 } 76