| java.lang.Object java.lang.Thread org.netbeans.modules.uml.util.AbstractNBTask
All known Subclasses: org.netbeans.modules.uml.codegen.action.GenerateCodeTask, org.netbeans.modules.uml.core.reverseengineering.reintegration.ReverseEngineerTask,
AbstractNBTask | abstract public class AbstractNBTask extends Thread implements Cancellable,ITaskSupervisor(Code) | | author Craig Conover, craig.conover@sun.com
|
SETTING_KEY_DISPLAY_OUTPUT | final public static String SETTING_KEY_DISPLAY_OUTPUT(Code) | | |
SETTING_KEY_TASK_NAME | final public static String SETTING_KEY_TASK_NAME(Code) | | |
SETTING_KEY_TOTAL_ITEMS | final public static String SETTING_KEY_TOTAL_ITEMS(Code) | | |
cancelled | protected boolean cancelled(Code) | | |
progressContribs | protected ProgressContributor[] progressContribs(Code) | | |
start | protected long start(Code) | | |
success | protected boolean success(Code) | | |
AbstractNBTask | public AbstractNBTask()(Code) | | |
begin | abstract protected void begin()(Code) | | |
beginLog | protected void beginLog()(Code) | | This method logs a "header" message. Override to replace this message
with a custom header message and invoke super to prepend or append
to this message.
|
cancel | public boolean cancel()(Code) | | |
fail | public void fail()(Code) | | Call this method when a failure in your task is detected and it will
set the success flag to false. The next time proceed() is called,
it will invoke finish() return false.
|
finish | abstract protected void finish()(Code) | | |
finishLog | protected void finishLog()(Code) | | This method logs the finish status message (success, fail or cancel)
and the run time stats. Override to replace this message
with a custom header message and invoke super to prepend or append
to this message.
|
getLogLevel | public int getLogLevel()(Code) | | |
getTotalItems | public int getTotalItems()(Code) | | |
increment | public int increment()(Code) | | |
increment | public int increment(int step)(Code) | | |
initDefaultSettings | protected void initDefaultSettings()(Code) | | Provides tokenized defaults.
Should be overriden by subclass or settings values
passed in by calling class.
|
initTask | abstract protected void initTask()(Code) | | |
isDisplayOutput | public boolean isDisplayOutput()(Code) | | |
isLogging | public boolean isLogging()(Code) | | |
log | public void log()(Code) | | Outputs a blank line
|
log | public void log(int level)(Code) | | |
log | public void log(int level, String msg, boolean newline)(Code) | | |
log | public void log(String msg)(Code) | | Outputs a message with and appends newline by default
Parameters: msg - the message to be output |
log | public void log(String msg, boolean newline)(Code) | | Outputs a message
Parameters: msg - the message to be output Parameters: newline - if true, appends newline |
proceed | public boolean proceed()(Code) | | Called by task subclass to check confirm that the task hasn't been
cancelled or failed. If there is a cancellation or failure, finish()
is called.
true if the process hasn't failed or been canceled |
proceed | public boolean proceed(int step)(Code) | | Called by task subclass to check confirm that the task hasn't been
cancelled or failed. If there is a cancellation or failure, finish()
is called.
Parameters: count - the number of items processed so far; used for % donecalculation for the NB progress bar Parameters: step - the amount to increment the counter by. true if the process hasn't failed or been canceled |
setDisplayOutput | public void setDisplayOutput(boolean val)(Code) | | |
setLogLevel | public void setLogLevel(int level)(Code) | | |
setLogging | public void setLogging(boolean val)(Code) | | |
setTotalItems | public void setTotalItems(int total)(Code) | | |
start | public boolean start(int totalItems)(Code) | | |
start | public boolean start(int contributor, int totalItems)(Code) | | |
|
|