Package org.insa.graphs.gui
Class ThreadWrapper
- java.lang.Object
-
- org.insa.graphs.gui.ThreadWrapper
-
- All Implemented Interfaces:
RunningAction
public class ThreadWrapper extends java.lang.Object implements RunningAction
-
-
Field Summary
Fields Modifier and Type Field Description private MainWindow
mainWindow
(package private) java.time.Instant
startingTime
private java.lang.Thread
thread
-
Constructor Summary
Constructors Constructor Description ThreadWrapper(MainWindow mainWindow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.Duration
getDuration()
java.lang.String
getInformation()
java.time.Instant
getStartingTime()
java.lang.Thread
getThread()
void
interrupt()
Interrupt this action.boolean
isRunning()
void
setThread(java.lang.Thread thread)
void
startThread()
-
-
-
Field Detail
-
thread
private java.lang.Thread thread
-
startingTime
java.time.Instant startingTime
-
mainWindow
private MainWindow mainWindow
-
-
Constructor Detail
-
ThreadWrapper
public ThreadWrapper(MainWindow mainWindow)
-
-
Method Detail
-
setThread
public void setThread(java.lang.Thread thread)
-
startThread
public void startThread()
-
getThread
public java.lang.Thread getThread()
-
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interfaceRunningAction
- Returns:
- true if this action is running.
-
interrupt
public void interrupt()
Description copied from interface:RunningAction
Interrupt this action.- Specified by:
interrupt
in interfaceRunningAction
-
getStartingTime
public java.time.Instant getStartingTime()
- Specified by:
getStartingTime
in interfaceRunningAction
- Returns:
- Starting time of this action.
-
getDuration
public java.time.Duration getDuration()
- Specified by:
getDuration
in interfaceRunningAction
- Returns:
- Current duration of this action.
-
getInformation
public java.lang.String getInformation()
- Specified by:
getInformation
in interfaceRunningAction
- Returns:
- Information for this action.
-
-