|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.silentsoftware.ui.ImageToZxSpec
public class ImageToZxSpec
Very simple and noddy image to zx spectrum compatible image converter.
| Field Summary | |
|---|---|
private static java.lang.String |
ANIM_GIF_NAME
The ZX icon for the window |
private static javax.swing.JPanel |
bottomPane
The bottom pane for holding the stauts and convert button |
private static javax.swing.JButton |
convertButton
The convert image button |
static java.lang.String |
DEFAULT_STATUS_MESSAGE
The message to show when idle |
private static javax.swing.JMenuItem |
folder
The input folder menu item |
private static float |
fps
Actual frames per second for impressing your mates ;) |
private static java.lang.Thread |
fpsThread
The debug frames per second counter |
private static javax.swing.JFrame |
frame
The main UI frame |
private static int |
frameCounter
The total number of frames/images converted in this session |
private static GifConverter |
gifConverter
The ".gif" file converter |
static javax.swing.ImageIcon |
IMAGE_ICON
Icon for all frames |
private static java.io.File[] |
inFiles
Input folders to process |
private static javax.swing.JMenuBar |
menubar
The menu bar |
private static java.io.File |
outFolder
Destination folder to output files to |
private static javax.swing.JMenuItem |
outputFolder
The output folder menu item |
private static javax.swing.JPanel |
p
The panel for rendering the images |
private static PreferencesDialog |
preferences
The options dialog |
private static PreviewFrame |
preview
The preview window |
private static java.awt.image.BufferedImage |
specLogo
The spectrum logo when no images are loaded |
private static javax.swing.JTextField |
statusBox
The status box |
private static java.lang.String |
TAP_SLIDESHOW_NAME
The ZX icon for the window |
private static TapeConverter |
tapeConverter
The ".tap" file converter |
| Constructor Summary | |
|---|---|
ImageToZxSpec()
|
|
| Method Summary | |
|---|---|
static void |
createUserInterface()
Create the natty UI/preview window. |
(package private) static void |
disableInput()
Disable the UI state to prevent input |
static void |
enableInput()
Reset's the UI state to enable input |
(package private) static javax.swing.JFrame |
getFrame()
|
(package private) static boolean |
isSupported(java.io.File f)
|
static void |
main(java.lang.String[] args)
Create a single thread for the rendering and inits the UI |
static void |
processFiles()
Method to begin the WIP preview which submits work to the work engine and controls the UI settings and validates the content being loaded. |
(package private) static void |
processPreview()
Method to begin the (multi dither, not WIP) preview which submits work to the work engine and controls the UI settings and validates the content being loaded. |
private static void |
processSingleFiles()
Inner core method for the process files method that specifically deals with a single files. |
private static void |
processVideo(java.io.File f)
Inner core method for the process files method that specifically deals with a video file. |
(package private) static void |
setInFiles(java.io.File[] inFiles)
|
(package private) static void |
setOutFolder(java.io.File outFolder)
|
static void |
setStatusMessage(java.lang.String message)
Sets a status or error message above the convert button |
(package private) static void |
showPreview()
|
private static void |
startFpsCalculator()
A simple implementation of an FPS calculator that uses actual time difference rather than expected sleep time to determine the real FPS. |
private static void |
startPreviewWaiter(java.util.List<java.util.concurrent.Future<WorkContainer>> futures)
A "waiter" which waits for the work engine (the WorkDispatcher) to return a result so it can be displayed in the dither preview dialog when it is ready. |
private static void |
startWaiter(java.util.List<java.util.concurrent.Future<WorkContainer>> futures,
java.lang.String videoName)
A "waiter" which waits for the work engine (the WorkDispatcher) to return a result so it can be displayed in the WIP preview when it is ready. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final javax.swing.ImageIcon IMAGE_ICON
public static final java.lang.String DEFAULT_STATUS_MESSAGE
private static int frameCounter
private static volatile float fps
private static java.io.File[] inFiles
private static java.io.File outFolder
private static volatile java.awt.image.BufferedImage specLogo
private static final TapeConverter tapeConverter
private static final GifConverter gifConverter
private static final java.lang.String TAP_SLIDESHOW_NAME
private static final java.lang.String ANIM_GIF_NAME
private static final javax.swing.JFrame frame
private static javax.swing.JPanel p
private static javax.swing.JPanel bottomPane
private static javax.swing.JButton convertButton
private static javax.swing.JTextField statusBox
private static javax.swing.JMenuItem folder
private static javax.swing.JMenuItem outputFolder
private static javax.swing.JMenuBar menubar
private static final PreferencesDialog preferences
private static final PreviewFrame preview
private static java.lang.Thread fpsThread
| Constructor Detail |
|---|
public ImageToZxSpec()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.lang.Exception
args -
java.lang.Exceptionpublic static void createUserInterface()
static boolean isSupported(java.io.File f)
static void processPreview()
private static void startPreviewWaiter(java.util.List<java.util.concurrent.Future<WorkContainer>> futures)
futures - public static void processFiles()
private static void processVideo(java.io.File f)
throws java.lang.InterruptedException,
javax.media.NoPlayerException,
java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassNotFoundException
f -
java.lang.InterruptedException
javax.media.NoPlayerException
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
private static void processSingleFiles()
throws java.lang.InterruptedException,
javax.media.NoPlayerException,
java.io.IOException,
java.util.concurrent.ExecutionException
java.lang.InterruptedException
javax.media.NoPlayerException
java.io.IOException
java.util.concurrent.ExecutionException
private static void startWaiter(java.util.List<java.util.concurrent.Future<WorkContainer>> futures,
java.lang.String videoName)
futures - private static void startFpsCalculator()
public static void setStatusMessage(java.lang.String message)
message - public static void enableInput()
static void disableInput()
static void setInFiles(java.io.File[] inFiles)
static void setOutFolder(java.io.File outFolder)
static void showPreview()
static javax.swing.JFrame getFrame()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||