|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkrut.Run_KRUT
public class Run_KRUT
This is the main class of the program. When the main() method is
run, the following things will be done:
- Create and show the GUI.
- Start two new threads for the Sampler and the ScreenGrabber.
- Register event and action listeners to all buttons and menus.
When this is done, the main thread is done, and everything
that is done after is caused by the event and action listeners.
Field Summary | |
---|---|
protected javax.swing.JButton |
activeButton
This button is used to switch between the recording button, the stop button and the timer button. |
java.io.File |
audioFile
The initial name of the audio file. |
CapSizeQuery |
capQuery
The interface to the user for changing the capture area. |
protected java.awt.Rectangle |
capRect
The starting value of the capture size. |
QualitySlider |
encSlider
The interface to the user for changing the movie encoding quality. |
FPSQuery |
fpsQuery
The interface to the user for changing the fps values for the recorded movie. |
javax.swing.JFrame |
frame
The main frame. |
java.io.File |
imageFile
The initial name of the snapshot file. |
SnapShot |
imageUtils
A class used for showing the snap shot. |
KrutSettings |
krutSettings
The settings object, containing the interfaces to the user for changing the properties of the recorded data. |
protected javax.swing.JButton |
mouseButton
The mouse pointer button. |
java.io.File |
movieFile
The initial name of the movie file. |
ScreenGrabber |
myGrabber
The ScreenGrabber is used for all video and screenshot functions. |
EncodingProgressBar |
myProgressBar
The EncodingProgressBar is used to show and abort encoding. |
Sampler |
mySampler
The Sampler is used for all audio recording. |
protected java.lang.String |
newline
Newline String for the OutputWindow. |
protected boolean |
nextAudio
Flag used to keep track of if the NEXT recording should record audio. |
protected boolean |
nextVideo
Flag used to keep track of if the NEXT recording should record video. |
OutputText |
outWindow
The output window for the program. |
protected boolean |
recAudio
Flag to keep track of if we should record audio. |
protected javax.swing.JButton |
recButton
The recording button. |
protected boolean |
recording
A flag used to tell if recording is in progress. |
protected boolean |
recVideo
Flag to keep track of if we should record Video. |
SaveFileChooser |
saveQuery
The interface to the user for changing the save files. |
protected javax.swing.JButton |
snapshotButton
The snapshot button. |
protected javax.swing.JFrame |
snapShotFrame
This JFrame is used to show the SnapShots in. |
SoundQuery |
soundQuery
The interface to the user for changing the sound recording quality. |
protected javax.swing.JButton |
stopButton
The stop button. |
protected boolean |
stopping
A flag used to tell if there is already a thread running trying to stop the recording. |
KrutTimer |
timer
The timer object. |
protected javax.swing.JButton |
timerButton
The button used to indicate that the timer is active. |
protected javax.swing.JButton |
timerRecButton
The button used to indicate that the timer is running. |
Constructor Summary | |
---|---|
Run_KRUT()
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
If an ActionEvent is fired from one of the buttons or the menu, this is where we'll end up. |
protected void |
addButtons(javax.swing.JToolBar toolBar)
Add 3 buttons to a toolbar. |
protected static javax.swing.ImageIcon |
createImageIcon(java.lang.String path)
Returns an ImageIcon, or null if the path was invalid. |
javax.swing.JMenuBar |
createMenuBar()
Create the menu bar, and add the menu to it. |
java.awt.Dimension |
getActiveButtonSize()
This method delivers the size that the activeButton parameter should have. |
void |
init()
Main init function. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Something has changed in one of the checkboxes. |
static void |
main(java.lang.String[] args)
|
protected javax.swing.JButton |
makeNavigationButton(java.lang.String imageName,
java.lang.String actionCommand,
java.lang.String toolTipText,
java.lang.String altText)
Creates a navigation button of the specified appearance, and returns it. |
void |
restoreGUI()
This is where the GUI is restored after encoding of a recorded film. |
void |
setTimerGUI(boolean recording)
Change the GUI to display a timer button instead of a recording/stop button. |
void |
speedTest()
Runs the speed test. |
protected void |
switchActiveButton(javax.swing.JButton newButton)
Switches the activeButton so that the button displayed is now the one in newButton. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String newline
public javax.swing.JFrame frame
public CapSizeQuery capQuery
public FPSQuery fpsQuery
public QualitySlider encSlider
public SoundQuery soundQuery
public SaveFileChooser saveQuery
public OutputText outWindow
public KrutTimer timer
public KrutSettings krutSettings
public ScreenGrabber myGrabber
public Sampler mySampler
public EncodingProgressBar myProgressBar
public SnapShot imageUtils
public java.io.File imageFile
public java.io.File movieFile
public java.io.File audioFile
protected boolean recAudio
protected boolean recVideo
protected boolean nextAudio
protected boolean nextVideo
protected javax.swing.JButton activeButton
protected javax.swing.JButton recButton
protected javax.swing.JButton stopButton
protected javax.swing.JButton snapshotButton
protected javax.swing.JButton mouseButton
protected javax.swing.JButton timerButton
protected javax.swing.JButton timerRecButton
protected java.awt.Rectangle capRect
protected javax.swing.JFrame snapShotFrame
protected boolean stopping
protected boolean recording
Constructor Detail |
---|
public Run_KRUT()
Method Detail |
---|
public javax.swing.JMenuBar createMenuBar()
protected static javax.swing.ImageIcon createImageIcon(java.lang.String path)
The
- path to the image.
protected void addButtons(javax.swing.JToolBar toolBar)
toolBar
- The JToolBar that should be used in
the program.protected javax.swing.JButton makeNavigationButton(java.lang.String imageName, java.lang.String actionCommand, java.lang.String toolTipText, java.lang.String altText)
imageName
- A String representation of the URL
to an image that should be displayed
on this button.actionCommand
- The action command for this button.
This command is listened for in
the actionPerformed(ActionEvent e)
method, to determine which button
was pressed.toolTipText
- The tooltip text for this button.altText
- The text that should be typed on
this button, if any.
public java.awt.Dimension getActiveButtonSize()
protected void switchActiveButton(javax.swing.JButton newButton)
newButton
- The new JButton that should be displayed
as the activeButton in the GUI.public void setTimerGUI(boolean recording)
recording
- Should be true if the timer
is recording, false if it is
not.public void restoreGUI()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- The ActionEvent for this Action.public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- The ItemEvent that caused the change.public void speedTest()
public void init() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |