/**
* Increments the progress bar by the given value
*
* @param value The value to increment the bar
*/
public static void [[#variable18d4d2e0]]( final int value) {
final int newValue = [[#variable18d4d0a0]].getValue() + value;
if (SwingUtilities.isEventDispatchThread()) {
[[#variable18d4d0a0]].setValue(newValue);
}
else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
[[#variable18d4d0a0]].setValue(newValue);
}
} );
}
}
/**
* Sets the visibiility of the progress dialog
*
* @param visible a boolean value indicating whether or not to make the
* dialog visible.
*/
public static void setVisible( final boolean visible) {
if (dialog == null) {
return;
}
if (dialog.isVisible() != visible) {
if (SwingUtilities.isEventDispatchThread()) {
dialog.setVisible(visible);
}
else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
dialog.setVisible(visible);
}
} );
}
}
}
/**
* Closes the progress dialog.
*/
public static void dispose() {
if (dialog == null) {
return;
}
if (SwingUtilities.isEventDispatchThread()) {
dialog.dispose();
}
else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
dialog.dispose();
}
} );
}
}
|