aea9f6b7761f0db7dc4f83447384db952a53f390
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                          1) /* BlinkenLightsInteractiveMovieProgram
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java    2)  * Copyright (C) 2004-2013: Stefan Schuermans <stefan@blinkenarea.org>
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                          3)  * Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html
Blimp.java                          4)  * a blinkenarea.org project
Blimp.java                          5)  */
Blimp.java                          6) 
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java    7) package org.blinkenarea.Blimp;
org/blinkenarea/Blimp/Blimp.java    8) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                          9) import java.applet.*;
Blimp.java                         10) import java.awt.*;
Blimp.java                         11) import java.awt.event.*;
Blimp.java                         12) import java.awt.image.*;
Blimp.java                         13) import javax.swing.*;
Blimp.java                         14) import javax.swing.border.*;
Blimp.java                         15) import javax.swing.event.*;
Blimp.java                         16) import java.io.*;
Blimp.java                         17) import java.util.*;
Blimp.java                         18) import java.util.regex.*;
Blimp.java                         19) import java.net.*;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   20) import org.blinkenarea.BlinkenLib.*;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         21) 
Blimp.java                         22) public class Blimp extends JApplet
Blimp.java                         23)              implements Runnable, WindowListener, ActionListener,
Blimp.java                         24)                         AdjustmentListener, ChangeListener, FocusListener,
Blimp.java                         25)                         DocumentListener, BlinkenFrameEditorListener
Blimp.java                         26) {
Blimp.java                         27)   //configuration constants
Blimp.java                         28)   static final int constColorCntX = 2, constColorCntY = 4;
Blimp.java                         29)   static final int constColorCnt = constColorCntX * constColorCntY;
Christian Heimke Blimp v.1.3.7 (2009-08-15)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   30)   static final int defHeight = 24, defWidth = 32, defChannels = 1, defMaxval = 127, defDuration = 100;
org/blinkenarea/Blimp/Blimp.java   31)   static final double defAspect = 1.0;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   32)   static final int ZoomAspectResolution = 30;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         33) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   34)   //known formats
org/blinkenarea/Blimp/Blimp.java   35)   static final String[] knownFormats =
org/blinkenarea/Blimp/Blimp.java   36)   {
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   37)     "Blinkenlights (18x8-1/2) [a=0.55]",
org/blinkenarea/Blimp/Blimp.java   38)     "Blinkenlights Arcade (26x20-1/16) [a=0.5]",
org/blinkenarea/Blimp/Blimp.java   39)     "Blinkenlights reloaded (18x8-1/16) [a=0.55]",
Christian Heimke Blimp v.1.3.7 (2009-08-15)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   40)     "Blinkenlights Stereoscope total (96x32-1/256) [a=0.65]",
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   41)     "Blinkenlights Stereoscope West upper (22x8-1/16) [a=0.65]",
org/blinkenarea/Blimp/Blimp.java   42)     "Blinkenlights Stereoscope West lower (22x7-1/16) [a=0.65]",
org/blinkenarea/Blimp/Blimp.java   43)     "Blinkenlights Stereoscope East upper (30x12-1/16) [a=0.65]",
org/blinkenarea/Blimp/Blimp.java   44)     "Blinkenlights Stereoscope East lower (30x9-1/16) [a=0.65]",
org/blinkenarea/Blimp/Blimp.java   45)     "bluebox (98x7-1/128) [a=0.32]",
org/blinkenarea/Blimp/Blimp.java   46)     "ColorCurtain (18x8-3/256) [a=1.0]",
org/blinkenarea/Blimp/Blimp.java   47)     "TROIA big walls (104x32-1/128) [a=1.0]",
org/blinkenarea/Blimp/Blimp.java   48)     "TROIA ceiling (104x80-1/128) [a=1.0]",
org/blinkenarea/Blimp/Blimp.java   49)     "TROIA small walls (80x32-1/128) [a=1.0]",
Christian Heimke Blimp v.1.3.6 (2009-08-15)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   50)     "TroiCade (32x24-1/128) [a=1.0]",
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   51)   };
org/blinkenarea/Blimp/Blimp.java   52) 
org/blinkenarea/Blimp/Blimp.java   53)   //known sizes
org/blinkenarea/Blimp/Blimp.java   54)   static final String[] knownSizes =
org/blinkenarea/Blimp/Blimp.java   55)   {
org/blinkenarea/Blimp/Blimp.java   56)     "Blinkenlights (18x8)",
org/blinkenarea/Blimp/Blimp.java   57)     "Blinkenlights Arcade (26x20)",
Christian Heimke Blimp v.1.3.6 (2009-08-15)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   58)     "Blinkenlights Stereoscope total (96x32)",
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   59)     "Blinkenlights Stereoscope West upper (22x8)",
org/blinkenarea/Blimp/Blimp.java   60)     "Blinkenlights Stereoscope West lower (22x7)",
org/blinkenarea/Blimp/Blimp.java   61)     "Blinkenlights Stereoscope East upper (30x12)",
org/blinkenarea/Blimp/Blimp.java   62)     "Blinkenlights Stereoscope East lower (30x9)",
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   63)     "bluebox (98x7)",
org/blinkenarea/Blimp/Blimp.java   64)     "TROIA big walls (104x32)",
org/blinkenarea/Blimp/Blimp.java   65)     "TROIA ceiling (104x80)",
org/blinkenarea/Blimp/Blimp.java   66)     "TROIA small walls (80x32)",
Christian Heimke Blimp v.1.3.6 (2009-08-15)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   67)     "TroiCade (32x24)",
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   68)   };
org/blinkenarea/Blimp/Blimp.java   69) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         70)   //configuration variables
Blimp.java                         71)   boolean isFullApp = false; //if running as full application
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                         72)   String initialFile = null;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         73) 
Blimp.java                         74)   //GUI elements
Blimp.java                         75)   JFrame frame; //main window (if running as full application)
Blimp.java                         76)   Component dialogParent; //parent to use for dialogs
Blimp.java                         77)   JMenuBar menubar; //menubar in main window
Stefan Schuermans added scrolling text genera...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   78)   JMenu menuFile, menuInfo, menuEdit, menuFrameSel, menuGen, menuPlay; //menus
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   79)   JMenu menuOutput, menuHelp;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         80)   JMenuItem menuFileNew, menuFileLoad, menuFileSave, menuFileSaveAs, menuFileQuit;
Blimp.java                         81)   JMenuItem menuInfoShow, menuInfoAdd, menuInfoDelete;
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   82)   JMenu menuEditResize, menuEditScale;
org/blinkenarea/Blimp/Blimp.java   83)   JMenuItem menuEditResizeUser, menuEditScaleUser;
org/blinkenarea/Blimp/Blimp.java   84)   JMenuItem menuEditResizeKnown[], menuEditScaleKnown[];
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                         85)   JMenuItem menuEditInsertFrame, menuEditDuplicateFrame, menuEditDeleteFrame;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                         86)   JMenuItem menuFrameSelNone, menuFrameSelSingle, menuFrameSelStart, menuFrameSelEnd;
Blimp.java                         87)   JMenuItem menuFrameSelCopy, menuFrameSelMove, menuFrameSelReverse, menuFrameSelDelete;
Stefan Schuermans added scrolling text genera...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   88)   JMenuItem menuGenScrollText;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                         89)   JMenuItem menuEditImportImages, menuEditImportMovie;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         90)   JMenuItem menuPlayStart, menuPlayStop;
Blimp.java                         91)   JCheckBoxMenuItem menuPlayBegin, menuPlayLoop;
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   92)   ButtonGroup groupOutput;
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java   93)   JRadioButtonMenuItem menuOutputNone, menuOutputMcuf, menuOutputMcufFile, menuOutputFlexiPix;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         94)   JMenuItem menuHelpAbout;
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                         95)   JPanel panel, panelStatus, panelMain, panelFrames, panelOuterFrame; //panels of main window
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         96)   JPanel panelMiddleFrame, panelFrame, panelDuration, panelColors;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                         97)   JLabel labelStatus, labelFrames, labelSelFrames, labelFrameInfo, labelDuration;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                         98)   JScrollBar scrollFrames;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java   99)   JPanel panelZoom, panelZoomName, panelAspect, panelAspectName;
org/blinkenarea/Blimp/Blimp.java  100)   JLabel labelZoomName, labelZoom, labelAspectName, labelAspect;
org/blinkenarea/Blimp/Blimp.java  101)   JSlider sliderZoom, sliderAspect;
org/blinkenarea/Blimp/Blimp.java  102)   JTextField textZoom, textAspect;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        103)   BlinkenFrameEditor frameEditor;
Blimp.java                        104)   JScrollPane scrollpaneFrame;
Blimp.java                        105)   JTextField textDuration;
Blimp.java                        106)   JPanel panelOuterTools, panelMiddleTools, panelTools, panelActions;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        107)   JPanel panelOuterEdit, panelMiddleEdit, panelEdit;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        108)   JToggleButton buttonToolsNone, buttonToolsColorPicker, buttonToolsDot, buttonToolsLine;
Blimp.java                        109)   JToggleButton buttonToolsRect, buttonToolsFilledRect, buttonToolsCircle, buttonToolsFilledCircle;
Blimp.java                        110)   JToggleButton buttonToolsCopy, buttonToolsPaste;
Blimp.java                        111)   ButtonGroup groupTools;
Blimp.java                        112)   JButton buttonActionsInvert, buttonActionsRotate90, buttonActionsRotate180, buttonActionsRotate270;
Blimp.java                        113)   JButton buttonActionsMirrorHor, buttonActionsMirrorVer, buttonActionsMirrorDiag, buttonActionsMirrorDiag2;
Blimp.java                        114)   JButton buttonActionsRollLeft, buttonActionsRollRight, buttonActionsRollUp, buttonActionsRollDown;
Blimp.java                        115)   JButton buttonActionsUndo, buttonActionsRedo;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        116)   JButton buttonEditInsertFrame, buttonEditDuplicateFrame, buttonEditDeleteFrame;
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  117)   JButton buttonColorsPredefGray, buttonColorsPredefColor;
org/blinkenarea/Blimp/Blimp.java  118)   JPanel panelColorsChoose, panelColorsSettings, panelColorsPredef, panelColorsColor, panelColorsAlpha;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        119)   JToggleButton buttonsColor[];
Blimp.java                        120)   ButtonGroup groupColor;
Blimp.java                        121)   JLabel labelColorsColor, labelColorsAlpha;
Blimp.java                        122)   JButton buttonColorsColor;
Blimp.java                        123)   JSlider sliderColorsAlpha;
Blimp.java                        124)   JTextField textColorsColor, textColorsAlpha;
Blimp.java                        125) 
Blimp.java                        126)   //other variables
Blimp.java                        127)   int colorIdx; //index of selected color
Blimp.java                        128)   Color colors[]; //current colors
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  129)   ImageIcon iconsColor[], iconColorsColor; //color icons shown in color panel
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        130)   javax.swing.Timer timerPlay; //timer used for playing movies
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  131)   javax.swing.Timer timerOut; //timer used for output
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        132) 
Blimp.java                        133)   //file, movie, frame
Blimp.java                        134)   File curDir = null, curFile = null; //current directory and file
Blimp.java                        135)   BlinkenMovie curMovie = null; //current movie
Blimp.java                        136)   boolean curMovieChanged = false; //if changes have been made to current movie
Blimp.java                        137)   BlinkenFrame curFrame = null; //current frame
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        138)   int frameSelStart = -1, frameSelEnd = -1; //selected frames (none selected yet)
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        139) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  140)   //output
org/blinkenarea/Blimp/Blimp.java  141)   String outMcufDest = "127.0.0.1:2323"; //destination to send MCUF frames to
org/blinkenarea/Blimp/Blimp.java  142)   InetAddress outMcufHost; //host part of destination
org/blinkenarea/Blimp/Blimp.java  143)   int outMcufPort; //port part of destination
org/blinkenarea/Blimp/Blimp.java  144)   DatagramSocket outMcufSock; // UDP socket to send MCUF output on
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java  145)   String outMcufFileName; // name of MCUF output file
org/blinkenarea/Blimp/Blimp.java  146)   FileOutputStream outMcufFile; // file/device to output MCUF to
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  147)   File outFlexiPixCurDir = null;  //directory of config file
org/blinkenarea/Blimp/Blimp.java  148)   File outFlexiPixCurFile = null; //config file
org/blinkenarea/Blimp/Blimp.java  149)   org.blinkenarea.JFlexiPix.Display outFlexiPixDisplay; //FlexiPix display
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  150) 
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  151)   //other variables
org/blinkenarea/Blimp/Blimp.java  152)   boolean noRecurseZoomAspect = false; //set when changing zoom or aspect value per program to inhibit recursion triggered by events
org/blinkenarea/Blimp/Blimp.java  153) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        154)   //constructor for applet
Blimp.java                        155)   public Blimp( )
Blimp.java                        156)   {
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        157)     isFullApp = false;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        158)   }
Blimp.java                        159) 
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        160)   //constructor for full application - perhaps load an initial file (filename != null)
Blimp.java                        161)   public Blimp( String filename )
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        162)   {
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        163)     isFullApp = true;
Blimp.java                        164)     initialFile = filename;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        165)   }
Blimp.java                        166) 
Blimp.java                        167)   //load an image
Blimp.java                        168)   private ImageIcon loadImageIcon( String name )
Blimp.java                        169)   {
Blimp.java                        170)     URL url = Blimp.class.getResource( "images/" + name );
Blimp.java                        171)     if( url != null )
Blimp.java                        172)       return new ImageIcon( url );
Blimp.java                        173)     else
Blimp.java                        174)       return new ImageIcon( new BufferedImage( 1, 1, BufferedImage.TYPE_INT_RGB ) );
Blimp.java                        175)   }
Blimp.java                        176) 
Blimp.java                        177)   //perhaps ask if to save changes and perhaps do it
Blimp.java                        178)   //return true on cancel
Blimp.java                        179)   private boolean askSaveChanges( )
Blimp.java                        180)   {
Blimp.java                        181)     int retVal;
Blimp.java                        182) 
Blimp.java                        183)     //ask only when changes were made
Blimp.java                        184)     if( curMovieChanged )
Blimp.java                        185)     {
Blimp.java                        186)       //ask if to save changes
Blimp.java                        187)       retVal = JOptionPane.showConfirmDialog( dialogParent,
Blimp.java                        188)                                               "Do You want to save the changes?",
Blimp.java                        189)                                               "Blimp - Save changes?",
Blimp.java                        190)                                               JOptionPane.YES_NO_CANCEL_OPTION,
Blimp.java                        191)                                               JOptionPane.QUESTION_MESSAGE );
Blimp.java                        192)       //cancelled
Blimp.java                        193)       if( retVal == JOptionPane.CANCEL_OPTION )
Blimp.java                        194)         return true;
Blimp.java                        195)       //save
Blimp.java                        196)       if( retVal == JOptionPane.YES_OPTION )
Blimp.java                        197)         actionFileSave( );
Blimp.java                        198)     }
Blimp.java                        199) 
Blimp.java                        200)     //not cancelled
Blimp.java                        201)     return false;
Blimp.java                        202)   }
Blimp.java                        203) 
Christian Heimke Blimp v.1.3.1 (2006-10-17)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  204)   //set file filters for file chooser
org/blinkenarea/Blimp/Blimp.java  205)   private void setFileFilters( JFileChooser fileChooser )
org/blinkenarea/Blimp/Blimp.java  206)   {
org/blinkenarea/Blimp/Blimp.java  207)     javax.swing.filechooser.FileFilter fileFilters[ ] = fileChooser.getChoosableFileFilters( );
org/blinkenarea/Blimp/Blimp.java  208)     for( int i = 0; i < fileFilters.length; i++ )
org/blinkenarea/Blimp/Blimp.java  209)       fileChooser.removeChoosableFileFilter( fileFilters[i] );
org/blinkenarea/Blimp/Blimp.java  210)     javax.swing.filechooser.FileFilter blinkenFileFilter = new BlinkenFileFilter( );
org/blinkenarea/Blimp/Blimp.java  211)     fileChooser.addChoosableFileFilter( blinkenFileFilter );
org/blinkenarea/Blimp/Blimp.java  212)     fileChooser.addChoosableFileFilter( new BlinkenFileFilter( "blm" ) );
org/blinkenarea/Blimp/Blimp.java  213)     fileChooser.addChoosableFileFilter( new BlinkenFileFilter( "bmm" ) );
org/blinkenarea/Blimp/Blimp.java  214)     fileChooser.addChoosableFileFilter( new BlinkenFileFilter( "bml" ) );
org/blinkenarea/Blimp/Blimp.java  215)     fileChooser.addChoosableFileFilter( new BlinkenFileFilter( "bbm" ) );
org/blinkenarea/Blimp/Blimp.java  216)     fileChooser.setFileFilter( blinkenFileFilter );
org/blinkenarea/Blimp/Blimp.java  217)   }
org/blinkenarea/Blimp/Blimp.java  218) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        219)   //"File New" was chosen from menu
Blimp.java                        220)   private void actionFileNew( )
Blimp.java                        221)   {
Blimp.java                        222)     //ask if to save changes
Blimp.java                        223)     if( askSaveChanges( ) ) //returns true on cancel
Blimp.java                        224)       return;
Blimp.java                        225) 
Blimp.java                        226)     //create a new movie
Blimp.java                        227)     if( frame != null )
Blimp.java                        228)       frame.setTitle( "Blimp" );
Blimp.java                        229)     labelStatus.setText( "new movie..." );
Blimp.java                        230)     curFile = null;
Stefan Schuermans keep movie dimensions on fi...

Stefan Schuermans authored 10 years ago

org/blinkenarea/Blimp/Blimp.java  231)     if (curMovie != null)
org/blinkenarea/Blimp/Blimp.java  232)       curMovie = new BlinkenMovie( curMovie.getHeight(), curMovie.getWidth(),
org/blinkenarea/Blimp/Blimp.java  233)                                    curMovie.getChannels(), curMovie.getMaxval() );
org/blinkenarea/Blimp/Blimp.java  234)     else
org/blinkenarea/Blimp/Blimp.java  235)       curMovie = new BlinkenMovie( defHeight, defWidth, defChannels, defMaxval );
Stefan Schuermans version available in class...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  236)     curMovie.insertInfo( 0, "creator", String.format( "Blimp (version %d.%d.%d)", Version.Major, Version.Minor, Version.Revision ) );
Christian Heimke Blimp v.0.5 (2004-11-19)

Christian Heimke authored 13 years ago

Blimp.java                        237)     curMovie.insertFrame( 0, new BlinkenFrame( defHeight, defWidth, defChannels, defMaxval, defDuration ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        238)     curMovieChanged = false;
Blimp.java                        239) 
Blimp.java                        240)     //update controls
Blimp.java                        241)     updateFrames( 0 );
Blimp.java                        242)   }
Blimp.java                        243) 
Stefan Schuermans issue warning when filename...

Stefan Schuermans authored 10 years ago

org/blinkenarea/Blimp/Blimp.java  244)   //check file name and issue warning if it is not a known file type
org/blinkenarea/Blimp/Blimp.java  245)   private void checkFilenameAndWarn( String filename )
org/blinkenarea/Blimp/Blimp.java  246)   {
org/blinkenarea/Blimp/Blimp.java  247)     boolean warn = false;
org/blinkenarea/Blimp/Blimp.java  248)     if( filename.length() < 4 ) {
org/blinkenarea/Blimp/Blimp.java  249)       warn = true;
org/blinkenarea/Blimp/Blimp.java  250)     } else {
org/blinkenarea/Blimp/Blimp.java  251)       String ending = filename.substring(filename.length() - 4);
org/blinkenarea/Blimp/Blimp.java  252)       warn = ! ending.equals(".blm") &&
org/blinkenarea/Blimp/Blimp.java  253)              ! ending.equals(".bmm") &&
org/blinkenarea/Blimp/Blimp.java  254)              ! ending.equals(".bml") &&
org/blinkenarea/Blimp/Blimp.java  255)              ! ending.equals(".bbm");
org/blinkenarea/Blimp/Blimp.java  256)     }
org/blinkenarea/Blimp/Blimp.java  257)     if( warn ) {
org/blinkenarea/Blimp/Blimp.java  258)       JOptionPane.showMessageDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java  259)                                      "Blimp supports 4 different file types:\n" +
org/blinkenarea/Blimp/Blimp.java  260)                                      "*.bml: Blinkenlights Movie (classic format)\n" +
org/blinkenarea/Blimp/Blimp.java  261)                                      "*.bmm: BLINKENmini Movie\n" + 
org/blinkenarea/Blimp/Blimp.java  262)                                      "*.bml: Blinkenlights Markup Language (newer XML format)\n" +
org/blinkenarea/Blimp/Blimp.java  263)                                      "*.bbm: Binary Blinken Movie (smaller and faster)\n" +
org/blinkenarea/Blimp/Blimp.java  264)                                      "Please make sure your filename has one of those endings!\n",
org/blinkenarea/Blimp/Blimp.java  265)                                      "Blimp - Supported File Types...",
org/blinkenarea/Blimp/Blimp.java  266)                                      JOptionPane.INFORMATION_MESSAGE );
org/blinkenarea/Blimp/Blimp.java  267)     }
org/blinkenarea/Blimp/Blimp.java  268)   }
org/blinkenarea/Blimp/Blimp.java  269) 
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        270)   //load file (filename is taken from curFile)
Blimp.java                        271)   private void fileLoad( )
Blimp.java                        272)   {
Blimp.java                        273)     if( curMovie.load( curFile.getPath( ) ) )
Blimp.java                        274)     {
Blimp.java                        275)       //success
Blimp.java                        276)       if( frame != null )
Blimp.java                        277)         frame.setTitle( "Blimp - " + curFile.getPath( ) );
Blimp.java                        278)       labelStatus.setText( "movie \"" + curFile.getPath( ) +  "\" was loaded successfully..." );
Blimp.java                        279)       curMovieChanged = false;
Blimp.java                        280)     }
Blimp.java                        281)     else
Blimp.java                        282)     {
Stefan Schuermans issue warning when filename...

Stefan Schuermans authored 10 years ago

org/blinkenarea/Blimp/Blimp.java  283)       checkFilenameAndWarn( curFile.getPath( ) );
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        284)       //some error
Blimp.java                        285)       if( frame != null )
Blimp.java                        286)         frame.setTitle( "Blimp" );
Blimp.java                        287)       labelStatus.setText( "movie \"" + curFile.getPath( ) +  "\" could not be loaded..." );
Blimp.java                        288)       curFile = null;
Blimp.java                        289)       curMovieChanged = false;
Blimp.java                        290)     }
Blimp.java                        291) 
Blimp.java                        292)     //update controls
Blimp.java                        293)     updateFrames( 0 );
Blimp.java                        294)   }
Blimp.java                        295) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        296)   //"File Load" was chosen from menu
Blimp.java                        297)   private void actionFileLoad( )
Blimp.java                        298)   {
Blimp.java                        299)     JFileChooser fileChooser;
Blimp.java                        300) 
Blimp.java                        301)     //ask if to save changes
Blimp.java                        302)     if( askSaveChanges( ) ) //returns true on cancel
Blimp.java                        303)       return;
Blimp.java                        304) 
Blimp.java                        305)     //show file select dialog
Blimp.java                        306)     fileChooser = new JFileChooser( );
Blimp.java                        307)     fileChooser.setDialogTitle( "Blimp - Load..." );
Christian Heimke Blimp v.1.3.1 (2006-10-17)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  308)     setFileFilters( fileChooser );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        309)     if( curDir != null )
Blimp.java                        310)       fileChooser.setCurrentDirectory( curDir );
Blimp.java                        311)     if( fileChooser.showOpenDialog( dialogParent ) == JFileChooser.APPROVE_OPTION )
Blimp.java                        312)     {
Blimp.java                        313)       //save current directory and current file
Blimp.java                        314)       curDir = fileChooser.getCurrentDirectory( );
Blimp.java                        315)       curFile = fileChooser.getSelectedFile( );
Blimp.java                        316)       //load file
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        317)       fileLoad( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        318)     }
Blimp.java                        319)   }
Blimp.java                        320) 
Blimp.java                        321)   //"File Save" was chosen from menu
Blimp.java                        322)   private void actionFileSave( )
Blimp.java                        323)   {
Blimp.java                        324)     //just call "File Save as" if no current file
Blimp.java                        325)     if( curFile == null )
Blimp.java                        326)     {
Blimp.java                        327)       actionFileSaveAs( );
Blimp.java                        328)       return;
Blimp.java                        329)     }
Christian Heimke Blimp v.1.3.1 (2006-10-17)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  330)     //warn if selected format does not fully support current format
org/blinkenarea/Blimp/Blimp.java  331)     if( curFile.getPath( ).endsWith( ".blm" ) && (curMovie.getChannels( ) > 1 || curMovie.getMaxval( ) > 1) )
org/blinkenarea/Blimp/Blimp.java  332)     {
org/blinkenarea/Blimp/Blimp.java  333)       JOptionPane.showMessageDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java  334)                                      "The selected format \"BlinkenLights Movie (*.blm)\"\nonly supports one channel with two colors.\nFor not losing any information, please save\nyour movie as \"Blinkenlights Markup Language movie (*.bml)\"",
org/blinkenarea/Blimp/Blimp.java  335)                                      "Blimp - Save - Warning",
org/blinkenarea/Blimp/Blimp.java  336)                                      JOptionPane.WARNING_MESSAGE );
org/blinkenarea/Blimp/Blimp.java  337)     }
org/blinkenarea/Blimp/Blimp.java  338)     if( curFile.getPath( ).endsWith( ".bmm" ) && curMovie.getChannels( ) > 1 )
org/blinkenarea/Blimp/Blimp.java  339)     {
org/blinkenarea/Blimp/Blimp.java  340)       JOptionPane.showMessageDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java  341)                                      "The selected format \"BlinkenMini Movie (*.blm)\"\nonly supports one channel.\nFor not losing any information, please save\nyour movie as \"Blinkenlights Markup Language movie (*.bml)\"",
org/blinkenarea/Blimp/Blimp.java  342)                                      "Blimp - Save - Warning",
org/blinkenarea/Blimp/Blimp.java  343)                                      JOptionPane.WARNING_MESSAGE );
org/blinkenarea/Blimp/Blimp.java  344)     }
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        345)     //save file
Blimp.java                        346)     if( curMovie.save( curFile.getPath( ) ) )
Blimp.java                        347)     {
Blimp.java                        348)       //success
Blimp.java                        349)       labelStatus.setText( "movie \"" + curFile.getPath( ) +  "\" was saved successfully..." );
Blimp.java                        350)       curMovieChanged = false;
Blimp.java                        351)     }
Blimp.java                        352)     else
Blimp.java                        353)     {
Stefan Schuermans issue warning when filename...

Stefan Schuermans authored 10 years ago

org/blinkenarea/Blimp/Blimp.java  354)       checkFilenameAndWarn( curFile.getPath( ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        355)       //some error
Blimp.java                        356)       labelStatus.setText( "movie \"" + curFile.getPath( ) +  "\" could not be saved..." );
Blimp.java                        357)     }
Blimp.java                        358)   }
Blimp.java                        359) 
Blimp.java                        360)   //"File Save as" was chosen from menu
Blimp.java                        361)   private void actionFileSaveAs( )
Blimp.java                        362)   {
Blimp.java                        363)     JFileChooser fileChooser;
Blimp.java                        364) 
Blimp.java                        365)     //show file select dialog
Blimp.java                        366)     fileChooser = new JFileChooser( );
Blimp.java                        367)     fileChooser.setDialogTitle( "Blimp - Save as..." );
Christian Heimke Blimp v.1.3.1 (2006-10-17)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  368)     setFileFilters( fileChooser );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        369)     if( curDir != null )
Blimp.java                        370)       fileChooser.setCurrentDirectory( curDir );
Blimp.java                        371)     if( curFile != null )
Blimp.java                        372)       fileChooser.setSelectedFile( curFile );
Blimp.java                        373)     if( fileChooser.showSaveDialog( dialogParent ) == JFileChooser.APPROVE_OPTION )
Blimp.java                        374)     {
Blimp.java                        375)       //save current directory and file
Blimp.java                        376)       curDir = fileChooser.getCurrentDirectory( );
Blimp.java                        377)       curFile = fileChooser.getSelectedFile( );
Blimp.java                        378)       if( frame != null )
Blimp.java                        379)         frame.setTitle( "Blimp - " + curFile.getPath( ) );
Blimp.java                        380)       //just call "File Save" to do the work
Blimp.java                        381)       actionFileSave( );
Blimp.java                        382)     }
Blimp.java                        383)   }
Blimp.java                        384) 
Blimp.java                        385)   //"File Quit" was chosen from menu
Blimp.java                        386)   private void actionFileQuit( )
Blimp.java                        387)   {
Blimp.java                        388)     //ask if to save changes
Blimp.java                        389)     if( askSaveChanges( ) ) //returns true on cancel
Blimp.java                        390)       return;
Blimp.java                        391) 
Blimp.java                        392)     //only end program if runnning as full application
Blimp.java                        393)     if( isFullApp )
Blimp.java                        394)       System.exit( 0 );
Blimp.java                        395)   }
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  396) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        397)   //"Information Show..." was chosen from menu
Blimp.java                        398)   private void actionInfoShow( )
Blimp.java                        399)   {
Blimp.java                        400)     int i, cnt;
Blimp.java                        401)     String info;
Blimp.java                        402) 
Blimp.java                        403)     //get information about movie
Blimp.java                        404)     info = "";
Blimp.java                        405)     cnt = curMovie.getInfoCnt( );
Blimp.java                        406)     for( i = 0; i < cnt; i++ )
Blimp.java                        407)       info += "\n" + curMovie.getInfoType( i ) +
Blimp.java                        408)               ": " + curMovie.getInfoData( i );
Blimp.java                        409) 
Blimp.java                        410)     //show information
Blimp.java                        411)     JOptionPane.showMessageDialog( dialogParent,
Blimp.java                        412)                                    "Information about movie:\n" + info,
Blimp.java                        413)                                    "Blimp - Show Information...",
Blimp.java                        414)                                    JOptionPane.INFORMATION_MESSAGE );
Blimp.java                        415)   }
Blimp.java                        416) 
Blimp.java                        417)   //"Information Add..." was chosen from menu
Blimp.java                        418)   private void actionInfoAdd( )
Blimp.java                        419)   {
Blimp.java                        420)     Pattern infoPattern;
Blimp.java                        421)     Object info;
Blimp.java                        422)     Matcher infoMatcher;
Blimp.java                        423) 
Blimp.java                        424)     //initialize info pattern
Blimp.java                        425)     infoPattern = Pattern.compile( "^([A-Za-z0-9]+)(?: *= *|: *)(.*)$" );
Blimp.java                        426) 
Blimp.java                        427)     //ask for information to add
Blimp.java                        428)     info = JOptionPane.showInputDialog( dialogParent,
Blimp.java                        429)                                         "Please enter the information to add:\n\n" +
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  430)                                         "The format is:   <info-type>: <info-text>\n" +
org/blinkenarea/Blimp/Blimp.java  431)                                         "     title: <title of movie>\n" +
org/blinkenarea/Blimp/Blimp.java  432)                                         "     description: <short description of movie content>\n" +
org/blinkenarea/Blimp/Blimp.java  433)                                         "     creator: <program this movie was created with>\n" +
org/blinkenarea/Blimp/Blimp.java  434)                                         "     author: <name of author(s)>\n" +
org/blinkenarea/Blimp/Blimp.java  435)                                         "     email: <email address of author>\n" +
org/blinkenarea/Blimp/Blimp.java  436)                                         "     url: <homepage of author or of this movie>",
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        437)                                         "Blimp - Add Information...",
Blimp.java                        438)                                         JOptionPane.QUESTION_MESSAGE,
Blimp.java                        439)                                         null, null, "" );
Blimp.java                        440)     //dialog was cancelled
Blimp.java                        441)     if( info == null )
Blimp.java                        442)       return;
Blimp.java                        443) 
Blimp.java                        444)     //add info
Blimp.java                        445)     if( (infoMatcher = infoPattern.matcher( info.toString( ) )).find( ) )
Blimp.java                        446)       curMovie.insertInfo( curMovie.getInfoCnt( ), infoMatcher.group( 1 ), infoMatcher.group( 2 ) );
Blimp.java                        447)     else
Blimp.java                        448)       curMovie.insertInfo( curMovie.getInfoCnt( ), "description", info.toString( ) );
Blimp.java                        449)     curMovieChanged = true;
Blimp.java                        450)   }
Blimp.java                        451) 
Blimp.java                        452)   //"Information Delete..." was chosen from menu
Blimp.java                        453)   private void actionInfoDelete( )
Blimp.java                        454)   {
Blimp.java                        455)     int i, cnt;
Blimp.java                        456)     String info[];
Blimp.java                        457)     Object selected;
Blimp.java                        458) 
Blimp.java                        459)     //get information about movie
Blimp.java                        460)     cnt = curMovie.getInfoCnt( );
Blimp.java                        461)     info = new String[cnt];
Blimp.java                        462)     for( i = 0; i < cnt; i++ )
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  463)       info[i] = curMovie.getInfoType( i ) + ": " +
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        464)                 curMovie.getInfoData( i );
Blimp.java                        465) 
Stefan Schuermans added scrolling text genera...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  466)     //ask for information to delete
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        467)     selected = JOptionPane.showInputDialog( dialogParent,
Blimp.java                        468)                                             "Select information to delete:",
Blimp.java                        469)                                             "Blimp - Delete Information...",
Blimp.java                        470)                                             JOptionPane.QUESTION_MESSAGE,
Blimp.java                        471)                                             null, info, null );
Blimp.java                        472)     //dialog was cancelled
Blimp.java                        473)     if( selected == null )
Blimp.java                        474)       return;
Blimp.java                        475) 
Blimp.java                        476)     //delete sected information
Blimp.java                        477)     for( i = 0; i < cnt; i++ )
Blimp.java                        478)       if( info[i] == selected )
Blimp.java                        479)         break;
Blimp.java                        480)     if( i < cnt )
Blimp.java                        481)     {
Blimp.java                        482)       curMovie.deleteInfo( i );
Blimp.java                        483)       curMovieChanged = true;
Blimp.java                        484)     }
Blimp.java                        485)   }
Blimp.java                        486) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  487)   //get format or size from bracket in string
org/blinkenarea/Blimp/Blimp.java  488)   private String getFormatOrSize( String str )
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        489)   {
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  490)     Pattern pattern;
org/blinkenarea/Blimp/Blimp.java  491)     Matcher matcher;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        492) 
Christian Heimke Blimp v.1.3.7 (2009-08-15)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  493)     pattern = Pattern.compile( "^.*\\(([^()]*)\\)( \\[[^\\[\\]]*\\])?$" );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  494)     if( (matcher = pattern.matcher( str )).find( ) )
org/blinkenarea/Blimp/Blimp.java  495)       return matcher.group( 1 );
org/blinkenarea/Blimp/Blimp.java  496)     else
org/blinkenarea/Blimp/Blimp.java  497)       return "";
org/blinkenarea/Blimp/Blimp.java  498)   }
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        499) 
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  500)   //get aspect from square bracket in string
org/blinkenarea/Blimp/Blimp.java  501)   private String getAspect( String str )
org/blinkenarea/Blimp/Blimp.java  502)   {
org/blinkenarea/Blimp/Blimp.java  503)     Pattern pattern;
org/blinkenarea/Blimp/Blimp.java  504)     Matcher matcher;
org/blinkenarea/Blimp/Blimp.java  505) 
org/blinkenarea/Blimp/Blimp.java  506)     pattern = Pattern.compile( "^.*\\[([^\\[\\]]*)\\]$" );
org/blinkenarea/Blimp/Blimp.java  507)     if( (matcher = pattern.matcher( str )).find( ) )
org/blinkenarea/Blimp/Blimp.java  508)       return matcher.group( 1 );
org/blinkenarea/Blimp/Blimp.java  509)     else
org/blinkenarea/Blimp/Blimp.java  510)       return "";
org/blinkenarea/Blimp/Blimp.java  511)   }
org/blinkenarea/Blimp/Blimp.java  512) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  513)   //resize to format
org/blinkenarea/Blimp/Blimp.java  514)   private boolean actionEditResizeToFormat( String format )
org/blinkenarea/Blimp/Blimp.java  515)   {
org/blinkenarea/Blimp/Blimp.java  516)     Pattern formatPattern;
org/blinkenarea/Blimp/Blimp.java  517)     Matcher formatMatcher;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        518) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  519)     //initialize format pattern
org/blinkenarea/Blimp/Blimp.java  520)     formatPattern = Pattern.compile( "^([0-9]+)x([0-9]+)-([0-9]+)/([0-9]+)$" );
org/blinkenarea/Blimp/Blimp.java  521) 
org/blinkenarea/Blimp/Blimp.java  522)     //check format
org/blinkenarea/Blimp/Blimp.java  523)     if( ! (formatMatcher = formatPattern.matcher( format )).find( ) ) //abort and return error if format not valid
org/blinkenarea/Blimp/Blimp.java  524)       return false;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        525) 
Blimp.java                        526)     //resize movie
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  527)     curMovie.resize( Integer.parseInt( formatMatcher.group( 2 ) ),
org/blinkenarea/Blimp/Blimp.java  528)                      Integer.parseInt( formatMatcher.group( 1 ) ),
org/blinkenarea/Blimp/Blimp.java  529)                      Integer.parseInt( formatMatcher.group( 3 ) ),
org/blinkenarea/Blimp/Blimp.java  530)                      Integer.parseInt( formatMatcher.group( 4 ) ) - 1 );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        531)     curMovieChanged = true;
Blimp.java                        532) 
Blimp.java                        533)     //update controls
Blimp.java                        534)     updateFrames( scrollFrames.getValue( ) );
Blimp.java                        535) 
Blimp.java                        536)     //update status
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  537)     labelStatus.setText( "movie resized successfully to " + format + "..." );
org/blinkenarea/Blimp/Blimp.java  538) 
org/blinkenarea/Blimp/Blimp.java  539)     return true;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        540)   }
Blimp.java                        541) 
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  542)   //set aspect (in context of resizing movie)
org/blinkenarea/Blimp/Blimp.java  543)   private boolean actionEditResizeSetAspect( String aspect )
org/blinkenarea/Blimp/Blimp.java  544)   {
org/blinkenarea/Blimp/Blimp.java  545)     Pattern aspectPattern;
org/blinkenarea/Blimp/Blimp.java  546)     Matcher aspectMatcher;
org/blinkenarea/Blimp/Blimp.java  547)     double aspectValue;
org/blinkenarea/Blimp/Blimp.java  548) 
org/blinkenarea/Blimp/Blimp.java  549)     //initialize aspect pattern
org/blinkenarea/Blimp/Blimp.java  550)     aspectPattern = Pattern.compile( "^a=([0-9.]+)$" );
org/blinkenarea/Blimp/Blimp.java  551) 
org/blinkenarea/Blimp/Blimp.java  552)     //check aspect
org/blinkenarea/Blimp/Blimp.java  553)     if( ! (aspectMatcher = aspectPattern.matcher( aspect )).find( ) ) //abort and return error if aspect not valid
org/blinkenarea/Blimp/Blimp.java  554)       return false;
org/blinkenarea/Blimp/Blimp.java  555) 
org/blinkenarea/Blimp/Blimp.java  556)     //parse aspect if specified
org/blinkenarea/Blimp/Blimp.java  557)     try
org/blinkenarea/Blimp/Blimp.java  558)     {
org/blinkenarea/Blimp/Blimp.java  559)       aspectValue = Double.parseDouble( aspectMatcher.group( 1 ) );
org/blinkenarea/Blimp/Blimp.java  560)     }
org/blinkenarea/Blimp/Blimp.java  561)     catch( NumberFormatException e )
org/blinkenarea/Blimp/Blimp.java  562)     {
org/blinkenarea/Blimp/Blimp.java  563)       return false;
org/blinkenarea/Blimp/Blimp.java  564)     }
org/blinkenarea/Blimp/Blimp.java  565) 
org/blinkenarea/Blimp/Blimp.java  566)     //set new aspect
org/blinkenarea/Blimp/Blimp.java  567)     sliderAspect.setValue( aspectZoomToSliderValue( aspectValue ) );
org/blinkenarea/Blimp/Blimp.java  568) 
org/blinkenarea/Blimp/Blimp.java  569)     return true;
org/blinkenarea/Blimp/Blimp.java  570)   }
org/blinkenarea/Blimp/Blimp.java  571) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  572)   //"Edit Resize Movie user defined format..." was chosen from menu
org/blinkenarea/Blimp/Blimp.java  573)   private void actionEditResizeUser( )
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        574)   {
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  575)     String curFormat;
org/blinkenarea/Blimp/Blimp.java  576)     Object format;
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        577) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  578)     //get string with current movie format
org/blinkenarea/Blimp/Blimp.java  579)     curFormat = curMovie.getWidth( ) + "x" +
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  580)                 curMovie.getHeight( ) + "-" +
org/blinkenarea/Blimp/Blimp.java  581)                 curMovie.getChannels( ) + "/" +
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  582)                 (curMovie.getMaxval( ) + 1);
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        583) 
Blimp.java                        584)     //ask until cancel or answer is valid
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  585)     format = curFormat;
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        586)     do
Blimp.java                        587)     {
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  588)       //ask for new format
org/blinkenarea/Blimp/Blimp.java  589)       format = JOptionPane.showInputDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java  590)                                             "Current movie format is:   " + curFormat + "\n\n" +
org/blinkenarea/Blimp/Blimp.java  591)                                             "The format is:   <width>x<height>-<channels>/<colors>\n\n" +
org/blinkenarea/Blimp/Blimp.java  592)                                             "Please enter the new movie format:",
org/blinkenarea/Blimp/Blimp.java  593)                                             "Blimp - Resize Movie...",
org/blinkenarea/Blimp/Blimp.java  594)                                             JOptionPane.QUESTION_MESSAGE,
org/blinkenarea/Blimp/Blimp.java  595)                                             null, null, format );
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        596)       //dialog was cancelled
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  597)       if( format == null )
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        598)         return;
Blimp.java                        599)     }
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  600)     while( ! actionEditResizeToFormat( format.toString( ) ) ); //repeat question if answer not valid
org/blinkenarea/Blimp/Blimp.java  601)   }
org/blinkenarea/Blimp/Blimp.java  602) 
org/blinkenarea/Blimp/Blimp.java  603)   // scale to size
org/blinkenarea/Blimp/Blimp.java  604)   private boolean actionEditScaleToSize( String size )
org/blinkenarea/Blimp/Blimp.java  605)   {
org/blinkenarea/Blimp/Blimp.java  606)     Pattern sizePattern;
org/blinkenarea/Blimp/Blimp.java  607)     Matcher sizeMatcher;
org/blinkenarea/Blimp/Blimp.java  608) 
org/blinkenarea/Blimp/Blimp.java  609)     //initialize size pattern
org/blinkenarea/Blimp/Blimp.java  610)     sizePattern = Pattern.compile( "^([0-9]+)x([0-9]+)$" );
org/blinkenarea/Blimp/Blimp.java  611) 
org/blinkenarea/Blimp/Blimp.java  612)     //ask until cancel or answer is valid
org/blinkenarea/Blimp/Blimp.java  613)     if( ! (sizeMatcher = sizePattern.matcher( size.toString( ) )).find( ) ) //abort and return error if size not valid
org/blinkenarea/Blimp/Blimp.java  614)       return false;
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        615) 
Blimp.java                        616)     //scale movie
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  617)     curMovie.scale( Integer.parseInt( sizeMatcher.group( 2 ) ),
org/blinkenarea/Blimp/Blimp.java  618)                     Integer.parseInt( sizeMatcher.group( 1 ) ) );
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        619)     curMovieChanged = true;
Blimp.java                        620) 
Blimp.java                        621)     //update controls
Blimp.java                        622)     updateFrames( scrollFrames.getValue( ) );
Blimp.java                        623) 
Blimp.java                        624)     //update status
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  625)     labelStatus.setText( "movie scaled successfully to " + size + "..." );
org/blinkenarea/Blimp/Blimp.java  626) 
org/blinkenarea/Blimp/Blimp.java  627)     return true;
org/blinkenarea/Blimp/Blimp.java  628)   }
org/blinkenarea/Blimp/Blimp.java  629) 
org/blinkenarea/Blimp/Blimp.java  630)   //"Edit Scale Movie user defined size..." was chosen from menu
org/blinkenarea/Blimp/Blimp.java  631)   private void actionEditScaleUser( )
org/blinkenarea/Blimp/Blimp.java  632)   {
org/blinkenarea/Blimp/Blimp.java  633)     String curSize;
org/blinkenarea/Blimp/Blimp.java  634)     Object size;
org/blinkenarea/Blimp/Blimp.java  635) 
org/blinkenarea/Blimp/Blimp.java  636)     //get string with current movie size
org/blinkenarea/Blimp/Blimp.java  637)     curSize = curMovie.getWidth( ) + "x" +
org/blinkenarea/Blimp/Blimp.java  638)               curMovie.getHeight( );
org/blinkenarea/Blimp/Blimp.java  639) 
org/blinkenarea/Blimp/Blimp.java  640)     //ask until cancel or answer is valid
org/blinkenarea/Blimp/Blimp.java  641)     size = curSize;
org/blinkenarea/Blimp/Blimp.java  642)     do
org/blinkenarea/Blimp/Blimp.java  643)     {
org/blinkenarea/Blimp/Blimp.java  644)       //ask for new size
org/blinkenarea/Blimp/Blimp.java  645)       size = JOptionPane.showInputDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java  646)                                           "Current movie dimension is:   " + curSize + "\n\n" +
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  647)                                           "The format is:   <width>x<height>\n\n" +
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  648)                                           "Please enter the new movie dimension:",
org/blinkenarea/Blimp/Blimp.java  649)                                           "Blimp - Scale Movie...",
org/blinkenarea/Blimp/Blimp.java  650)                                           JOptionPane.QUESTION_MESSAGE,
org/blinkenarea/Blimp/Blimp.java  651)                                           null, null, size );
org/blinkenarea/Blimp/Blimp.java  652)       //dialog was cancelled
org/blinkenarea/Blimp/Blimp.java  653)       if( size == null )
org/blinkenarea/Blimp/Blimp.java  654)         return;
org/blinkenarea/Blimp/Blimp.java  655)     }
org/blinkenarea/Blimp/Blimp.java  656)     while( ! actionEditScaleToSize( size.toString( ) ) ); //repeat question if answer not valid
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                        657)   }
Blimp.java                        658) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        659)   //"Edit Insert Frame" was chosen from menu / Insert Frame button was pressed
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        660)   private void actionEditInsertFrame( )
Blimp.java                        661)   {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  662)     BlinkenFrame newFrame;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        663)     int frameCnt, frameNo;
Blimp.java                        664) 
Blimp.java                        665)     //create new empty frame
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  666)     newFrame = new BlinkenFrame( curMovie.getHeight( ), curMovie.getWidth( ),
org/blinkenarea/Blimp/Blimp.java  667)                                  curMovie.getChannels( ), curMovie.getMaxval( ), defDuration );
org/blinkenarea/Blimp/Blimp.java  668)     newFrame.clear( );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        669)     //copy duration if there is a current frame
Blimp.java                        670)     if( curFrame != null )
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  671)       newFrame.setDuration( curFrame.getDuration( ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        672) 
Blimp.java                        673)     //insert frame behind current position
Blimp.java                        674)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                        675)     frameNo = scrollFrames.getValue( ) + 1;
Blimp.java                        676)     if( frameNo < 0 )
Blimp.java                        677)       frameNo = 0;
Blimp.java                        678)     if( frameNo > frameCnt )
Blimp.java                        679)       frameNo = frameCnt;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  680)     curMovie.insertFrame( frameNo, newFrame );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        681)     curMovieChanged = true;
Blimp.java                        682) 
Blimp.java                        683)     //update controls
Blimp.java                        684)     updateFrames( frameNo );
Blimp.java                        685)   }
Blimp.java                        686) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        687)   //"Edit Duplicate Frame" was chosen from menu / Duplicate Frame button was pressed
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        688)   private void actionEditDuplicateFrame( )
Blimp.java                        689)   {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  690)     BlinkenFrame newFrame;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        691)     int frameCnt, frameNo;
Blimp.java                        692) 
Blimp.java                        693)     //do nothing if there is no current frame
Blimp.java                        694)     if( curFrame == null )
Blimp.java                        695)       return;
Blimp.java                        696) 
Blimp.java                        697)     //duplicate current frame
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  698)     newFrame = new BlinkenFrame( curFrame );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        699) 
Blimp.java                        700)     //insert frame behind current position
Blimp.java                        701)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                        702)     frameNo = scrollFrames.getValue( ) + 1;
Blimp.java                        703)     if( frameNo < 0 )
Blimp.java                        704)       frameNo = 0;
Blimp.java                        705)     if( frameNo > frameCnt )
Blimp.java                        706)       frameNo = frameCnt;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  707)     curMovie.insertFrame( frameNo, newFrame );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        708)     curMovieChanged = true;
Blimp.java                        709) 
Blimp.java                        710)     //update controls
Blimp.java                        711)     updateFrames( frameNo );
Blimp.java                        712)   }
Blimp.java                        713) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        714)   //"Edit Delete Frame" was chosen from menu / Delete Frame button was pressed
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                        715)   private void actionEditDeleteFrame( )
Blimp.java                        716)   {
Blimp.java                        717)     int frameNo;
Blimp.java                        718) 
Blimp.java                        719)     //do nothing if there is no current frame
Blimp.java                        720)     if( curFrame == null )
Blimp.java                        721)       return;
Blimp.java                        722) 
Blimp.java                        723)     //delete current frame
Blimp.java                        724)     frameNo = scrollFrames.getValue( );
Blimp.java                        725)     curMovie.deleteFrame( frameNo );
Blimp.java                        726)     frameNo--;
Blimp.java                        727)     curMovieChanged = true;
Blimp.java                        728) 
Blimp.java                        729)     //update controls
Blimp.java                        730)     updateFrames( frameNo );
Blimp.java                        731)   }
Blimp.java                        732) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        733)   //"Edit Import Images..." was chosen from menu
Blimp.java                        734)   private void actionEditImportImages( )
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        735)   {
Blimp.java                        736)     JFileChooser fileChooser;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        737)     File files[];
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        738)     ImageIcon icon;
Blimp.java                        739)     Image image;
Blimp.java                        740)     BufferedImage bufferedImage;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  741)     BlinkenFrame newFrame;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        742)     int width, height, x, y, i, frameCnt, frameNo;
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        743) 
Blimp.java                        744)     //show file select dialog
Blimp.java                        745)     fileChooser = new JFileChooser( );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        746)     fileChooser.setDialogTitle( "Blimp - Import Images..." );
Blimp.java                        747)     fileChooser.setMultiSelectionEnabled( true );
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        748)     if( curDir != null )
Blimp.java                        749)       fileChooser.setCurrentDirectory( curDir );
Blimp.java                        750)     if( fileChooser.showOpenDialog( dialogParent ) != JFileChooser.APPROVE_OPTION ) //not successful
Blimp.java                        751)       return;
Blimp.java                        752)     //save current directory
Blimp.java                        753)     curDir = fileChooser.getCurrentDirectory( );
Blimp.java                        754) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        755)     //get selected files
Blimp.java                        756)     files = fileChooser.getSelectedFiles( );
Blimp.java                        757)     for( i = 0; i < files.length; i++ )
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        758)     {
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        759) 
Blimp.java                        760)       //load image
Blimp.java                        761)       icon = new ImageIcon( files[i].getPath( ) );
Blimp.java                        762)       if( icon == null )
Blimp.java                        763)       {
Blimp.java                        764)         labelStatus.setText( "could not import image \"" + files[i].getPath( ) +  "\"..." );
Blimp.java                        765)         break;
Blimp.java                        766)       }
Blimp.java                        767)       width = icon.getIconWidth( );
Blimp.java                        768)       height = icon.getIconHeight( );
Blimp.java                        769)       image = icon.getImage( );
Blimp.java                        770)       if( width <= 0 || height <= 0 || image == null )
Blimp.java                        771)       {
Blimp.java                        772)         labelStatus.setText( "could not import image \"" + files[i].getPath( ) +  "\"..." );
Blimp.java                        773)         break;
Blimp.java                        774)       }
Blimp.java                        775)       //convert image to a buffered one
Blimp.java                        776)       bufferedImage = new BufferedImage( width, height, BufferedImage.TYPE_INT_ARGB );
Blimp.java                        777)       bufferedImage.getGraphics( ).drawImage( image, 0, 0, width, height, null );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  778) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        779)       //create new empty frame
Stefan Schuermans added scrolling text genera...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  780)       newFrame = new BlinkenFrame( height, width, curMovie.getChannels( ),
org/blinkenarea/Blimp/Blimp.java  781)                                    curMovie.getMaxval( ), defDuration );
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  782)       height = newFrame.getHeight( ); //dimensions might have been invalid and thus been adapted
org/blinkenarea/Blimp/Blimp.java  783)       width = newFrame.getWidth( );
org/blinkenarea/Blimp/Blimp.java  784)       newFrame.clear( );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        785)       //copy duration if there is a current frame
Blimp.java                        786)       if( curFrame != null )
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  787)         newFrame.setDuration( curFrame.getDuration( ) );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  788) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        789)       //put pixels of image into frame
Blimp.java                        790)       for( y = 0; y < height; y++ )
Blimp.java                        791)         for( x = 0; x < width; x++ )
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  792)           newFrame.setColor( y, x, new Color( bufferedImage.getRGB( x, y ) ) );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  793) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        794)       //insert frame behind current position
Blimp.java                        795)       frameCnt = curMovie.getFrameCnt( );
Blimp.java                        796)       frameNo = scrollFrames.getValue( ) + 1;
Blimp.java                        797)       if( frameNo < 0 )
Blimp.java                        798)         frameNo = 0;
Blimp.java                        799)       if( frameNo > frameCnt )
Blimp.java                        800)         frameNo = frameCnt;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  801)       curMovie.insertFrame( frameNo, newFrame ); //this resizes the frame to fit the movie dimensions
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        802)       curMovieChanged = true;
Blimp.java                        803) 
Blimp.java                        804)       //show status message
Blimp.java                        805)       labelStatus.setText( "image \"" + files[i].getPath( ) +  "\" was successfully imported..." );
Blimp.java                        806) 
Blimp.java                        807)       //update controls
Blimp.java                        808)       updateFrames( frameNo );
Blimp.java                        809)     }
Blimp.java                        810)   }
Blimp.java                        811) 
Blimp.java                        812)   //"Edit Import Movie..." was chosen from menu
Blimp.java                        813)   private void actionEditImportMovie( )
Blimp.java                        814)   {
Blimp.java                        815)     JFileChooser fileChooser;
Blimp.java                        816)     BlinkenMovie movie;
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  817)     BlinkenFrame newFrame;
Christian Heimke Blimp v.1.3.1 (2006-10-17)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  818)     int frameCnt, frameNo, cnt;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        819) 
Blimp.java                        820)     //show file select dialog
Blimp.java                        821)     fileChooser = new JFileChooser( );
Blimp.java                        822)     fileChooser.setDialogTitle( "Blimp - Import Movie..." );
Christian Heimke Blimp v.1.3.1 (2006-10-17)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  823)     setFileFilters( fileChooser );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        824)     if( curDir != null )
Blimp.java                        825)       fileChooser.setCurrentDirectory( curDir );
Blimp.java                        826)     if( fileChooser.showOpenDialog( dialogParent ) != JFileChooser.APPROVE_OPTION ) //not successful
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        827)       return;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        828)     //save current directory
Blimp.java                        829)     curDir = fileChooser.getCurrentDirectory( );
Blimp.java                        830) 
Blimp.java                        831)     //load movie
Blimp.java                        832)     movie = new BlinkenMovie( 0, 0, 0, 0 );
Blimp.java                        833)     if( ! movie.load( fileChooser.getSelectedFile( ).getPath( ) ) )
Blimp.java                        834)     {
Stefan Schuermans issue warning when filename...

Stefan Schuermans authored 10 years ago

org/blinkenarea/Blimp/Blimp.java  835)       checkFilenameAndWarn( fileChooser.getSelectedFile( ).getPath( ) );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        836)       //some error
Blimp.java                        837)       labelStatus.setText( "movie \"" + fileChooser.getSelectedFile( ).getPath( ) +  "\" could not be imported..." );
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        838)     }
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        839) 
Blimp.java                        840)     //insert frames of movie behind current position
Blimp.java                        841)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                        842)     frameNo = scrollFrames.getValue( ) + 1;
Blimp.java                        843)     if( frameNo < 0 )
Blimp.java                        844)       frameNo = 0;
Blimp.java                        845)     if( frameNo > frameCnt )
Blimp.java                        846)       frameNo = frameCnt;
Blimp.java                        847)     cnt = movie.getFrameCnt( );
Christian Heimke Blimp v.1.3.1 (2006-10-17)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  848)     for( int i = 0; i < cnt; i++ )
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        849)     {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java  850)       newFrame = new BlinkenFrame( movie.getFrame( i ) );
org/blinkenarea/Blimp/Blimp.java  851)       curMovie.insertFrame( frameNo + i, newFrame ); //this resizes the frame to fit the movie dimensions
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        852)     }
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        853)     curMovieChanged = true;
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        854) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        855)     //success
Blimp.java                        856)     labelStatus.setText( "movie \"" + fileChooser.getSelectedFile( ).getPath( ) +  "\" was successfully imported..." );
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        857) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        858)     //update controls
Blimp.java                        859)     updateFrames( frameNo );
Blimp.java                        860)   }
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        861) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        862)   //"Frame-Selection Select None" was chosen from menu
Blimp.java                        863)   private void actionFrameSelNone( )
Blimp.java                        864)   {
Blimp.java                        865)     //remove frame selection
Blimp.java                        866)     frameSelStart = -1;
Blimp.java                        867)     frameSelEnd = -1;
Blimp.java                        868)     stateFrameSel( );
Blimp.java                        869)   }
Blimp.java                        870) 
Blimp.java                        871)   //"Frame-Selection Select Single Frame" was chosen from menu
Blimp.java                        872)   private void actionFrameSelSingle( )
Blimp.java                        873)   {
Blimp.java                        874)     //do nothing if there is no current frame
Blimp.java                        875)     if( curFrame == null )
Blimp.java                        876)       return;
Blimp.java                        877) 
Blimp.java                        878)     //select current frame
Blimp.java                        879)     frameSelStart = scrollFrames.getValue( );
Blimp.java                        880)     frameSelEnd = frameSelStart;
Blimp.java                        881)     stateFrameSel( );
Blimp.java                        882)   }
Blimp.java                        883) 
Blimp.java                        884)   //"Frame-Selection Start of Selection" was chosen from menu
Blimp.java                        885)   private void actionFrameSelStart( )
Blimp.java                        886)   {
Blimp.java                        887)     //do nothing if there is no current frame
Blimp.java                        888)     if( curFrame == null )
Blimp.java                        889)       return;
Blimp.java                        890) 
Blimp.java                        891)     //set start of frame selection to current frame
Blimp.java                        892)     frameSelStart = scrollFrames.getValue( );
Blimp.java                        893)     if( frameSelEnd >= curMovie.getFrameCnt( ) || frameSelEnd < frameSelStart )
Blimp.java                        894)       frameSelEnd = frameSelStart;
Blimp.java                        895)     stateFrameSel( );
Blimp.java                        896)   }
Blimp.java                        897) 
Blimp.java                        898)   //"Frame-Selection End of Selection" was chosen from menu
Blimp.java                        899)   private void actionFrameSelEnd( )
Blimp.java                        900)   {
Blimp.java                        901)     //do nothing if there is no current frame
Blimp.java                        902)     if( curFrame == null )
Blimp.java                        903)       return;
Blimp.java                        904) 
Blimp.java                        905)     //set end of frame selection to current frame
Blimp.java                        906)     frameSelEnd = scrollFrames.getValue( );
Blimp.java                        907)     if( frameSelStart < 0 || frameSelStart > frameSelEnd )
Blimp.java                        908)       frameSelStart = frameSelEnd;
Blimp.java                        909)     stateFrameSel( );
Blimp.java                        910)   }
Blimp.java                        911) 
Blimp.java                        912)   //"Frame-Selection Copy" was chosen from menu
Blimp.java                        913)   private void actionFrameSelCopy( )
Blimp.java                        914)   {
Blimp.java                        915)     int frameCnt, frameNo, cnt, i;
Blimp.java                        916) 
Blimp.java                        917)     //do nothing if selection is invalid
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        918)     frameCnt = curMovie.getFrameCnt( );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        919)     if( 0 > frameSelStart || frameSelStart > frameSelEnd || frameSelEnd >= frameCnt )
Blimp.java                        920)       return;
Blimp.java                        921) 
Blimp.java                        922)     //get copies of selected frames
Blimp.java                        923)     cnt = frameSelEnd - frameSelStart + 1;
Blimp.java                        924)     BlinkenFrame frames[] = new BlinkenFrame[cnt];
Blimp.java                        925)     for( i = 0; i < cnt; i++ )
Blimp.java                        926)       frames[i] = new BlinkenFrame( curMovie.getFrame( frameSelStart + i ) );
Blimp.java                        927) 
Blimp.java                        928)     //insert frames behind current position
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        929)     frameNo = scrollFrames.getValue( ) + 1;
Blimp.java                        930)     if( frameNo < 0 )
Blimp.java                        931)       frameNo = 0;
Blimp.java                        932)     if( frameNo > frameCnt )
Blimp.java                        933)       frameNo = frameCnt;
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        934)     for( i = 0; i < cnt; i++ )
Blimp.java                        935)       curMovie.insertFrame( frameNo + i, frames[i] );
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                        936)     curMovieChanged = true;
Blimp.java                        937) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                        938)     //update controls
Blimp.java                        939)     updateFrames( frameNo );
Blimp.java                        940) 
Blimp.java                        941)     //select newly inserted frames
Blimp.java                        942)     frameSelStart = frameNo;
Blimp.java                        943)     frameSelEnd = frameSelStart + cnt - 1;
Blimp.java                        944)     stateFrameSel( );
Blimp.java                        945)   }
Blimp.java                        946) 
Blimp.java                        947)   //"Frame-Selection Move" was chosen from menu
Blimp.java                        948)   private void actionFrameSelMove( )
Blimp.java                        949)   {
Blimp.java                        950)     int frameCnt, frameNo, cnt, i;
Blimp.java                        951) 
Blimp.java                        952)     //do nothing if selection is invalid
Blimp.java                        953)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                        954)     if( 0 > frameSelStart || frameSelStart > frameSelEnd || frameSelEnd >= frameCnt )
Blimp.java                        955)       return;
Blimp.java                        956) 
Blimp.java                        957)     //get selected frames
Blimp.java                        958)     cnt = frameSelEnd - frameSelStart + 1;
Blimp.java                        959)     BlinkenFrame frames[] = new BlinkenFrame[cnt];
Blimp.java                        960)     for( i = 0; i < cnt; i++ )
Blimp.java                        961)       frames[i] = curMovie.getFrame( frameSelStart + i );
Blimp.java                        962) 
Blimp.java                        963)     //delete selected frames
Blimp.java                        964)     for( i = 0; i < cnt; i++ )
Blimp.java                        965)       curMovie.deleteFrame( frameSelStart );
Blimp.java                        966) 
Blimp.java                        967)     //update number of frames and current position
Blimp.java                        968)     frameCnt -= cnt; //cnt frames were deleted
Blimp.java                        969)     frameNo = scrollFrames.getValue( ); //old position
Blimp.java                        970)     if( frameNo > frameSelEnd ) //was behind last frame of selection
Blimp.java                        971)       frameNo -= cnt;
Blimp.java                        972)     else if( frameNo >= frameSelStart) //was in selection
Blimp.java                        973)       frameNo = frameSelStart - 1;
Blimp.java                        974) 
Blimp.java                        975)     //insert frames behind current position
Blimp.java                        976)     frameNo++;
Blimp.java                        977)     if( frameNo < 0 )
Blimp.java                        978)       frameNo = 0;
Blimp.java                        979)     if( frameNo > frameCnt )
Blimp.java                        980)       frameNo = frameCnt;
Blimp.java                        981)     for( i = 0; i < cnt; i++ )
Blimp.java                        982)       curMovie.insertFrame( frameNo + i, frames[i] );
Blimp.java                        983)     curMovieChanged = true;
Blimp.java                        984) 
Blimp.java                        985)     //update controls
Blimp.java                        986)     updateFrames( frameNo );
Blimp.java                        987) 
Blimp.java                        988)     //select moved frames
Blimp.java                        989)     frameSelStart = frameNo;
Blimp.java                        990)     frameSelEnd = frameSelStart + cnt - 1;
Blimp.java                        991)     stateFrameSel( );
Blimp.java                        992)   }
Blimp.java                        993) 
Blimp.java                        994)   //"Frame-Selection Reverse" was chosen from menu
Blimp.java                        995)   private void actionFrameSelReverse( )
Blimp.java                        996)   {
Blimp.java                        997)     int frameCnt, frameNo, cnt, i;
Blimp.java                        998) 
Blimp.java                        999)     //do nothing if selection is invalid
Blimp.java                       1000)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                       1001)     if( 0 > frameSelStart || frameSelStart > frameSelEnd || frameSelEnd >= frameCnt )
Blimp.java                       1002)       return;
Blimp.java                       1003) 
Blimp.java                       1004)     //get selected frames
Blimp.java                       1005)     cnt = frameSelEnd - frameSelStart + 1;
Blimp.java                       1006)     BlinkenFrame frames[] = new BlinkenFrame[cnt];
Blimp.java                       1007)     for( i = 0; i < cnt; i++ )
Blimp.java                       1008)       frames[i] = curMovie.getFrame( frameSelStart + i );
Blimp.java                       1009) 
Blimp.java                       1010)     //delete selected frames
Blimp.java                       1011)     for( i = 0; i < cnt; i++ )
Blimp.java                       1012)       curMovie.deleteFrame( frameSelStart );
Blimp.java                       1013) 
Blimp.java                       1014)     //insert selected frames in reverse order
Blimp.java                       1015)     for( i = 0; i < cnt; i++ )
Blimp.java                       1016)       curMovie.insertFrame( frameSelStart, frames[i] );
Blimp.java                       1017)     curMovieChanged = true;
Blimp.java                       1018) 
Blimp.java                       1019)     //update controls - go to reversed frames
Blimp.java                       1020)     frameNo = frameSelStart;
Blimp.java                       1021)     updateFrames( frameNo );
Blimp.java                       1022) 
Blimp.java                       1023)     //select reversed frames
Blimp.java                       1024)     frameSelStart = frameNo;
Blimp.java                       1025)     frameSelEnd = frameSelStart + cnt - 1;
Blimp.java                       1026)     stateFrameSel( );
Blimp.java                       1027)   }
Blimp.java                       1028) 
Blimp.java                       1029)   //"Frame-Selection Delete" was chosen from menu
Blimp.java                       1030)   private void actionFrameSelDelete( )
Blimp.java                       1031)   {
Blimp.java                       1032)     int frameCnt, frameNo, cnt, i;
Blimp.java                       1033) 
Blimp.java                       1034)     //do nothing if selection is invalid
Blimp.java                       1035)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                       1036)     if( 0 > frameSelStart || frameSelStart > frameSelEnd || frameSelEnd >= frameCnt )
Blimp.java                       1037)       return;
Blimp.java                       1038) 
Blimp.java                       1039)     //delete selected frames
Blimp.java                       1040)     cnt = frameSelEnd - frameSelStart + 1;
Blimp.java                       1041)     for( i = 0; i < cnt; i++ )
Blimp.java                       1042)       curMovie.deleteFrame( frameSelStart );
Blimp.java                       1043)     curMovieChanged = true;
Blimp.java                       1044) 
Blimp.java                       1045)     //update number of frames and current position
Blimp.java                       1046)     frameCnt -= cnt; //cnt frames were deleted
Blimp.java                       1047)     frameNo = scrollFrames.getValue( ); //old position
Blimp.java                       1048)     if( frameNo > frameSelEnd ) //was behind last frame of selection
Blimp.java                       1049)       frameNo -= cnt;
Blimp.java                       1050)     else if( frameNo >= frameSelStart) //was in selection
Blimp.java                       1051)       frameNo = frameSelStart - 1;
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                       1052) 
Blimp.java                       1053)     //update controls
Blimp.java                       1054)     updateFrames( frameNo );
Blimp.java                       1055)   }
Blimp.java                       1056) 
Stefan Schuermans added scrolling text genera...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1057)   //"Generate Scrolling Text..." was chosen from menu
org/blinkenarea/Blimp/Blimp.java 1058)   private void actionGenScrollText( )
org/blinkenarea/Blimp/Blimp.java 1059)   {
org/blinkenarea/Blimp/Blimp.java 1060)     GraphicsEnvironment graphEnv;
org/blinkenarea/Blimp/Blimp.java 1061)     Font [] fonts;
org/blinkenarea/Blimp/Blimp.java 1062)     String [] fontNames;
org/blinkenarea/Blimp/Blimp.java 1063)     int i, width, height, x, y, frameCnt, frameNo, frameNoStart;
org/blinkenarea/Blimp/Blimp.java 1064)     int fontHeight, fontPos, textWidth, textPos;
org/blinkenarea/Blimp/Blimp.java 1065)     Object res;
org/blinkenarea/Blimp/Blimp.java 1066)     Font font, scaledFont;
org/blinkenarea/Blimp/Blimp.java 1067)     String text;
org/blinkenarea/Blimp/Blimp.java 1068)     BufferedImage imgBackgr, img;
org/blinkenarea/Blimp/Blimp.java 1069)     Graphics2D grBackgr, gr;
org/blinkenarea/Blimp/Blimp.java 1070)     float fontSize;
org/blinkenarea/Blimp/Blimp.java 1071)     FontMetrics metrics;
org/blinkenarea/Blimp/Blimp.java 1072)     BlinkenFrame frame;
org/blinkenarea/Blimp/Blimp.java 1073) 
org/blinkenarea/Blimp/Blimp.java 1074)     //do nothing if there is no current frame
org/blinkenarea/Blimp/Blimp.java 1075)     if( curFrame == null ) {
org/blinkenarea/Blimp/Blimp.java 1076)       labelStatus.setText( "Generate Scrolling Text: " +
org/blinkenarea/Blimp/Blimp.java 1077)                            "not possible withpout current frame as background..." );
org/blinkenarea/Blimp/Blimp.java 1078)       return;
org/blinkenarea/Blimp/Blimp.java 1079)     }
org/blinkenarea/Blimp/Blimp.java 1080) 
org/blinkenarea/Blimp/Blimp.java 1081)     //get available fonts and their names
org/blinkenarea/Blimp/Blimp.java 1082)     graphEnv = GraphicsEnvironment.getLocalGraphicsEnvironment( );
org/blinkenarea/Blimp/Blimp.java 1083)     fonts = graphEnv.getAllFonts( );
org/blinkenarea/Blimp/Blimp.java 1084)     fontNames = new String [fonts.length];
org/blinkenarea/Blimp/Blimp.java 1085)     for( i = 0; i < fonts.length; ++i )
org/blinkenarea/Blimp/Blimp.java 1086)       fontNames[i] = fonts[i].getFontName( );
org/blinkenarea/Blimp/Blimp.java 1087) 
org/blinkenarea/Blimp/Blimp.java 1088) 
org/blinkenarea/Blimp/Blimp.java 1089)     //let user choose a font
org/blinkenarea/Blimp/Blimp.java 1090)     res = JOptionPane.showInputDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java 1091)                                        "Please note that scrolling text" +
org/blinkenarea/Blimp/Blimp.java 1092)                                        " is one of the most boring things" +
org/blinkenarea/Blimp/Blimp.java 1093)                                        " to look at.\n\n" +
org/blinkenarea/Blimp/Blimp.java 1094)                                        "Select font:",
org/blinkenarea/Blimp/Blimp.java 1095)                                        "Blimp - Generate Scrolling Text...",
org/blinkenarea/Blimp/Blimp.java 1096)                                        JOptionPane.QUESTION_MESSAGE,
org/blinkenarea/Blimp/Blimp.java 1097)                                        null, fontNames, null );
org/blinkenarea/Blimp/Blimp.java 1098)     if( res == null ) { //exit if dialog was cancelled
org/blinkenarea/Blimp/Blimp.java 1099)       labelStatus.setText( "Generate Scrolling Text: cancelled..." );
org/blinkenarea/Blimp/Blimp.java 1100)       return;
org/blinkenarea/Blimp/Blimp.java 1101)     }
org/blinkenarea/Blimp/Blimp.java 1102) 
org/blinkenarea/Blimp/Blimp.java 1103)     //get selected font
org/blinkenarea/Blimp/Blimp.java 1104)     font = null;
org/blinkenarea/Blimp/Blimp.java 1105)     for( i = 0; i < fontNames.length; i++ ) {
org/blinkenarea/Blimp/Blimp.java 1106)       if( fontNames[i] == res ) {
org/blinkenarea/Blimp/Blimp.java 1107)         font = fonts[i];
org/blinkenarea/Blimp/Blimp.java 1108)         break;
org/blinkenarea/Blimp/Blimp.java 1109)       }
org/blinkenarea/Blimp/Blimp.java 1110)     }
org/blinkenarea/Blimp/Blimp.java 1111)     if( font == null ) { // could not get font
org/blinkenarea/Blimp/Blimp.java 1112)       labelStatus.setText( "Generate Scrolling Text: no font selected..." );
org/blinkenarea/Blimp/Blimp.java 1113)       return;
org/blinkenarea/Blimp/Blimp.java 1114)     }
org/blinkenarea/Blimp/Blimp.java 1115)     //free unused fonts
org/blinkenarea/Blimp/Blimp.java 1116)     fonts = null;
org/blinkenarea/Blimp/Blimp.java 1117)     fontNames = null;
org/blinkenarea/Blimp/Blimp.java 1118) 
org/blinkenarea/Blimp/Blimp.java 1119)     //ask user for text
org/blinkenarea/Blimp/Blimp.java 1120)     res = JOptionPane.showInputDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java 1121)                                        "Please note that scrolling text" +
org/blinkenarea/Blimp/Blimp.java 1122)                                        " is one of the most boring things" +
org/blinkenarea/Blimp/Blimp.java 1123)                                        " to look at.\n\n" +
org/blinkenarea/Blimp/Blimp.java 1124)                                        "Enter text:",
org/blinkenarea/Blimp/Blimp.java 1125)                                        "Blimp - Generate Scrolling Text...",
org/blinkenarea/Blimp/Blimp.java 1126)                                         JOptionPane.QUESTION_MESSAGE,
org/blinkenarea/Blimp/Blimp.java 1127)                                         null, null, "" );
org/blinkenarea/Blimp/Blimp.java 1128)     if( res == null ) { //exit if dialog was cancelled
org/blinkenarea/Blimp/Blimp.java 1129)       labelStatus.setText( "Generate Scrolling Text: cancelled..." );
org/blinkenarea/Blimp/Blimp.java 1130)       return;
org/blinkenarea/Blimp/Blimp.java 1131)     }
org/blinkenarea/Blimp/Blimp.java 1132)     text = res.toString( );
org/blinkenarea/Blimp/Blimp.java 1133)     if( text.length( ) == 0 ) { //exit if no text was entered
org/blinkenarea/Blimp/Blimp.java 1134)       labelStatus.setText( "Generate Scrolling Text: no text entered..." );
org/blinkenarea/Blimp/Blimp.java 1135)       return;
org/blinkenarea/Blimp/Blimp.java 1136)     }
org/blinkenarea/Blimp/Blimp.java 1137) 
org/blinkenarea/Blimp/Blimp.java 1138)     //get current frame as buffered image to use as background
org/blinkenarea/Blimp/Blimp.java 1139)     width = curFrame.getWidth( );
org/blinkenarea/Blimp/Blimp.java 1140)     height = curFrame.getHeight( );
org/blinkenarea/Blimp/Blimp.java 1141)     imgBackgr = new BufferedImage( width, height, BufferedImage.TYPE_INT_ARGB );
org/blinkenarea/Blimp/Blimp.java 1142)     for( y = 0; y < height; y++ )
org/blinkenarea/Blimp/Blimp.java 1143)       for( x = 0; x < width; x++ )
org/blinkenarea/Blimp/Blimp.java 1144)         imgBackgr.setRGB( x, y, curFrame.getColor( y, x ).getRGB( ) );
org/blinkenarea/Blimp/Blimp.java 1145) 
org/blinkenarea/Blimp/Blimp.java 1146)     //adapt font size until height matches frame
org/blinkenarea/Blimp/Blimp.java 1147)     grBackgr = imgBackgr.createGraphics( );
org/blinkenarea/Blimp/Blimp.java 1148)     fontSize = 1.0f;
org/blinkenarea/Blimp/Blimp.java 1149)     while( true ) {
org/blinkenarea/Blimp/Blimp.java 1150)       scaledFont = font.deriveFont( fontSize );
org/blinkenarea/Blimp/Blimp.java 1151)       metrics = grBackgr.getFontMetrics( scaledFont );
org/blinkenarea/Blimp/Blimp.java 1152)       fontHeight = metrics.getAscent( ) +
org/blinkenarea/Blimp/Blimp.java 1153)                    metrics.getDescent( ) +
org/blinkenarea/Blimp/Blimp.java 1154)                    metrics.getLeading( );
org/blinkenarea/Blimp/Blimp.java 1155)       if( fontHeight == height )
org/blinkenarea/Blimp/Blimp.java 1156)         break;
org/blinkenarea/Blimp/Blimp.java 1157)       else if( fontHeight <= 0 )
org/blinkenarea/Blimp/Blimp.java 1158)         fontSize *= 100.0f;
org/blinkenarea/Blimp/Blimp.java 1159)       else
org/blinkenarea/Blimp/Blimp.java 1160)         fontSize *= (float)height / (float)fontHeight;
org/blinkenarea/Blimp/Blimp.java 1161)     }
org/blinkenarea/Blimp/Blimp.java 1162) 
org/blinkenarea/Blimp/Blimp.java 1163)     //get position where to insert frames
org/blinkenarea/Blimp/Blimp.java 1164)     frameCnt = curMovie.getFrameCnt( );
org/blinkenarea/Blimp/Blimp.java 1165)     frameNoStart = scrollFrames.getValue( ) + 1;
org/blinkenarea/Blimp/Blimp.java 1166)     if( frameNoStart < 0 )
org/blinkenarea/Blimp/Blimp.java 1167)       frameNoStart = 0;
org/blinkenarea/Blimp/Blimp.java 1168)     if( frameNoStart > frameCnt )
org/blinkenarea/Blimp/Blimp.java 1169)       frameNoStart = frameCnt;
org/blinkenarea/Blimp/Blimp.java 1170) 
org/blinkenarea/Blimp/Blimp.java 1171)     //render scrolling text on top of backround image
org/blinkenarea/Blimp/Blimp.java 1172)     fontPos = metrics.getAscent( ) + metrics.getLeading( ) / 2;
org/blinkenarea/Blimp/Blimp.java 1173)     textWidth = metrics.charsWidth( text.toCharArray( ), 0, text.length( ) );
org/blinkenarea/Blimp/Blimp.java 1174)     frameNo = frameNoStart;
org/blinkenarea/Blimp/Blimp.java 1175)     for( textPos = width; textPos >= -textWidth ; textPos-- ) {
org/blinkenarea/Blimp/Blimp.java 1176) 
org/blinkenarea/Blimp/Blimp.java 1177)       //duplicate background and render text onto it
org/blinkenarea/Blimp/Blimp.java 1178)       img = new BufferedImage( imgBackgr.getColorModel( ),
org/blinkenarea/Blimp/Blimp.java 1179)                                imgBackgr.copyData( null ),
org/blinkenarea/Blimp/Blimp.java 1180)                                imgBackgr.getColorModel( ).isAlphaPremultiplied( ),
org/blinkenarea/Blimp/Blimp.java 1181)                                null );
org/blinkenarea/Blimp/Blimp.java 1182)       gr = img.createGraphics( );
org/blinkenarea/Blimp/Blimp.java 1183)       gr.setColor( frameEditor.getColor( ) );
org/blinkenarea/Blimp/Blimp.java 1184)       gr.setFont( scaledFont );
org/blinkenarea/Blimp/Blimp.java 1185)       gr.setRenderingHint( RenderingHints.KEY_ANTIALIASING,
org/blinkenarea/Blimp/Blimp.java 1186)                            RenderingHints.VALUE_ANTIALIAS_ON );
org/blinkenarea/Blimp/Blimp.java 1187)       gr.drawString( text, textPos, fontPos );
org/blinkenarea/Blimp/Blimp.java 1188) 
org/blinkenarea/Blimp/Blimp.java 1189)       //convert image to BlinkenFrame and intert it into movie
org/blinkenarea/Blimp/Blimp.java 1190)       frame = new BlinkenFrame( height, width,
org/blinkenarea/Blimp/Blimp.java 1191)                                 curFrame.getChannels( ),
org/blinkenarea/Blimp/Blimp.java 1192)                                 curFrame.getMaxval( ),
org/blinkenarea/Blimp/Blimp.java 1193)                                 curFrame.getDuration( ) );
org/blinkenarea/Blimp/Blimp.java 1194)       for( y = 0; y < height; y++ )
org/blinkenarea/Blimp/Blimp.java 1195)         for( x = 0; x < width; x++ )
org/blinkenarea/Blimp/Blimp.java 1196)           frame.setColor( y, x, new Color( img.getRGB( x, y ) ) );
org/blinkenarea/Blimp/Blimp.java 1197)       curMovie.insertFrame( frameNo, frame );
org/blinkenarea/Blimp/Blimp.java 1198)       frameNo++;
org/blinkenarea/Blimp/Blimp.java 1199) 
org/blinkenarea/Blimp/Blimp.java 1200)     }
org/blinkenarea/Blimp/Blimp.java 1201)     curMovieChanged = true;
org/blinkenarea/Blimp/Blimp.java 1202) 
org/blinkenarea/Blimp/Blimp.java 1203)     //update controls
org/blinkenarea/Blimp/Blimp.java 1204)     updateFrames( frameSelStart );
org/blinkenarea/Blimp/Blimp.java 1205)     //select newly inserted frames
org/blinkenarea/Blimp/Blimp.java 1206)     frameSelStart = frameNoStart;
org/blinkenarea/Blimp/Blimp.java 1207)     frameSelEnd = frameNo - 1;
org/blinkenarea/Blimp/Blimp.java 1208)     stateFrameSel( );
org/blinkenarea/Blimp/Blimp.java 1209) 
org/blinkenarea/Blimp/Blimp.java 1210)     labelStatus.setText( "Generate Scrolling Text: generated frames inserted..." );
org/blinkenarea/Blimp/Blimp.java 1211)   }
org/blinkenarea/Blimp/Blimp.java 1212) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1213)   //"Play Start" was chosen from menu
Blimp.java                       1214)   private void actionPlayStart( )
Blimp.java                       1215)   {
Blimp.java                       1216)     //select no tool
Blimp.java                       1217)     buttonToolsNone.setSelected( true );
Blimp.java                       1218)     frameEditor.setTool( BlinkenFrameEditor.toolNone );
Blimp.java                       1219) 
Blimp.java                       1220)     //disable start, enable stop
Blimp.java                       1221)     menuPlayStart.setEnabled( false );
Blimp.java                       1222)     menuPlayStop.setEnabled( true );
Blimp.java                       1223) 
Blimp.java                       1224)     //stop old play timer
Blimp.java                       1225)     timerPlay.stop( );
Blimp.java                       1226) 
Blimp.java                       1227)     //if play shall start from beginning
Blimp.java                       1228)     if( menuPlayBegin.getState( ) )
Blimp.java                       1229)     {
Blimp.java                       1230)       //show first frame
Blimp.java                       1231)       if( scrollFrames.getValue( ) != 0 ) //value changes
Blimp.java                       1232)         scrollFrames.setValue( 0 ); //play timer will be started again when frame is being shown by scrollbar callback
Blimp.java                       1233)       else //value does not change
Blimp.java                       1234)         stateFrames( ); //value does not change, no event will be sent, execute callback by hand
Blimp.java                       1235)     }
Blimp.java                       1236) 
Blimp.java                       1237)     //start play timer
Blimp.java                       1238)     if( curFrame == null )
Blimp.java                       1239)       timerPlay.setInitialDelay( 100 ); //use 100ms as default
Blimp.java                       1240)     else
Blimp.java                       1241)       timerPlay.setInitialDelay( curFrame.getDuration( ) );
Blimp.java                       1242)     timerPlay.restart( );
Blimp.java                       1243)   }
Blimp.java                       1244) 
Blimp.java                       1245)   //"Play Stop" was chosen from menu
Blimp.java                       1246)   private void actionPlayStop( )
Blimp.java                       1247)   {
Blimp.java                       1248)     //stop play timer
Blimp.java                       1249)     timerPlay.stop( );
Blimp.java                       1250) 
Blimp.java                       1251)     //enable start, disable stop
Blimp.java                       1252)     menuPlayStart.setEnabled( true );
Blimp.java                       1253)     menuPlayStop.setEnabled( false );
Blimp.java                       1254)   }
Blimp.java                       1255) 
Blimp.java                       1256)   //play timer elapsed
Blimp.java                       1257)   private void actionPlayTimer( )
Blimp.java                       1258)   {
Blimp.java                       1259)     int frameCnt, frameNoOld, frameNoNew;
Blimp.java                       1260) 
Blimp.java                       1261)     //stop play timer
Blimp.java                       1262)     timerPlay.stop( );
Blimp.java                       1263) 
Blimp.java                       1264)     //get number of next frame
Blimp.java                       1265)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                       1266)     frameNoOld = scrollFrames.getValue( );
Blimp.java                       1267)     frameNoNew = frameNoOld + 1;
Blimp.java                       1268)     if( frameNoNew >= frameCnt )
Blimp.java                       1269)     {
Blimp.java                       1270)       frameNoNew = 0;
Blimp.java                       1271)       //stop playing if looping is not requested
Blimp.java                       1272)       if( ! menuPlayLoop.getState( ) )
Blimp.java                       1273)       {
Blimp.java                       1274)         //enable start, disable stop
Blimp.java                       1275)         menuPlayStart.setEnabled( true );
Blimp.java                       1276)         menuPlayStop.setEnabled( false );
Blimp.java                       1277)         return;
Blimp.java                       1278)       }
Blimp.java                       1279)     }
Blimp.java                       1280) 
Blimp.java                       1281)     //show next frame
Blimp.java                       1282)     if( frameNoNew != frameNoOld ) //value changes
Blimp.java                       1283)       scrollFrames.setValue( frameNoNew ); //play timer will be started again when frame is being shown by scrollbar callback
Blimp.java                       1284)     else //value does not change
Blimp.java                       1285)       stateFrames( ); //value does not change, no event will be sent, execute callback by hand
Blimp.java                       1286)   }
Blimp.java                       1287) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1288)   //"Output None" was chosen from menu
org/blinkenarea/Blimp/Blimp.java 1289)   private void actionOutputNone( )
org/blinkenarea/Blimp/Blimp.java 1290)   {
org/blinkenarea/Blimp/Blimp.java 1291)     //stop output timer
org/blinkenarea/Blimp/Blimp.java 1292)     timerOut.stop( );
org/blinkenarea/Blimp/Blimp.java 1293) 
org/blinkenarea/Blimp/Blimp.java 1294)     //close MCUF output
org/blinkenarea/Blimp/Blimp.java 1295)     if( outMcufSock != null ) {
org/blinkenarea/Blimp/Blimp.java 1296)       outMcufSock.close( );
org/blinkenarea/Blimp/Blimp.java 1297)       outMcufSock = null;
org/blinkenarea/Blimp/Blimp.java 1298)     }
org/blinkenarea/Blimp/Blimp.java 1299) 
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 1300)     //close MCUF file output
org/blinkenarea/Blimp/Blimp.java 1301)     if( outMcufFile != null ) {
org/blinkenarea/Blimp/Blimp.java 1302)       try
org/blinkenarea/Blimp/Blimp.java 1303)       {
org/blinkenarea/Blimp/Blimp.java 1304)         outMcufFile.close( );
org/blinkenarea/Blimp/Blimp.java 1305)       }
org/blinkenarea/Blimp/Blimp.java 1306)       catch( java.io.IOException e )
org/blinkenarea/Blimp/Blimp.java 1307)       {
org/blinkenarea/Blimp/Blimp.java 1308)       }
org/blinkenarea/Blimp/Blimp.java 1309)       outMcufFile = null;
org/blinkenarea/Blimp/Blimp.java 1310)     }
org/blinkenarea/Blimp/Blimp.java 1311) 
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1312)     //close FlexiPix output
org/blinkenarea/Blimp/Blimp.java 1313)     if( outFlexiPixDisplay != null )
org/blinkenarea/Blimp/Blimp.java 1314)       outFlexiPixDisplay = null;
org/blinkenarea/Blimp/Blimp.java 1315) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1316)     //set status to no output
org/blinkenarea/Blimp/Blimp.java 1317)     menuOutputNone.setSelected( true );
org/blinkenarea/Blimp/Blimp.java 1318)     labelStatus.setText( "output turned off..." );
org/blinkenarea/Blimp/Blimp.java 1319)   }
org/blinkenarea/Blimp/Blimp.java 1320) 
org/blinkenarea/Blimp/Blimp.java 1321)   //"Output Mcuf" was chosen from menu
org/blinkenarea/Blimp/Blimp.java 1322)   private void actionOutputMcuf( )
org/blinkenarea/Blimp/Blimp.java 1323)   {
org/blinkenarea/Blimp/Blimp.java 1324)     Object dest;
org/blinkenarea/Blimp/Blimp.java 1325)     Pattern destPattern;
org/blinkenarea/Blimp/Blimp.java 1326)     Matcher destMatcher;
org/blinkenarea/Blimp/Blimp.java 1327)     String hostname;
org/blinkenarea/Blimp/Blimp.java 1328)     int port;
org/blinkenarea/Blimp/Blimp.java 1329)     InetAddress host;
org/blinkenarea/Blimp/Blimp.java 1330)     DatagramSocket sock;
org/blinkenarea/Blimp/Blimp.java 1331) 
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1332)     //reset outputs
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1333)     actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1334) 
org/blinkenarea/Blimp/Blimp.java 1335)     //ask for destination address
org/blinkenarea/Blimp/Blimp.java 1336)     dest = JOptionPane.showInputDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java 1337)                                         "Please enter the UDP destination port for the MCUF stream:\n\n" +
org/blinkenarea/Blimp/Blimp.java 1338)                                         "The format is: <IP>:<port>\n",
org/blinkenarea/Blimp/Blimp.java 1339)                                         "Blimp - Output MCUF...",
org/blinkenarea/Blimp/Blimp.java 1340)                                         JOptionPane.QUESTION_MESSAGE,
org/blinkenarea/Blimp/Blimp.java 1341)                                         null, null, outMcufDest );
org/blinkenarea/Blimp/Blimp.java 1342)     if( dest == null )
org/blinkenarea/Blimp/Blimp.java 1343)     {
org/blinkenarea/Blimp/Blimp.java 1344)       //dialog was cancelled -> turn off output
org/blinkenarea/Blimp/Blimp.java 1345)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1346)       labelStatus.setText( "MCUF output: cancelled..." );
org/blinkenarea/Blimp/Blimp.java 1347)       return;
org/blinkenarea/Blimp/Blimp.java 1348)     }
org/blinkenarea/Blimp/Blimp.java 1349) 
org/blinkenarea/Blimp/Blimp.java 1350)     //parse IP:port
org/blinkenarea/Blimp/Blimp.java 1351)     destPattern = Pattern.compile( "^([-.a-zA-Z0-9]+):([0-9]+)$" );
org/blinkenarea/Blimp/Blimp.java 1352) 
org/blinkenarea/Blimp/Blimp.java 1353)     //check format
org/blinkenarea/Blimp/Blimp.java 1354)     if( ! (destMatcher = destPattern.matcher( dest.toString( ) )).find( ) )
org/blinkenarea/Blimp/Blimp.java 1355)     {
org/blinkenarea/Blimp/Blimp.java 1356)       //invalid format -> turn off output
org/blinkenarea/Blimp/Blimp.java 1357)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1358)       labelStatus.setText( "MCUF output: invalid destination \"" + dest + "\" ..." );
org/blinkenarea/Blimp/Blimp.java 1359)       return;
org/blinkenarea/Blimp/Blimp.java 1360)     }
org/blinkenarea/Blimp/Blimp.java 1361)     hostname = destMatcher.group( 1 );
org/blinkenarea/Blimp/Blimp.java 1362)     port = Integer.parseInt( destMatcher.group( 2 ) );
org/blinkenarea/Blimp/Blimp.java 1363) 
org/blinkenarea/Blimp/Blimp.java 1364)     //resolve hostname
org/blinkenarea/Blimp/Blimp.java 1365)     try
org/blinkenarea/Blimp/Blimp.java 1366)     {
org/blinkenarea/Blimp/Blimp.java 1367)       host = InetAddress.getByName( hostname );
org/blinkenarea/Blimp/Blimp.java 1368)     }
org/blinkenarea/Blimp/Blimp.java 1369)     catch( UnknownHostException e )
org/blinkenarea/Blimp/Blimp.java 1370)     {
org/blinkenarea/Blimp/Blimp.java 1371)       //unknown hostname -> turn off output
org/blinkenarea/Blimp/Blimp.java 1372)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1373)       labelStatus.setText( "MCUF output: unknown hostname \"" + hostname + "\" ..." );
org/blinkenarea/Blimp/Blimp.java 1374)       return;
org/blinkenarea/Blimp/Blimp.java 1375)     }
org/blinkenarea/Blimp/Blimp.java 1376) 
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1377)     //create socket
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1378)     try
org/blinkenarea/Blimp/Blimp.java 1379)     {
org/blinkenarea/Blimp/Blimp.java 1380)       sock = new DatagramSocket( );
org/blinkenarea/Blimp/Blimp.java 1381)     }
org/blinkenarea/Blimp/Blimp.java 1382)     catch( SocketException e )
org/blinkenarea/Blimp/Blimp.java 1383)     {
org/blinkenarea/Blimp/Blimp.java 1384)       //cannot create socket -> turn off output
org/blinkenarea/Blimp/Blimp.java 1385)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1386)       labelStatus.setText( "MCUF output: cannot create socket..." );
org/blinkenarea/Blimp/Blimp.java 1387)       return;
org/blinkenarea/Blimp/Blimp.java 1388)     }
org/blinkenarea/Blimp/Blimp.java 1389) 
org/blinkenarea/Blimp/Blimp.java 1390)     //remember new destination, host, port, socket
org/blinkenarea/Blimp/Blimp.java 1391)     outMcufDest = dest.toString( );
org/blinkenarea/Blimp/Blimp.java 1392)     outMcufHost = host;
org/blinkenarea/Blimp/Blimp.java 1393)     outMcufPort = port;
org/blinkenarea/Blimp/Blimp.java 1394)     outMcufSock = sock;
org/blinkenarea/Blimp/Blimp.java 1395) 
org/blinkenarea/Blimp/Blimp.java 1396)     //set status to MCUF output
org/blinkenarea/Blimp/Blimp.java 1397)     menuOutputMcuf.setSelected( true );
org/blinkenarea/Blimp/Blimp.java 1398)     labelStatus.setText( "MCUF output to \"" + dest + "\" ..." );
org/blinkenarea/Blimp/Blimp.java 1399) 
org/blinkenarea/Blimp/Blimp.java 1400)     //output current frame
org/blinkenarea/Blimp/Blimp.java 1401)     outFrame( );
org/blinkenarea/Blimp/Blimp.java 1402)   }
org/blinkenarea/Blimp/Blimp.java 1403) 
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 1404)   //"Output Mcuf file/device" was chosen from menu
org/blinkenarea/Blimp/Blimp.java 1405)   private void actionOutputMcufFile( )
org/blinkenarea/Blimp/Blimp.java 1406)   {
org/blinkenarea/Blimp/Blimp.java 1407)     Object fileDevice;
org/blinkenarea/Blimp/Blimp.java 1408)     String fileName;
org/blinkenarea/Blimp/Blimp.java 1409)     FileOutputStream file;
org/blinkenarea/Blimp/Blimp.java 1410) 
org/blinkenarea/Blimp/Blimp.java 1411)     //reset outputs
org/blinkenarea/Blimp/Blimp.java 1412)     actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1413) 
org/blinkenarea/Blimp/Blimp.java 1414)     //ask for file/device name
org/blinkenarea/Blimp/Blimp.java 1415)     fileDevice = JOptionPane.showInputDialog( dialogParent,
org/blinkenarea/Blimp/Blimp.java 1416)                                               "Please enter the file/device name for the MCUF data:\n",
org/blinkenarea/Blimp/Blimp.java 1417)                                               "Blimp - Output MCUF file/device...",
org/blinkenarea/Blimp/Blimp.java 1418)                                               JOptionPane.QUESTION_MESSAGE,
org/blinkenarea/Blimp/Blimp.java 1419)                                               null, null, outMcufFileName );
org/blinkenarea/Blimp/Blimp.java 1420)     if( fileDevice == null )
org/blinkenarea/Blimp/Blimp.java 1421)     {
org/blinkenarea/Blimp/Blimp.java 1422)       //dialog was cancelled -> turn off output
org/blinkenarea/Blimp/Blimp.java 1423)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1424)       labelStatus.setText( "MCUF file/device output: cancelled..." );
org/blinkenarea/Blimp/Blimp.java 1425)       return;
org/blinkenarea/Blimp/Blimp.java 1426)     }
org/blinkenarea/Blimp/Blimp.java 1427)     fileName = fileDevice.toString( );
org/blinkenarea/Blimp/Blimp.java 1428) 
org/blinkenarea/Blimp/Blimp.java 1429)     //open file/device
org/blinkenarea/Blimp/Blimp.java 1430)     try
org/blinkenarea/Blimp/Blimp.java 1431)     {
org/blinkenarea/Blimp/Blimp.java 1432)       file = new FileOutputStream( fileName );
org/blinkenarea/Blimp/Blimp.java 1433)     }
org/blinkenarea/Blimp/Blimp.java 1434)     catch( FileNotFoundException e )
org/blinkenarea/Blimp/Blimp.java 1435)     {
org/blinkenarea/Blimp/Blimp.java 1436)       //cannot open file -> turn off output
org/blinkenarea/Blimp/Blimp.java 1437)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1438)       labelStatus.setText( "MCUF file/device output: cannot open file \"" + fileName + "\"..." );
org/blinkenarea/Blimp/Blimp.java 1439)       return;
org/blinkenarea/Blimp/Blimp.java 1440)     }
org/blinkenarea/Blimp/Blimp.java 1441)     catch( SecurityException e )
org/blinkenarea/Blimp/Blimp.java 1442)     {
org/blinkenarea/Blimp/Blimp.java 1443)       //not allowed to open file -> turn off output
org/blinkenarea/Blimp/Blimp.java 1444)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1445)       labelStatus.setText( "MCUF file/device output: no poermission to open file \"" + fileName + "\"..." );
org/blinkenarea/Blimp/Blimp.java 1446)       return;
org/blinkenarea/Blimp/Blimp.java 1447)     }
org/blinkenarea/Blimp/Blimp.java 1448) 
org/blinkenarea/Blimp/Blimp.java 1449)     //remember new file name and file
org/blinkenarea/Blimp/Blimp.java 1450)     outMcufFileName = fileName;
org/blinkenarea/Blimp/Blimp.java 1451)     outMcufFile = file;
org/blinkenarea/Blimp/Blimp.java 1452) 
org/blinkenarea/Blimp/Blimp.java 1453)     //set status to MCUF file/device output
org/blinkenarea/Blimp/Blimp.java 1454)     menuOutputMcufFile.setSelected( true );
org/blinkenarea/Blimp/Blimp.java 1455)     labelStatus.setText( "MCUF file/device output to \"" + fileName + "\" ..." );
org/blinkenarea/Blimp/Blimp.java 1456) 
org/blinkenarea/Blimp/Blimp.java 1457)     //output current frame
org/blinkenarea/Blimp/Blimp.java 1458)     outFrame( );
org/blinkenarea/Blimp/Blimp.java 1459)   }
org/blinkenarea/Blimp/Blimp.java 1460) 
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1461)   //"Output FlexiPix" was chosen from menu
org/blinkenarea/Blimp/Blimp.java 1462)   private void actionOutputFlexiPix( )
org/blinkenarea/Blimp/Blimp.java 1463)   {
org/blinkenarea/Blimp/Blimp.java 1464)     JFileChooser fileChooser;
org/blinkenarea/Blimp/Blimp.java 1465)     String cfgFile;
org/blinkenarea/Blimp/Blimp.java 1466) 
org/blinkenarea/Blimp/Blimp.java 1467)     //reset outputs
org/blinkenarea/Blimp/Blimp.java 1468)     actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1469) 
org/blinkenarea/Blimp/Blimp.java 1470)     //ask for config file
org/blinkenarea/Blimp/Blimp.java 1471)     fileChooser = new JFileChooser( );
org/blinkenarea/Blimp/Blimp.java 1472)     fileChooser.setDialogTitle( "Blimp - Output FlexiPix..." );
org/blinkenarea/Blimp/Blimp.java 1473)     if( outFlexiPixCurDir != null )
org/blinkenarea/Blimp/Blimp.java 1474)       fileChooser.setCurrentDirectory( outFlexiPixCurDir );
org/blinkenarea/Blimp/Blimp.java 1475)     if( fileChooser.showOpenDialog( dialogParent ) != JFileChooser.APPROVE_OPTION )
org/blinkenarea/Blimp/Blimp.java 1476)       return;
org/blinkenarea/Blimp/Blimp.java 1477)     //save current directory and current file
org/blinkenarea/Blimp/Blimp.java 1478)     outFlexiPixCurDir = fileChooser.getCurrentDirectory( );
org/blinkenarea/Blimp/Blimp.java 1479)     outFlexiPixCurFile = fileChooser.getSelectedFile( );
org/blinkenarea/Blimp/Blimp.java 1480)     cfgFile = outFlexiPixCurFile.getPath( );
org/blinkenarea/Blimp/Blimp.java 1481) 
org/blinkenarea/Blimp/Blimp.java 1482)     //create FlexiPix display
org/blinkenarea/Blimp/Blimp.java 1483)     try
org/blinkenarea/Blimp/Blimp.java 1484)     {
org/blinkenarea/Blimp/Blimp.java 1485)       outFlexiPixDisplay = new org.blinkenarea.JFlexiPix.Display( cfgFile, null );
org/blinkenarea/Blimp/Blimp.java 1486)     }
org/blinkenarea/Blimp/Blimp.java 1487)     catch( Exception e )
org/blinkenarea/Blimp/Blimp.java 1488)     {
org/blinkenarea/Blimp/Blimp.java 1489)       //cannot create display -> turn off output
org/blinkenarea/Blimp/Blimp.java 1490)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 1491)       labelStatus.setText( "FlexiPix output: cannot create display: " + e.getMessage( ) );
org/blinkenarea/Blimp/Blimp.java 1492)       return;
org/blinkenarea/Blimp/Blimp.java 1493)     }
org/blinkenarea/Blimp/Blimp.java 1494) 
org/blinkenarea/Blimp/Blimp.java 1495)     //set status to FlexiPix output
org/blinkenarea/Blimp/Blimp.java 1496)     menuOutputFlexiPix.setSelected( true );
org/blinkenarea/Blimp/Blimp.java 1497)     labelStatus.setText( "FlexiPix output using \"" + cfgFile + "\" ..." );
org/blinkenarea/Blimp/Blimp.java 1498) 
org/blinkenarea/Blimp/Blimp.java 1499)     //output current frame
org/blinkenarea/Blimp/Blimp.java 1500)     outFrame( );
org/blinkenarea/Blimp/Blimp.java 1501)   }
org/blinkenarea/Blimp/Blimp.java 1502) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1503)   //output timer elapsed
org/blinkenarea/Blimp/Blimp.java 1504)   private void actionOutTimer( )
org/blinkenarea/Blimp/Blimp.java 1505)   {
org/blinkenarea/Blimp/Blimp.java 1506)     //output current frame
org/blinkenarea/Blimp/Blimp.java 1507)     outFrame( );
org/blinkenarea/Blimp/Blimp.java 1508)   }
org/blinkenarea/Blimp/Blimp.java 1509) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1510)   //"Help About" was chosen from menu
Blimp.java                       1511)   private void actionHelpAbout( )
Blimp.java                       1512)   {
Blimp.java                       1513)     JOptionPane.showMessageDialog( dialogParent,
Blimp.java                       1514)                                    "BlinkenLightsInteractiveMovieProgram\n" +
Stefan Schuermans version available in class...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1515)                                    String.format( "version %d.%d.%d\n", Version.Major, Version.Minor, Version.Revision ) +
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 1516)                                    "Copyright (C) 2004-2013: Stefan Schuermans <stefan@blinkenarea.org>\n" +
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1517)                                    "Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" +
Stefan Schuermans show BlinkenLibJava version...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1518)                                    "a blinkenarea.org project\n\n" +
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1519)                                    String.format( "contains BlinkenLibJava %d.%d.%d\n",
Stefan Schuermans show BlinkenLibJava version...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1520)                                                   org.blinkenarea.BlinkenLib.Version.Major,
org/blinkenarea/Blimp/Blimp.java 1521)                                                   org.blinkenarea.BlinkenLib.Version.Minor,
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1522)                                                   org.blinkenarea.BlinkenLib.Version.Revision ) +
org/blinkenarea/Blimp/Blimp.java 1523)                                    String.format( "contains JFlexiPix %d.%d.%d\n",
org/blinkenarea/Blimp/Blimp.java 1524)                                                   org.blinkenarea.JFlexiPix.Version.Major,
org/blinkenarea/Blimp/Blimp.java 1525)                                                   org.blinkenarea.JFlexiPix.Version.Minor,
org/blinkenarea/Blimp/Blimp.java 1526)                                                   org.blinkenarea.JFlexiPix.Version.Revision ),
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1527)                                    "Blimp - About...",
Blimp.java                       1528)                                    JOptionPane.INFORMATION_MESSAGE );
Blimp.java                       1529)   }
Blimp.java                       1530) 
Blimp.java                       1531)   //update frames controls (and go to certaint frame)
Blimp.java                       1532)   private void updateFrames( int frameNo )
Blimp.java                       1533)   {
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1534)     int frameCnt;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1535) 
Blimp.java                       1536)     //update frames scrollbar range
Blimp.java                       1537)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                       1538)     if( frameCnt <= 0 )
Blimp.java                       1539)     {
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1540)       frameNo = 0;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1541)       scrollFrames.setValues( 0, 0, 0, 0 );
Blimp.java                       1542)     }
Blimp.java                       1543)     else
Blimp.java                       1544)     {
Blimp.java                       1545)       if( frameNo < 0 )
Blimp.java                       1546)         frameNo = 0;
Blimp.java                       1547)       if( frameNo >= frameCnt )
Blimp.java                       1548)         frameNo = frameCnt - 1;
Blimp.java                       1549)       scrollFrames.setValues( frameNo, 1, 0, frameCnt );
Blimp.java                       1550)     }
Blimp.java                       1551) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1552)     //select no frames
Blimp.java                       1553)     frameSelStart = -1;
Blimp.java                       1554)     frameSelEnd = -1;
Blimp.java                       1555)     stateFrameSel( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1556) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1557)     //enable/disable some menu commands and buttons which need a current frame
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1558)     menuEditDuplicateFrame.setEnabled( frameCnt > 0 );
Blimp.java                       1559)     menuEditDeleteFrame.setEnabled( frameCnt > 0 );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1560)     buttonEditDuplicateFrame.setEnabled( frameCnt > 0 );
Blimp.java                       1561)     buttonEditDeleteFrame.setEnabled( frameCnt > 0 );
Blimp.java                       1562)     menuFrameSelSingle.setEnabled( frameCnt > 0 );
Blimp.java                       1563)     menuFrameSelStart.setEnabled( frameCnt > 0 );
Blimp.java                       1564)     menuFrameSelEnd.setEnabled( frameCnt > 0 );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1565)   }
Blimp.java                       1566) 
Blimp.java                       1567)   //frames scrollbar changed
Blimp.java                       1568)   private void stateFrames( )
Blimp.java                       1569)   {
Blimp.java                       1570)     int frameCnt, frameNo;
Blimp.java                       1571) 
Blimp.java                       1572)     //update frames scrollbar label
Blimp.java                       1573)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                       1574)     if( frameCnt <= 0 )
Blimp.java                       1575)     {
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1576)       frameNo = 0;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1577)       labelFrames.setText( "frame: -/0" );
Blimp.java                       1578)       curFrame = null;
Blimp.java                       1579)     }
Blimp.java                       1580)     else
Blimp.java                       1581)     {
Blimp.java                       1582)       frameNo = scrollFrames.getValue( );
Blimp.java                       1583)       labelFrames.setText( "frame: " + (frameNo + 1) + "/" + frameCnt );
Blimp.java                       1584)       curFrame = curMovie.getFrame( frameNo );
Blimp.java                       1585)     }
Blimp.java                       1586) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1587)     //update selected frames label
Blimp.java                       1588)     if( 0 > frameSelStart || frameSelStart > frameSelEnd || frameSelEnd >= frameCnt )
Blimp.java                       1589)       labelSelFrames.setText( "selected: -/-" );
Blimp.java                       1590)     else if( frameSelStart > frameNo )
Blimp.java                       1591)       labelSelFrames.setText( "selected: -/" + (frameSelEnd - frameSelStart + 1) );
Blimp.java                       1592)     else if( frameNo > frameSelEnd )
Blimp.java                       1593)       labelSelFrames.setText( "selected: +/" + (frameSelEnd - frameSelStart + 1) );
Blimp.java                       1594)     else
Blimp.java                       1595)       labelSelFrames.setText( "selected: " + (frameNo - frameSelStart + 1) + "/" + (frameSelEnd - frameSelStart + 1) );
Blimp.java                       1596) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1597)     //update frame
Blimp.java                       1598)     frameEditor.setFrame( curFrame );
Blimp.java                       1599) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1600)     //output new frame
org/blinkenarea/Blimp/Blimp.java 1601)     outFrame( );
org/blinkenarea/Blimp/Blimp.java 1602) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1603)     //show duration
Blimp.java                       1604)     showDuration( );
Blimp.java                       1605) 
Blimp.java                       1606)     //if currently playing
Blimp.java                       1607)     if( ! menuPlayStart.isEnabled( ) )
Blimp.java                       1608)     {
Blimp.java                       1609)       //stop play timer
Blimp.java                       1610)       timerPlay.stop( );
Blimp.java                       1611)       //start play timer
Blimp.java                       1612)       if( curFrame == null )
Blimp.java                       1613)         timerPlay.setInitialDelay( 100 ); //use 100ms as default
Blimp.java                       1614)       else
Blimp.java                       1615)         timerPlay.setInitialDelay( curFrame.getDuration( ) );
Blimp.java                       1616)       timerPlay.restart( );
Blimp.java                       1617)     }
Blimp.java                       1618)   }
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1619) 
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       1620)   //frame selection changed
Blimp.java                       1621)   private void stateFrameSel( )
Blimp.java                       1622)   {
Blimp.java                       1623)     boolean valid;
Blimp.java                       1624)     int frameCnt;
Blimp.java                       1625) 
Blimp.java                       1626)     //simulate frames scrollbar change to propagate update
Blimp.java                       1627)     stateFrames( );
Blimp.java                       1628) 
Blimp.java                       1629)     //check if selection is valid
Blimp.java                       1630)     frameCnt = curMovie.getFrameCnt( );
Blimp.java                       1631)     valid = (0 <= frameSelStart && frameSelStart <= frameSelEnd && frameSelEnd < frameCnt);
Blimp.java                       1632) 
Blimp.java                       1633)     //enable/disable some menu commands which need a selection
Blimp.java                       1634)     menuFrameSelCopy.setEnabled( valid );
Blimp.java                       1635)     menuFrameSelMove.setEnabled( valid );
Blimp.java                       1636)     menuFrameSelReverse.setEnabled( valid );
Blimp.java                       1637)     menuFrameSelDelete.setEnabled( valid );
Blimp.java                       1638)   }
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1639) 
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1640)   //convert aspect or zoom to aspect or zoom slider value
org/blinkenarea/Blimp/Blimp.java 1641)   private int aspectZoomToSliderValue( double aspectZoom )
org/blinkenarea/Blimp/Blimp.java 1642)   {
org/blinkenarea/Blimp/Blimp.java 1643)     double value = Math.log( aspectZoom ) / Math.log( 2.0 );
org/blinkenarea/Blimp/Blimp.java 1644)     value *= (double)ZoomAspectResolution;
org/blinkenarea/Blimp/Blimp.java 1645)     if( value >= 0.0 )
org/blinkenarea/Blimp/Blimp.java 1646)       value += 0.5;
org/blinkenarea/Blimp/Blimp.java 1647)     else
org/blinkenarea/Blimp/Blimp.java 1648)       value -= 0.5;
org/blinkenarea/Blimp/Blimp.java 1649)     return (int)value;
org/blinkenarea/Blimp/Blimp.java 1650)   }
org/blinkenarea/Blimp/Blimp.java 1651) 
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1652)   //set zoom and aspect value of frame
org/blinkenarea/Blimp/Blimp.java 1653)   private void setZoomAspect( )
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1654)   {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1655)     //get new zoom value
org/blinkenarea/Blimp/Blimp.java 1656)     double zoom = Math.pow( 2.0, (double)sliderZoom.getValue( ) / (double)ZoomAspectResolution );
org/blinkenarea/Blimp/Blimp.java 1657) 
org/blinkenarea/Blimp/Blimp.java 1658)     //get new aspect value
org/blinkenarea/Blimp/Blimp.java 1659)     double aspect = Math.pow( 2.0, (double)sliderAspect.getValue( ) / (double)ZoomAspectResolution );
org/blinkenarea/Blimp/Blimp.java 1660) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1661)     //update frame
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1662)     frameEditor.setZoomAspect( zoom, aspect );
org/blinkenarea/Blimp/Blimp.java 1663) 
org/blinkenarea/Blimp/Blimp.java 1664)     //update zoom value
org/blinkenarea/Blimp/Blimp.java 1665)     String txtZoom = new Double( frameEditor.getZoom( ) ).toString( );
org/blinkenarea/Blimp/Blimp.java 1666)     if( txtZoom.length( ) > 4 )
org/blinkenarea/Blimp/Blimp.java 1667)       txtZoom = txtZoom.substring( 0, 4 );
org/blinkenarea/Blimp/Blimp.java 1668)     labelZoom.setText( txtZoom );
org/blinkenarea/Blimp/Blimp.java 1669) 
org/blinkenarea/Blimp/Blimp.java 1670)     //update aspect value
org/blinkenarea/Blimp/Blimp.java 1671)     String txtAspect = new Double( frameEditor.getAspect( ) ).toString( );
org/blinkenarea/Blimp/Blimp.java 1672)     if( txtAspect.length( ) > 4 )
org/blinkenarea/Blimp/Blimp.java 1673)       txtAspect = txtAspect.substring( 0, 4 );
org/blinkenarea/Blimp/Blimp.java 1674)     labelAspect.setText( txtAspect );
org/blinkenarea/Blimp/Blimp.java 1675)   }
org/blinkenarea/Blimp/Blimp.java 1676) 
org/blinkenarea/Blimp/Blimp.java 1677)   //show zoom value
org/blinkenarea/Blimp/Blimp.java 1678)   private void showZoom( )
org/blinkenarea/Blimp/Blimp.java 1679)   {
org/blinkenarea/Blimp/Blimp.java 1680)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1681)       return;
org/blinkenarea/Blimp/Blimp.java 1682) 
org/blinkenarea/Blimp/Blimp.java 1683)     //get zoom value
org/blinkenarea/Blimp/Blimp.java 1684)     double zoom = Math.pow( 2.0, (double)sliderZoom.getValue( ) / (double)ZoomAspectResolution );
org/blinkenarea/Blimp/Blimp.java 1685) 
org/blinkenarea/Blimp/Blimp.java 1686)     //convert zoom value to string
org/blinkenarea/Blimp/Blimp.java 1687)     String txtZoom = new Double( zoom ).toString( );
org/blinkenarea/Blimp/Blimp.java 1688)     if( txtZoom.length( ) > 4 )
org/blinkenarea/Blimp/Blimp.java 1689)       txtZoom = txtZoom.substring( 0, 4 );
org/blinkenarea/Blimp/Blimp.java 1690) 
org/blinkenarea/Blimp/Blimp.java 1691)     //show zoom value without triggering events
org/blinkenarea/Blimp/Blimp.java 1692)     noRecurseZoomAspect = true;
org/blinkenarea/Blimp/Blimp.java 1693)     textZoom.setText( txtZoom );
org/blinkenarea/Blimp/Blimp.java 1694)     noRecurseZoomAspect = false;
org/blinkenarea/Blimp/Blimp.java 1695)   }
org/blinkenarea/Blimp/Blimp.java 1696) 
org/blinkenarea/Blimp/Blimp.java 1697)   //new zoom value is being entered
org/blinkenarea/Blimp/Blimp.java 1698)   private void changeZoom( )
org/blinkenarea/Blimp/Blimp.java 1699)   {
org/blinkenarea/Blimp/Blimp.java 1700)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1701)       return;
org/blinkenarea/Blimp/Blimp.java 1702) 
org/blinkenarea/Blimp/Blimp.java 1703)     try
org/blinkenarea/Blimp/Blimp.java 1704)     {
org/blinkenarea/Blimp/Blimp.java 1705)       //get new zoom value
org/blinkenarea/Blimp/Blimp.java 1706)       double zoom = Double.parseDouble( textZoom.getText( ) );
org/blinkenarea/Blimp/Blimp.java 1707) 
org/blinkenarea/Blimp/Blimp.java 1708)       //set new zoom value without triggering events
org/blinkenarea/Blimp/Blimp.java 1709)       noRecurseZoomAspect = true;
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1710)       sliderZoom.setValue( aspectZoomToSliderValue( zoom ) );
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1711)       noRecurseZoomAspect = false;
org/blinkenarea/Blimp/Blimp.java 1712) 
org/blinkenarea/Blimp/Blimp.java 1713)       //set zoom and aspect value of frame
org/blinkenarea/Blimp/Blimp.java 1714)       setZoomAspect( );
org/blinkenarea/Blimp/Blimp.java 1715)     }
org/blinkenarea/Blimp/Blimp.java 1716)     catch( NumberFormatException e ) { }
org/blinkenarea/Blimp/Blimp.java 1717)   }
org/blinkenarea/Blimp/Blimp.java 1718) 
org/blinkenarea/Blimp/Blimp.java 1719)   //new zoom value was entered
org/blinkenarea/Blimp/Blimp.java 1720)   private void validateZoom( )
org/blinkenarea/Blimp/Blimp.java 1721)   {
org/blinkenarea/Blimp/Blimp.java 1722)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1723)       return;
org/blinkenarea/Blimp/Blimp.java 1724) 
org/blinkenarea/Blimp/Blimp.java 1725)     //process changes made zoom value
org/blinkenarea/Blimp/Blimp.java 1726)     changeZoom( );
org/blinkenarea/Blimp/Blimp.java 1727) 
org/blinkenarea/Blimp/Blimp.java 1728)     //redisplay new zoom value
org/blinkenarea/Blimp/Blimp.java 1729)     showZoom( );
org/blinkenarea/Blimp/Blimp.java 1730)   }
org/blinkenarea/Blimp/Blimp.java 1731) 
org/blinkenarea/Blimp/Blimp.java 1732)   //zoom value changed
org/blinkenarea/Blimp/Blimp.java 1733)   private void stateZoom( )
org/blinkenarea/Blimp/Blimp.java 1734)   {
org/blinkenarea/Blimp/Blimp.java 1735)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1736)       return;
org/blinkenarea/Blimp/Blimp.java 1737) 
org/blinkenarea/Blimp/Blimp.java 1738)     //set zoom and aspect value of frame
org/blinkenarea/Blimp/Blimp.java 1739)     setZoomAspect( );
org/blinkenarea/Blimp/Blimp.java 1740) 
org/blinkenarea/Blimp/Blimp.java 1741)     //redisplay new zoom value
org/blinkenarea/Blimp/Blimp.java 1742)     showZoom( );
org/blinkenarea/Blimp/Blimp.java 1743)   }
org/blinkenarea/Blimp/Blimp.java 1744) 
org/blinkenarea/Blimp/Blimp.java 1745)   //show aspect value
org/blinkenarea/Blimp/Blimp.java 1746)   private void showAspect( )
org/blinkenarea/Blimp/Blimp.java 1747)   {
org/blinkenarea/Blimp/Blimp.java 1748)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1749)       return;
org/blinkenarea/Blimp/Blimp.java 1750) 
org/blinkenarea/Blimp/Blimp.java 1751)     //get aspect value
org/blinkenarea/Blimp/Blimp.java 1752)     double aspect = Math.pow( 2.0, (double)sliderAspect.getValue( ) / (double)ZoomAspectResolution );
org/blinkenarea/Blimp/Blimp.java 1753) 
org/blinkenarea/Blimp/Blimp.java 1754)     //convert aspect value to string
org/blinkenarea/Blimp/Blimp.java 1755)     String txtAspect = new Double( aspect ).toString( );
org/blinkenarea/Blimp/Blimp.java 1756)     if( txtAspect.length( ) > 4 )
org/blinkenarea/Blimp/Blimp.java 1757)       txtAspect = txtAspect.substring( 0, 4 );
org/blinkenarea/Blimp/Blimp.java 1758) 
org/blinkenarea/Blimp/Blimp.java 1759)     //show aspect value without triggering events
org/blinkenarea/Blimp/Blimp.java 1760)     noRecurseZoomAspect = true;
org/blinkenarea/Blimp/Blimp.java 1761)     textAspect.setText( txtAspect );
org/blinkenarea/Blimp/Blimp.java 1762)     noRecurseZoomAspect = false;
org/blinkenarea/Blimp/Blimp.java 1763)   }
org/blinkenarea/Blimp/Blimp.java 1764) 
org/blinkenarea/Blimp/Blimp.java 1765)   //new aspect value is being entered
org/blinkenarea/Blimp/Blimp.java 1766)   private void changeAspect( )
org/blinkenarea/Blimp/Blimp.java 1767)   {
org/blinkenarea/Blimp/Blimp.java 1768)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1769)       return;
org/blinkenarea/Blimp/Blimp.java 1770) 
org/blinkenarea/Blimp/Blimp.java 1771)     try
org/blinkenarea/Blimp/Blimp.java 1772)     {
org/blinkenarea/Blimp/Blimp.java 1773)       //get new aspect value
org/blinkenarea/Blimp/Blimp.java 1774)       double aspect = Double.parseDouble( textAspect.getText( ) );
org/blinkenarea/Blimp/Blimp.java 1775) 
org/blinkenarea/Blimp/Blimp.java 1776)       //set new aspect value without triggering events
org/blinkenarea/Blimp/Blimp.java 1777)       noRecurseZoomAspect = true;
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1778)       sliderAspect.setValue( aspectZoomToSliderValue( aspect ) );
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1779)       noRecurseZoomAspect = false;
org/blinkenarea/Blimp/Blimp.java 1780) 
org/blinkenarea/Blimp/Blimp.java 1781)       //set zoom and aspect value of frame
org/blinkenarea/Blimp/Blimp.java 1782)       setZoomAspect( );
org/blinkenarea/Blimp/Blimp.java 1783)     }
org/blinkenarea/Blimp/Blimp.java 1784)     catch( NumberFormatException e ) { }
org/blinkenarea/Blimp/Blimp.java 1785)   }
org/blinkenarea/Blimp/Blimp.java 1786) 
org/blinkenarea/Blimp/Blimp.java 1787)   //new aspect value was entered
org/blinkenarea/Blimp/Blimp.java 1788)   private void validateAspect( )
org/blinkenarea/Blimp/Blimp.java 1789)   {
org/blinkenarea/Blimp/Blimp.java 1790)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1791)       return;
org/blinkenarea/Blimp/Blimp.java 1792) 
org/blinkenarea/Blimp/Blimp.java 1793)     //process changes made aspect value
org/blinkenarea/Blimp/Blimp.java 1794)     changeAspect( );
org/blinkenarea/Blimp/Blimp.java 1795) 
org/blinkenarea/Blimp/Blimp.java 1796)     //redisplay new aspect value
org/blinkenarea/Blimp/Blimp.java 1797)     showAspect( );
org/blinkenarea/Blimp/Blimp.java 1798)   }
org/blinkenarea/Blimp/Blimp.java 1799) 
org/blinkenarea/Blimp/Blimp.java 1800)   //aspect value changed
org/blinkenarea/Blimp/Blimp.java 1801)   private void stateAspect( )
org/blinkenarea/Blimp/Blimp.java 1802)   {
org/blinkenarea/Blimp/Blimp.java 1803)     if( noRecurseZoomAspect )
org/blinkenarea/Blimp/Blimp.java 1804)       return;
org/blinkenarea/Blimp/Blimp.java 1805) 
org/blinkenarea/Blimp/Blimp.java 1806)     //set zoom and aspect value of frame
org/blinkenarea/Blimp/Blimp.java 1807)     setZoomAspect( );
org/blinkenarea/Blimp/Blimp.java 1808) 
org/blinkenarea/Blimp/Blimp.java 1809)     //redisplay new aspect value
org/blinkenarea/Blimp/Blimp.java 1810)     showAspect( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1811)   }
Blimp.java                       1812) 
Blimp.java                       1813)   //show duration
Blimp.java                       1814)   private void showDuration( )
Blimp.java                       1815)   {
Blimp.java                       1816)     if( curFrame == null )
Blimp.java                       1817)     {
Blimp.java                       1818)       textDuration.setEnabled( false );
Blimp.java                       1819)       textDuration.setText( "" );
Blimp.java                       1820)     }
Blimp.java                       1821)     else
Blimp.java                       1822)     {
Blimp.java                       1823)       textDuration.setEnabled( true );
Blimp.java                       1824)       textDuration.setText( "" + curFrame.getDuration( ) );
Blimp.java                       1825)     }
Blimp.java                       1826)   }
Blimp.java                       1827) 
Blimp.java                       1828)   //new frame duration is being entered
Blimp.java                       1829)   private void changeDuration( )
Blimp.java                       1830)   {
Blimp.java                       1831)     int duration;
Blimp.java                       1832) 
Blimp.java                       1833)     try
Blimp.java                       1834)     {
Blimp.java                       1835)       //get new frame duration
Blimp.java                       1836)       duration = Integer.parseInt( textDuration.getText( ) );
Blimp.java                       1837) 
Blimp.java                       1838)       //write new duration into frame (if it really changed)
Blimp.java                       1839)       if( curFrame != null && curFrame.getDuration( ) != duration )
Blimp.java                       1840)       {
Blimp.java                       1841)         curFrame.setDuration( duration );
Blimp.java                       1842)         curMovieChanged = true;
Blimp.java                       1843)       }
Blimp.java                       1844)     }
Blimp.java                       1845)     catch( NumberFormatException e ) { }
Blimp.java                       1846)   }
Blimp.java                       1847) 
Blimp.java                       1848)   //new frame duration was entered
Blimp.java                       1849)   private void validateDuration( )
Blimp.java                       1850)   {
Blimp.java                       1851)     //process changes made to duration
Blimp.java                       1852)     changeDuration( );
Blimp.java                       1853) 
Blimp.java                       1854)     //redisplay new duration
Blimp.java                       1855)     showDuration( );
Blimp.java                       1856)   }
Blimp.java                       1857) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1858)   //generate a gray gradient icon
org/blinkenarea/Blimp/Blimp.java 1859)   private void iconGradientGray( ImageIcon icon )
org/blinkenarea/Blimp/Blimp.java 1860)   {
org/blinkenarea/Blimp/Blimp.java 1861)     int height, width, val, x;
org/blinkenarea/Blimp/Blimp.java 1862)     Graphics graphics;
org/blinkenarea/Blimp/Blimp.java 1863) 
org/blinkenarea/Blimp/Blimp.java 1864)     //get size
org/blinkenarea/Blimp/Blimp.java 1865)     height = icon.getIconHeight( );
org/blinkenarea/Blimp/Blimp.java 1866)     width = icon.getIconWidth( );
org/blinkenarea/Blimp/Blimp.java 1867) 
org/blinkenarea/Blimp/Blimp.java 1868)     //get graphics context of icon's image
org/blinkenarea/Blimp/Blimp.java 1869)     graphics = icon.getImage( ).getGraphics( );
org/blinkenarea/Blimp/Blimp.java 1870) 
org/blinkenarea/Blimp/Blimp.java 1871)     //draw gradient to icon
org/blinkenarea/Blimp/Blimp.java 1872)     for( x = 0; x < width; x++ ) {
org/blinkenarea/Blimp/Blimp.java 1873)       val = x * 255 / (width - 1);
org/blinkenarea/Blimp/Blimp.java 1874)       graphics.setColor( new Color( val, val, val ) );
org/blinkenarea/Blimp/Blimp.java 1875)       graphics.drawLine( x, 0, x, height );
org/blinkenarea/Blimp/Blimp.java 1876)     }
org/blinkenarea/Blimp/Blimp.java 1877)   }
org/blinkenarea/Blimp/Blimp.java 1878) 
org/blinkenarea/Blimp/Blimp.java 1879)   //generate a color gradient icon
org/blinkenarea/Blimp/Blimp.java 1880)   private void iconGradientColor( ImageIcon icon )
org/blinkenarea/Blimp/Blimp.java 1881)   {
org/blinkenarea/Blimp/Blimp.java 1882)     int height, width, val, step, x;
org/blinkenarea/Blimp/Blimp.java 1883)     Graphics graphics;
org/blinkenarea/Blimp/Blimp.java 1884) 
org/blinkenarea/Blimp/Blimp.java 1885)     //get size
org/blinkenarea/Blimp/Blimp.java 1886)     height = icon.getIconHeight( );
org/blinkenarea/Blimp/Blimp.java 1887)     width = icon.getIconWidth( );
org/blinkenarea/Blimp/Blimp.java 1888) 
org/blinkenarea/Blimp/Blimp.java 1889)     //get graphics context of icon's image
org/blinkenarea/Blimp/Blimp.java 1890)     graphics = icon.getImage( ).getGraphics( );
org/blinkenarea/Blimp/Blimp.java 1891) 
org/blinkenarea/Blimp/Blimp.java 1892)     //draw gradient to icon
org/blinkenarea/Blimp/Blimp.java 1893)     for( x = 0; x < width; x++ ) {
org/blinkenarea/Blimp/Blimp.java 1894)       val = x * 6 * 255 / (width - 1);
org/blinkenarea/Blimp/Blimp.java 1895)       step = val / 255;
org/blinkenarea/Blimp/Blimp.java 1896)       val %= 255;
org/blinkenarea/Blimp/Blimp.java 1897)       switch( step ) {
org/blinkenarea/Blimp/Blimp.java 1898)         case 0: graphics.setColor( new Color( 255, val, 0 ) ); break;
org/blinkenarea/Blimp/Blimp.java 1899)         case 1: graphics.setColor( new Color( 255 - val, 255, 0 ) ); break;
org/blinkenarea/Blimp/Blimp.java 1900)         case 2: graphics.setColor( new Color( 0, 255, val ) ); break;
org/blinkenarea/Blimp/Blimp.java 1901)         case 3: graphics.setColor( new Color( 0, 255 - val, 255 ) ); break;
org/blinkenarea/Blimp/Blimp.java 1902)         case 4: graphics.setColor( new Color( val, 0, 255 ) ); break;
org/blinkenarea/Blimp/Blimp.java 1903)         case 5: graphics.setColor( new Color( 255, 0, 255 - val ) ); break;
org/blinkenarea/Blimp/Blimp.java 1904)       }
org/blinkenarea/Blimp/Blimp.java 1905)       graphics.drawLine( x, 0, x, height );
org/blinkenarea/Blimp/Blimp.java 1906)     }
org/blinkenarea/Blimp/Blimp.java 1907)   }
org/blinkenarea/Blimp/Blimp.java 1908) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1909)   //generate a color icon from a color
Blimp.java                       1910)   private void iconFromColor( ImageIcon icon, Color color )
Blimp.java                       1911)   {
Blimp.java                       1912)     int height, width, y, x;
Blimp.java                       1913)     boolean yy, xx;
Blimp.java                       1914)     Graphics graphics;
Blimp.java                       1915) 
Blimp.java                       1916)     //get size
Blimp.java                       1917)     height = icon.getIconHeight( );
Blimp.java                       1918)     width = icon.getIconWidth( );
Blimp.java                       1919) 
Blimp.java                       1920)     //get graphics context of icon's image
Blimp.java                       1921)     graphics = icon.getImage( ).getGraphics( );
Blimp.java                       1922) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1923)     //fill icon in specified color
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       1924)     graphics.setColor( color );
Blimp.java                       1925)     graphics.fillRect( 0, 0, width, height );
Blimp.java                       1926)   }
Blimp.java                       1927) 
Blimp.java                       1928)   //a color was chosen
Blimp.java                       1929)   private void actionColorIdx( int idx )
Blimp.java                       1930)   {
Blimp.java                       1931)     //click on active color
Blimp.java                       1932)     if( idx == colorIdx )
Blimp.java                       1933)     {
Blimp.java                       1934)       //act as if color color select button was pressed
Blimp.java                       1935)       actionColorsColor( );
Blimp.java                       1936)       return;
Blimp.java                       1937)     }
Blimp.java                       1938) 
Blimp.java                       1939)     //set active color index
Blimp.java                       1940)     colorIdx = idx;
Blimp.java                       1941) 
Blimp.java                       1942)     //update color settings
Blimp.java                       1943)     showColorsColor( );
Blimp.java                       1944)     showColorsAlpha( );
Blimp.java                       1945) 
Blimp.java                       1946)     //set color of frame editor to new color
Blimp.java                       1947)     frameEditor.setColor( colors[colorIdx] );
Blimp.java                       1948)   }
Blimp.java                       1949) 
Blimp.java                       1950)   //show color
Blimp.java                       1951)   private void showColorsColor( )
Blimp.java                       1952)   {
Blimp.java                       1953)     int red, green, blue;
Blimp.java                       1954)     String hex;
Blimp.java                       1955) 
Blimp.java                       1956)     //get color components
Blimp.java                       1957)     red = colors[colorIdx].getRed( );
Blimp.java                       1958)     green = colors[colorIdx].getGreen( );
Blimp.java                       1959)     blue = colors[colorIdx].getBlue( );
Blimp.java                       1960) 
Blimp.java                       1961)     //color button
Blimp.java                       1962)     iconFromColor( iconColorsColor, new Color( red, green, blue ) );
Blimp.java                       1963)     buttonColorsColor.repaint( );
Blimp.java                       1964) 
Blimp.java                       1965)     //color text
Blimp.java                       1966)     if( red < 0x10 )
Blimp.java                       1967)       hex = "0" + Integer.toHexString( red );
Blimp.java                       1968)     else
Blimp.java                       1969)       hex = Integer.toHexString( red );
Blimp.java                       1970)     if( green < 0x10 )
Blimp.java                       1971)       hex += "0" + Integer.toHexString( green );
Blimp.java                       1972)     else
Blimp.java                       1973)       hex += Integer.toHexString( green );
Blimp.java                       1974)     if( blue < 0x10 )
Blimp.java                       1975)       hex += "0" + Integer.toHexString( blue );
Blimp.java                       1976)     else
Blimp.java                       1977)       hex += Integer.toHexString( blue );
Blimp.java                       1978)     textColorsColor.setText( hex.toUpperCase( ) );
Blimp.java                       1979)   }
Blimp.java                       1980) 
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 1981)   //gray predefined colors have been chosen
org/blinkenarea/Blimp/Blimp.java 1982)   private void actionColorsPredefGray( )
org/blinkenarea/Blimp/Blimp.java 1983)   {
org/blinkenarea/Blimp/Blimp.java 1984)     int i, val;
org/blinkenarea/Blimp/Blimp.java 1985) 
org/blinkenarea/Blimp/Blimp.java 1986)     //update color buttons
org/blinkenarea/Blimp/Blimp.java 1987)     for( i = 0; i < constColorCnt; i++ )
org/blinkenarea/Blimp/Blimp.java 1988)     {
org/blinkenarea/Blimp/Blimp.java 1989)       val = (constColorCnt - 1 - i) * 255 / (constColorCnt - 1);
org/blinkenarea/Blimp/Blimp.java 1990)       colors[i] = new Color( val, val, val );
org/blinkenarea/Blimp/Blimp.java 1991)       iconFromColor( iconsColor[i], colors[i] );
org/blinkenarea/Blimp/Blimp.java 1992)       buttonsColor[i].repaint( );
org/blinkenarea/Blimp/Blimp.java 1993)     }
org/blinkenarea/Blimp/Blimp.java 1994) 
org/blinkenarea/Blimp/Blimp.java 1995)     //update current color
org/blinkenarea/Blimp/Blimp.java 1996)     showColorsColor( );
org/blinkenarea/Blimp/Blimp.java 1997)     frameEditor.setColor( colors[colorIdx] );
org/blinkenarea/Blimp/Blimp.java 1998)   }
org/blinkenarea/Blimp/Blimp.java 1999) 
org/blinkenarea/Blimp/Blimp.java 2000)   //colorful predefined colors have been chosen
org/blinkenarea/Blimp/Blimp.java 2001)   private void actionColorsPredefColor( )
org/blinkenarea/Blimp/Blimp.java 2002)   {
org/blinkenarea/Blimp/Blimp.java 2003)     int i, val, step;
org/blinkenarea/Blimp/Blimp.java 2004) 
org/blinkenarea/Blimp/Blimp.java 2005)     //update color buttons
org/blinkenarea/Blimp/Blimp.java 2006)     for( i = 0; i < constColorCnt; i++ )
org/blinkenarea/Blimp/Blimp.java 2007)     {
org/blinkenarea/Blimp/Blimp.java 2008)       if( i == 0 )
org/blinkenarea/Blimp/Blimp.java 2009)         colors[i] = new Color( 255, 255, 255 );
org/blinkenarea/Blimp/Blimp.java 2010)       else if( i == 1 )
org/blinkenarea/Blimp/Blimp.java 2011)         colors[i] = new Color( 0, 0, 0 );
org/blinkenarea/Blimp/Blimp.java 2012)       else
org/blinkenarea/Blimp/Blimp.java 2013)       {
org/blinkenarea/Blimp/Blimp.java 2014)         val = (i - 2) * 6 * 255 / (constColorCnt - 2);
org/blinkenarea/Blimp/Blimp.java 2015)         step = val / 255;
org/blinkenarea/Blimp/Blimp.java 2016)         val %= 255;
org/blinkenarea/Blimp/Blimp.java 2017)         switch( step ) {
org/blinkenarea/Blimp/Blimp.java 2018)           case 0: colors[i] = new Color( 255, val, 0 ); break;
org/blinkenarea/Blimp/Blimp.java 2019)           case 1: colors[i] = new Color( 255 - val, 255, 0 ); break;
org/blinkenarea/Blimp/Blimp.java 2020)           case 2: colors[i] = new Color( 0, 255, val ); break;
org/blinkenarea/Blimp/Blimp.java 2021)           case 3: colors[i] = new Color( 0, 255 - val, 255 ); break;
org/blinkenarea/Blimp/Blimp.java 2022)           case 4: colors[i] = new Color( val, 0, 255 ); break;
org/blinkenarea/Blimp/Blimp.java 2023)           case 5: colors[i] = new Color( 255, 0, 255 - val ); break;
org/blinkenarea/Blimp/Blimp.java 2024)         }
org/blinkenarea/Blimp/Blimp.java 2025)       }
org/blinkenarea/Blimp/Blimp.java 2026)       iconFromColor( iconsColor[i], colors[i] );
org/blinkenarea/Blimp/Blimp.java 2027)       buttonsColor[i].repaint( );
org/blinkenarea/Blimp/Blimp.java 2028)     }
org/blinkenarea/Blimp/Blimp.java 2029) 
org/blinkenarea/Blimp/Blimp.java 2030)     //update current color
org/blinkenarea/Blimp/Blimp.java 2031)     showColorsColor( );
org/blinkenarea/Blimp/Blimp.java 2032)     frameEditor.setColor( colors[colorIdx] );
org/blinkenarea/Blimp/Blimp.java 2033)   }
org/blinkenarea/Blimp/Blimp.java 2034) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2035)   //color select button was pressed
Blimp.java                       2036)   private void actionColorsColor( )
Blimp.java                       2037)   {
Blimp.java                       2038)     Color color;
Blimp.java                       2039) 
Blimp.java                       2040)     //get current color with full alpha
Blimp.java                       2041)     color = new Color( colors[colorIdx].getRed( ),
Blimp.java                       2042)                        colors[colorIdx].getGreen( ),
Blimp.java                       2043)                        colors[colorIdx].getBlue( ) );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2044) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2045)     //show color select dialog
Blimp.java                       2046)     color = JColorChooser.showDialog( dialogParent,
Blimp.java                       2047)                                       "Blimp - Choose Color...",
Blimp.java                       2048)                                       color );
Blimp.java                       2049)     if( color == null ) //dialog was cancelled
Blimp.java                       2050)       return;
Blimp.java                       2051) 
Blimp.java                       2052)     //save new color
Blimp.java                       2053)     colors[colorIdx] = new Color( color.getRed( ),
Blimp.java                       2054)                                   color.getGreen( ),
Blimp.java                       2055)                                   color.getBlue( ),
Blimp.java                       2056)                                   colors[colorIdx].getAlpha( ) );
Blimp.java                       2057) 
Blimp.java                       2058)     //redisplay new color
Blimp.java                       2059)     showColorsColor( );
Blimp.java                       2060) 
Blimp.java                       2061)     //update color icon of active color
Blimp.java                       2062)     iconFromColor( iconsColor[colorIdx], colors[colorIdx] );
Blimp.java                       2063)     buttonsColor[colorIdx].repaint( );
Blimp.java                       2064) 
Blimp.java                       2065)     //set color of frame editor to new color
Blimp.java                       2066)     frameEditor.setColor( colors[colorIdx] );
Blimp.java                       2067)   }
Blimp.java                       2068) 
Blimp.java                       2069)   //new color text is being entered
Blimp.java                       2070)   private void changeColorsColor( )
Blimp.java                       2071)   {
Blimp.java                       2072)     String txt;
Blimp.java                       2073)     int red, green, blue;
Blimp.java                       2074) 
Blimp.java                       2075)     //get color text
Blimp.java                       2076)     txt = textColorsColor.getText( );
Blimp.java                       2077) 
Blimp.java                       2078)     //standard color is black
Blimp.java                       2079)     red = 0;
Blimp.java                       2080)     green = 0;
Blimp.java                       2081)     blue = 0;
Blimp.java                       2082) 
Blimp.java                       2083)     //get new color
Blimp.java                       2084)     try
Blimp.java                       2085)     {
Blimp.java                       2086)       if( txt.length( ) >= 2 )
Blimp.java                       2087)         red = Integer.parseInt( txt.substring( 0, 2 ), 0x10 );
Blimp.java                       2088)       if( txt.length( ) >= 4 )
Blimp.java                       2089)         green = Integer.parseInt( txt.substring( 2, 4 ), 0x10 );
Blimp.java                       2090)       if( txt.length( ) >= 6 )
Blimp.java                       2091)         blue = Integer.parseInt( txt.substring( 4, 6 ), 0x10 );
Blimp.java                       2092)     }
Blimp.java                       2093)     catch( NumberFormatException e ) { }
Blimp.java                       2094) 
Blimp.java                       2095)     //save new color
Blimp.java                       2096)     colors[colorIdx] = new Color( red, green, blue, colors[colorIdx].getAlpha( ) );
Blimp.java                       2097) 
Blimp.java                       2098)     //set color of frame editor to new color
Blimp.java                       2099)     frameEditor.setColor( colors[colorIdx] );
Blimp.java                       2100)   }
Blimp.java                       2101) 
Blimp.java                       2102)   //new color text was entered
Blimp.java                       2103)   private void validateColorsColor( )
Blimp.java                       2104)   {
Blimp.java                       2105)     //process changes
Blimp.java                       2106)     changeColorsColor( );
Blimp.java                       2107) 
Blimp.java                       2108)     //redisplay new color
Blimp.java                       2109)     showColorsColor( );
Blimp.java                       2110) 
Blimp.java                       2111)     //update color icon of active color
Blimp.java                       2112)     iconFromColor( iconsColor[colorIdx], colors[colorIdx] );
Blimp.java                       2113)     buttonsColor[colorIdx].repaint( );
Blimp.java                       2114)   }
Blimp.java                       2115) 
Blimp.java                       2116)   //show color's alpha value
Blimp.java                       2117)   private void showColorsAlpha( )
Blimp.java                       2118)   {
Blimp.java                       2119)     int alpha;
Blimp.java                       2120)     String hex;
Blimp.java                       2121) 
Blimp.java                       2122)     //get alpha value
Blimp.java                       2123)     alpha = colors[colorIdx].getAlpha( );
Blimp.java                       2124) 
Blimp.java                       2125)     //alpha slider
Blimp.java                       2126)     sliderColorsAlpha.setValue( alpha );
Blimp.java                       2127) 
Blimp.java                       2128)     //alpha text
Blimp.java                       2129)     if( alpha < 0x10 )
Blimp.java                       2130)       hex = "0" + Integer.toHexString( alpha );
Blimp.java                       2131)     else
Blimp.java                       2132)       hex = Integer.toHexString( alpha );
Blimp.java                       2133)     textColorsAlpha.setText( hex.toUpperCase( ) );
Blimp.java                       2134)   }
Blimp.java                       2135) 
Blimp.java                       2136)   //color's alpha value changed
Blimp.java                       2137)   private void stateColorsAlpha( )
Blimp.java                       2138)   {
Blimp.java                       2139)     int alpha;
Blimp.java                       2140)     String hex;
Blimp.java                       2141) 
Blimp.java                       2142)     //get new alpha value
Blimp.java                       2143)     alpha = sliderColorsAlpha.getValue( );
Blimp.java                       2144) 
Blimp.java                       2145)     //update active color
Blimp.java                       2146)     colors[colorIdx] = new Color( colors[colorIdx].getRed( ),
Blimp.java                       2147)                                   colors[colorIdx].getGreen( ),
Blimp.java                       2148)                                   colors[colorIdx].getBlue( ),
Blimp.java                       2149)                                   alpha );
Blimp.java                       2150) 
Blimp.java                       2151)     //update alpha text
Blimp.java                       2152)     if( alpha < 0x10 )
Blimp.java                       2153)       hex = "0" + Integer.toHexString( alpha );
Blimp.java                       2154)     else
Blimp.java                       2155)       hex = Integer.toHexString( alpha );
Blimp.java                       2156)     textColorsAlpha.setText( hex.toUpperCase( ) );
Blimp.java                       2157) 
Blimp.java                       2158)     //update color icon of active color
Blimp.java                       2159)     iconFromColor( iconsColor[colorIdx], colors[colorIdx] );
Blimp.java                       2160)     buttonsColor[colorIdx].repaint( );
Blimp.java                       2161) 
Blimp.java                       2162)     //set color of frame editor to new color
Blimp.java                       2163)     frameEditor.setColor( colors[colorIdx] );
Blimp.java                       2164)   }
Blimp.java                       2165) 
Blimp.java                       2166)   //new alpha text is being entered
Blimp.java                       2167)   private void changeColorsAlpha( )
Blimp.java                       2168)   {
Blimp.java                       2169)     String txt;
Blimp.java                       2170)     int alpha;
Blimp.java                       2171) 
Blimp.java                       2172)     //get alpha text
Blimp.java                       2173)     txt = textColorsAlpha.getText( );
Blimp.java                       2174) 
Blimp.java                       2175)     //standard alpha is full
Blimp.java                       2176)     alpha = 255;
Blimp.java                       2177) 
Blimp.java                       2178)     //get new alpha
Blimp.java                       2179)     try
Blimp.java                       2180)     {
Blimp.java                       2181)       if( txt.length( ) >= 2 )
Blimp.java                       2182)         alpha = Integer.parseInt( txt.substring( 0, 2 ), 0x10 );
Blimp.java                       2183)     }
Blimp.java                       2184)     catch( NumberFormatException e ) { }
Blimp.java                       2185) 
Blimp.java                       2186)     //save new alpha
Blimp.java                       2187)     colors[colorIdx] = new Color( colors[colorIdx].getRed( ),
Blimp.java                       2188)                                   colors[colorIdx].getGreen( ),
Blimp.java                       2189)                                   colors[colorIdx].getBlue( ),
Blimp.java                       2190)                                   alpha );
Blimp.java                       2191) 
Blimp.java                       2192)     //set color of frame editor to new color
Blimp.java                       2193)     frameEditor.setColor( colors[colorIdx] );
Blimp.java                       2194)   }
Blimp.java                       2195) 
Blimp.java                       2196)   //new alpha text was entered
Blimp.java                       2197)   private void validateColorsAlpha( )
Blimp.java                       2198)   {
Blimp.java                       2199)     //process changes
Blimp.java                       2200)     changeColorsAlpha( );
Blimp.java                       2201) 
Blimp.java                       2202)     //redisplay new alpha value
Blimp.java                       2203)     showColorsAlpha( );
Blimp.java                       2204) 
Blimp.java                       2205)     //update color icon of active color
Blimp.java                       2206)     iconFromColor( iconsColor[colorIdx], colors[colorIdx] );
Blimp.java                       2207)     buttonsColor[colorIdx].repaint( );
Blimp.java                       2208)   }
Blimp.java                       2209) 
Blimp.java                       2210)   public void windowActivated( WindowEvent e )
Blimp.java                       2211)   {
Blimp.java                       2212)   }
Blimp.java                       2213) 
Blimp.java                       2214)   public void windowDeactivated( WindowEvent e )
Blimp.java                       2215)   {
Blimp.java                       2216)   }
Blimp.java                       2217) 
Blimp.java                       2218)   public void windowOpened( WindowEvent e )
Blimp.java                       2219)   {
Blimp.java                       2220)   }
Blimp.java                       2221) 
Blimp.java                       2222)   public void windowClosing( WindowEvent e )
Blimp.java                       2223)   {
Blimp.java                       2224)     actionFileQuit( ); //act as "File Quit"
Blimp.java                       2225)   }
Blimp.java                       2226) 
Blimp.java                       2227)   public void windowClosed( WindowEvent e )
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2228)   {
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2229)   }
Blimp.java                       2230) 
Blimp.java                       2231)   public void windowIconified( WindowEvent e )
Blimp.java                       2232)   {
Blimp.java                       2233)   }
Blimp.java                       2234) 
Blimp.java                       2235)   public void windowDeiconified( WindowEvent e )
Blimp.java                       2236)   {
Blimp.java                       2237)   }
Blimp.java                       2238) 
Blimp.java                       2239)   //some GUI action was perfomed
Blimp.java                       2240)   public void actionPerformed( ActionEvent e )
Blimp.java                       2241)   {
Blimp.java                       2242)     int i;
Blimp.java                       2243) 
Blimp.java                       2244)     if( e.getSource( ) == menuFileNew )
Blimp.java                       2245)       actionFileNew( );
Blimp.java                       2246)     else if( e.getSource( ) == menuFileLoad )
Blimp.java                       2247)       actionFileLoad( );
Blimp.java                       2248)     else if( e.getSource( ) == menuFileSave )
Blimp.java                       2249)       actionFileSave( );
Blimp.java                       2250)     else if( e.getSource( ) == menuFileSaveAs )
Blimp.java                       2251)       actionFileSaveAs( );
Blimp.java                       2252)     else if( e.getSource( ) == menuFileQuit )
Blimp.java                       2253)       actionFileQuit( );
Blimp.java                       2254)     else if( e.getSource( ) == menuInfoShow )
Blimp.java                       2255)       actionInfoShow( );
Blimp.java                       2256)     else if( e.getSource( ) == menuInfoAdd )
Blimp.java                       2257)       actionInfoAdd( );
Blimp.java                       2258)     else if( e.getSource( ) == menuInfoDelete )
Blimp.java                       2259)       actionInfoDelete( );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2260)     else if( e.getSource( ) == menuEditResizeUser )
org/blinkenarea/Blimp/Blimp.java 2261)       actionEditResizeUser( );
org/blinkenarea/Blimp/Blimp.java 2262)     else if( e.getSource( ) == menuEditScaleUser )
org/blinkenarea/Blimp/Blimp.java 2263)       actionEditScaleUser( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2264)     else if( e.getSource( ) == menuEditInsertFrame )
Blimp.java                       2265)       actionEditInsertFrame( );
Blimp.java                       2266)     else if( e.getSource( ) == menuEditDuplicateFrame )
Blimp.java                       2267)       actionEditDuplicateFrame( );
Blimp.java                       2268)     else if( e.getSource( ) == menuEditDeleteFrame )
Blimp.java                       2269)       actionEditDeleteFrame( );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2270)     else if( e.getSource( ) == menuEditImportImages )
Blimp.java                       2271)       actionEditImportImages( );
Blimp.java                       2272)     else if( e.getSource( ) == menuEditImportMovie )
Blimp.java                       2273)       actionEditImportMovie( );
Blimp.java                       2274)     else if( e.getSource( ) == menuFrameSelNone )
Blimp.java                       2275)       actionFrameSelNone( );
Blimp.java                       2276)     else if( e.getSource( ) == menuFrameSelSingle )
Blimp.java                       2277)       actionFrameSelSingle( );
Blimp.java                       2278)     else if( e.getSource( ) == menuFrameSelStart )
Blimp.java                       2279)       actionFrameSelStart( );
Blimp.java                       2280)     else if( e.getSource( ) == menuFrameSelEnd )
Blimp.java                       2281)       actionFrameSelEnd( );
Blimp.java                       2282)     else if( e.getSource( ) == menuFrameSelCopy )
Blimp.java                       2283)       actionFrameSelCopy( );
Blimp.java                       2284)     else if( e.getSource( ) == menuFrameSelMove )
Blimp.java                       2285)       actionFrameSelMove( );
Blimp.java                       2286)     else if( e.getSource( ) == menuFrameSelReverse )
Blimp.java                       2287)       actionFrameSelReverse( );
Blimp.java                       2288)     else if( e.getSource( ) == menuFrameSelDelete )
Blimp.java                       2289)       actionFrameSelDelete( );
Stefan Schuermans added scrolling text genera...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2290)     else if( e.getSource( ) == menuGenScrollText )
org/blinkenarea/Blimp/Blimp.java 2291)       actionGenScrollText( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2292)     else if( e.getSource( ) == menuPlayStart )
Blimp.java                       2293)       actionPlayStart( );
Blimp.java                       2294)     else if( e.getSource( ) == menuPlayStop )
Blimp.java                       2295)       actionPlayStop( );
Blimp.java                       2296)     else if( e.getSource( ) == timerPlay )
Blimp.java                       2297)       actionPlayTimer( );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2298)     else if( e.getSource( ) == menuOutputNone )
org/blinkenarea/Blimp/Blimp.java 2299)       actionOutputNone( );
org/blinkenarea/Blimp/Blimp.java 2300)     else if( e.getSource( ) == menuOutputMcuf )
org/blinkenarea/Blimp/Blimp.java 2301)       actionOutputMcuf( );
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 2302)     else if( e.getSource( ) == menuOutputMcufFile )
org/blinkenarea/Blimp/Blimp.java 2303)       actionOutputMcufFile( );
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2304)     else if( e.getSource( ) == menuOutputFlexiPix )
org/blinkenarea/Blimp/Blimp.java 2305)       actionOutputFlexiPix( );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2306)     else if( e.getSource( ) == timerOut )
org/blinkenarea/Blimp/Blimp.java 2307)       actionOutTimer( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2308)     else if( e.getSource( ) == menuHelpAbout )
Blimp.java                       2309)       actionHelpAbout( );
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2310)     else if( e.getSource( ) == textZoom )
org/blinkenarea/Blimp/Blimp.java 2311)       validateZoom( );
org/blinkenarea/Blimp/Blimp.java 2312)     else if( e.getSource( ) == textAspect )
org/blinkenarea/Blimp/Blimp.java 2313)       validateAspect( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2314)     else if( e.getSource( ) == textDuration )
Blimp.java                       2315)       validateDuration( );
Blimp.java                       2316)     else if( e.getSource( ) == buttonToolsNone )
Blimp.java                       2317)       frameEditor.setTool( BlinkenFrameEditor.toolNone );
Blimp.java                       2318)     else if( e.getSource( ) == buttonToolsColorPicker )
Blimp.java                       2319)       frameEditor.setTool( BlinkenFrameEditor.toolColorPicker );
Blimp.java                       2320)     else if( e.getSource( ) == buttonToolsDot )
Blimp.java                       2321)       frameEditor.setTool( BlinkenFrameEditor.toolDot );
Blimp.java                       2322)     else if( e.getSource( ) == buttonToolsLine )
Blimp.java                       2323)       frameEditor.setTool( BlinkenFrameEditor.toolLine );
Blimp.java                       2324)     else if( e.getSource( ) == buttonToolsRect )
Blimp.java                       2325)       frameEditor.setTool( BlinkenFrameEditor.toolRect );
Blimp.java                       2326)     else if( e.getSource( ) == buttonToolsFilledRect )
Blimp.java                       2327)       frameEditor.setTool( BlinkenFrameEditor.toolFilledRect );
Blimp.java                       2328)     else if( e.getSource( ) == buttonToolsCircle )
Blimp.java                       2329)       frameEditor.setTool( BlinkenFrameEditor.toolCircle );
Blimp.java                       2330)     else if( e.getSource( ) == buttonToolsFilledCircle )
Blimp.java                       2331)       frameEditor.setTool( BlinkenFrameEditor.toolFilledCircle );
Blimp.java                       2332)     else if( e.getSource( ) == buttonToolsCopy )
Blimp.java                       2333)       frameEditor.setTool( BlinkenFrameEditor.toolCopy );
Blimp.java                       2334)     else if( e.getSource( ) == buttonToolsPaste )
Blimp.java                       2335)       frameEditor.setTool( BlinkenFrameEditor.toolPaste );
Blimp.java                       2336)     else if( e.getSource( ) == buttonActionsInvert )
Blimp.java                       2337)       frameEditor.actionInvert( );
Blimp.java                       2338)     else if( e.getSource( ) == buttonActionsRotate90 )
Blimp.java                       2339)       frameEditor.actionRotate90( );
Blimp.java                       2340)     else if( e.getSource( ) == buttonActionsRotate180 )
Blimp.java                       2341)       frameEditor.actionRotate180( );
Blimp.java                       2342)     else if( e.getSource( ) == buttonActionsRotate270 )
Blimp.java                       2343)       frameEditor.actionRotate270( );
Blimp.java                       2344)     else if( e.getSource( ) == buttonActionsMirrorHor )
Blimp.java                       2345)       frameEditor.actionMirrorHor( );
Blimp.java                       2346)     else if( e.getSource( ) == buttonActionsMirrorVer )
Blimp.java                       2347)       frameEditor.actionMirrorVer( );
Blimp.java                       2348)     else if( e.getSource( ) == buttonActionsMirrorDiag )
Blimp.java                       2349)       frameEditor.actionMirrorDiag( );
Blimp.java                       2350)     else if( e.getSource( ) == buttonActionsMirrorDiag2 )
Blimp.java                       2351)       frameEditor.actionMirrorDiag2( );
Blimp.java                       2352)     else if( e.getSource( ) == buttonActionsRollLeft )
Blimp.java                       2353)       frameEditor.actionRollLeft( );
Blimp.java                       2354)     else if( e.getSource( ) == buttonActionsRollRight )
Blimp.java                       2355)       frameEditor.actionRollRight( );
Blimp.java                       2356)     else if( e.getSource( ) == buttonActionsRollUp )
Blimp.java                       2357)       frameEditor.actionRollUp( );
Blimp.java                       2358)     else if( e.getSource( ) == buttonActionsRollDown )
Blimp.java                       2359)       frameEditor.actionRollDown( );
Blimp.java                       2360)     else if( e.getSource( ) == buttonActionsUndo )
Blimp.java                       2361)       frameEditor.actionUndo( );
Blimp.java                       2362)     else if( e.getSource( ) == buttonActionsRedo )
Blimp.java                       2363)       frameEditor.actionRedo( );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2364)     else if( e.getSource( ) == buttonEditInsertFrame )
Blimp.java                       2365)       actionEditInsertFrame( );
Blimp.java                       2366)     else if( e.getSource( ) == buttonEditDuplicateFrame )
Blimp.java                       2367)       actionEditDuplicateFrame( );
Blimp.java                       2368)     else if( e.getSource( ) == buttonEditDeleteFrame )
Blimp.java                       2369)       actionEditDeleteFrame( );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2370)     else if( e.getSource( ) == buttonColorsPredefGray )
org/blinkenarea/Blimp/Blimp.java 2371)       actionColorsPredefGray( );
org/blinkenarea/Blimp/Blimp.java 2372)     else if( e.getSource( ) == buttonColorsPredefColor )
org/blinkenarea/Blimp/Blimp.java 2373)       actionColorsPredefColor( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2374)     else if( e.getSource( ) == buttonColorsColor )
Blimp.java                       2375)       actionColorsColor( );
Blimp.java                       2376)     else if( e.getSource( ) == textColorsColor )
Blimp.java                       2377)       validateColorsColor( );
Blimp.java                       2378)     else if( e.getSource( ) == textColorsAlpha )
Blimp.java                       2379)       validateColorsAlpha( );
Blimp.java                       2380)     else
Blimp.java                       2381)     {
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2382)       do //abuse of break
org/blinkenarea/Blimp/Blimp.java 2383)       {
org/blinkenarea/Blimp/Blimp.java 2384)         for( i = 0; i < menuEditResizeKnown.length; i++ )
org/blinkenarea/Blimp/Blimp.java 2385)           if( e.getSource( ) == menuEditResizeKnown[i] )
org/blinkenarea/Blimp/Blimp.java 2386)             break;
org/blinkenarea/Blimp/Blimp.java 2387)         if( i < menuEditResizeKnown.length )
org/blinkenarea/Blimp/Blimp.java 2388)         {
org/blinkenarea/Blimp/Blimp.java 2389)           actionEditResizeToFormat( getFormatOrSize( knownFormats[i] ) );
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2390)           actionEditResizeSetAspect( getAspect( knownFormats[i] ) );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2391)           break;
org/blinkenarea/Blimp/Blimp.java 2392)         }
org/blinkenarea/Blimp/Blimp.java 2393) 
org/blinkenarea/Blimp/Blimp.java 2394)         for( i = 0; i < menuEditScaleKnown.length; i++ )
org/blinkenarea/Blimp/Blimp.java 2395)           if( e.getSource( ) == menuEditScaleKnown[i] )
org/blinkenarea/Blimp/Blimp.java 2396)             break;
org/blinkenarea/Blimp/Blimp.java 2397)         if( i < menuEditScaleKnown.length )
org/blinkenarea/Blimp/Blimp.java 2398)         {
org/blinkenarea/Blimp/Blimp.java 2399)           actionEditScaleToSize( getFormatOrSize( knownSizes[i] ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2400)           break;
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2401)         }
org/blinkenarea/Blimp/Blimp.java 2402) 
org/blinkenarea/Blimp/Blimp.java 2403)         for( i = 0; i < constColorCnt; i++ )
org/blinkenarea/Blimp/Blimp.java 2404)           if( e.getSource( ) == buttonsColor[i] )
org/blinkenarea/Blimp/Blimp.java 2405)             break;
org/blinkenarea/Blimp/Blimp.java 2406)         if( i < constColorCnt )
org/blinkenarea/Blimp/Blimp.java 2407)         {
org/blinkenarea/Blimp/Blimp.java 2408)           actionColorIdx( i );
org/blinkenarea/Blimp/Blimp.java 2409)           break;
org/blinkenarea/Blimp/Blimp.java 2410)         }
org/blinkenarea/Blimp/Blimp.java 2411)       } while( false ); //end abuse of break
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2412)     }
Blimp.java                       2413)   }
Blimp.java                       2414) 
Blimp.java                       2415)   //some GUI value was adjusted
Blimp.java                       2416)   public void adjustmentValueChanged( AdjustmentEvent e )
Blimp.java                       2417)   {
Blimp.java                       2418)     if( e.getSource( ) == scrollFrames )
Blimp.java                       2419)       stateFrames( );
Blimp.java                       2420)   }
Blimp.java                       2421) 
Blimp.java                       2422)   //some GUI state changed
Blimp.java                       2423)   public void stateChanged( ChangeEvent e )
Blimp.java                       2424)   {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2425)     if( e.getSource( ) == sliderZoom )
org/blinkenarea/Blimp/Blimp.java 2426)       stateZoom( );
org/blinkenarea/Blimp/Blimp.java 2427)     else if( e.getSource( ) == sliderAspect )
org/blinkenarea/Blimp/Blimp.java 2428)       stateAspect( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2429)     else if( e.getSource( ) == sliderColorsAlpha )
Blimp.java                       2430)       stateColorsAlpha( );
Blimp.java                       2431)   }
Blimp.java                       2432) 
Blimp.java                       2433)   //a control got the focus
Blimp.java                       2434)   public void focusGained( FocusEvent e )
Blimp.java                       2435)   {
Blimp.java                       2436)   }
Blimp.java                       2437) 
Blimp.java                       2438)   //a control lost the focus
Blimp.java                       2439)   public void focusLost( FocusEvent e )
Blimp.java                       2440)   {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2441)     if( e.getSource( ) == textZoom )
org/blinkenarea/Blimp/Blimp.java 2442)       validateZoom( );
org/blinkenarea/Blimp/Blimp.java 2443)     else if( e.getSource( ) == textAspect )
org/blinkenarea/Blimp/Blimp.java 2444)       validateAspect( );
org/blinkenarea/Blimp/Blimp.java 2445)     else if( e.getSource( ) == textDuration )
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2446)       validateDuration( );
Blimp.java                       2447)     else if( e.getSource( ) == textColorsColor )
Blimp.java                       2448)       validateColorsColor( );
Blimp.java                       2449)     else if( e.getSource( ) == textColorsAlpha )
Blimp.java                       2450)       validateColorsAlpha( );
Blimp.java                       2451)   }
Blimp.java                       2452) 
Blimp.java                       2453)   //something was changed in a document
Blimp.java                       2454)   public void changedUpdate( DocumentEvent e )
Blimp.java                       2455)   {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2456)     if( e.getDocument( ) == textZoom.getDocument( ) )
org/blinkenarea/Blimp/Blimp.java 2457)       changeZoom( );
org/blinkenarea/Blimp/Blimp.java 2458)     else if( e.getDocument( ) == textAspect.getDocument( ) )
org/blinkenarea/Blimp/Blimp.java 2459)       changeAspect( );
org/blinkenarea/Blimp/Blimp.java 2460)     else if( e.getDocument( ) == textDuration.getDocument( ) )
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2461)       changeDuration( );
Blimp.java                       2462)     else if( e.getDocument( ) == textColorsColor.getDocument( ) )
Blimp.java                       2463)       changeColorsColor( );
Blimp.java                       2464)     else if( e.getDocument( ) == textColorsAlpha.getDocument( ) )
Blimp.java                       2465)       changeColorsAlpha( );
Blimp.java                       2466)   }
Blimp.java                       2467) 
Blimp.java                       2468)   //something was inserted into a document
Blimp.java                       2469)   public void insertUpdate( DocumentEvent e )
Blimp.java                       2470)   {
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2471)     if( e.getDocument( ) == textZoom.getDocument( ) )
org/blinkenarea/Blimp/Blimp.java 2472)       changeZoom( );
org/blinkenarea/Blimp/Blimp.java 2473)     else if( e.getDocument( ) == textAspect.getDocument( ) )
org/blinkenarea/Blimp/Blimp.java 2474)       changeAspect( );
org/blinkenarea/Blimp/Blimp.java 2475)     else if( e.getDocument( ) == textDuration.getDocument( ) )
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2476)       changeDuration( );
Blimp.java                       2477)   }
Blimp.java                       2478) 
Blimp.java                       2479)   //something was removed from a document
Blimp.java                       2480)   public void removeUpdate( DocumentEvent e )
Blimp.java                       2481)   {
Blimp.java                       2482)     if( e.getDocument( ) == textDuration.getDocument( ) )
Blimp.java                       2483)       changeDuration( );
Blimp.java                       2484)   }
Blimp.java                       2485) 
Blimp.java                       2486)   //info text of frame editor changed
Blimp.java                       2487)   public void blinkenFrameEditorInfo( String info )
Blimp.java                       2488)   {
Blimp.java                       2489)     labelFrameInfo.setText( info );
Blimp.java                       2490)   }
Blimp.java                       2491) 
Blimp.java                       2492)   //a color was picked in the frame editor
Blimp.java                       2493)   public void blinkenFrameEditorColorPicked( Color color )
Blimp.java                       2494)   {
Blimp.java                       2495)     //save new color
Blimp.java                       2496)     colors[colorIdx] = color;
Blimp.java                       2497) 
Blimp.java                       2498)     //redisplay new color (incl. alpha)
Blimp.java                       2499)     showColorsColor( );
Blimp.java                       2500)     showColorsAlpha( );
Blimp.java                       2501) 
Blimp.java                       2502)     //update color icon of active color
Blimp.java                       2503)     iconFromColor( iconsColor[colorIdx], colors[colorIdx] );
Blimp.java                       2504)     buttonsColor[colorIdx].repaint( );
Blimp.java                       2505) 
Blimp.java                       2506)     //set color of frame editor to new color
Blimp.java                       2507)     frameEditor.setColor( colors[colorIdx] );
Blimp.java                       2508)   }
Blimp.java                       2509) 
Blimp.java                       2510)   //the current frame was changed in the frame editor
Blimp.java                       2511)   public void blinkenFrameEditorFrameChanged( )
Blimp.java                       2512)   {
Blimp.java                       2513)     curMovieChanged = true;
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2514) 
org/blinkenarea/Blimp/Blimp.java 2515)     //output current frame
org/blinkenarea/Blimp/Blimp.java 2516)     outFrame( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2517)   }
Blimp.java                       2518) 
Blimp.java                       2519)   //the possibility to perfon an undo or redo operation changed
Blimp.java                       2520)   public void blinkenFrameEditorCanUndoRedo( boolean canUndo, boolean canRedo )
Blimp.java                       2521)   {
Blimp.java                       2522)     buttonActionsUndo.setEnabled( canUndo );
Blimp.java                       2523)     buttonActionsRedo.setEnabled( canRedo );
Blimp.java                       2524)   }
Blimp.java                       2525) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2526)   //output current frame
org/blinkenarea/Blimp/Blimp.java 2527)   private void outFrame( )
org/blinkenarea/Blimp/Blimp.java 2528)   {
org/blinkenarea/Blimp/Blimp.java 2529)     //stop output timer
org/blinkenarea/Blimp/Blimp.java 2530)     timerOut.stop( );
org/blinkenarea/Blimp/Blimp.java 2531) 
org/blinkenarea/Blimp/Blimp.java 2532)     //exit if no frame
org/blinkenarea/Blimp/Blimp.java 2533)     if( curFrame == null )
org/blinkenarea/Blimp/Blimp.java 2534)       return;
org/blinkenarea/Blimp/Blimp.java 2535) 
org/blinkenarea/Blimp/Blimp.java 2536)     //MCUF output
org/blinkenarea/Blimp/Blimp.java 2537)     if( menuOutputMcuf.isSelected( ) )
org/blinkenarea/Blimp/Blimp.java 2538)       outMcuf( );
org/blinkenarea/Blimp/Blimp.java 2539) 
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 2540)     //MCUF file output
org/blinkenarea/Blimp/Blimp.java 2541)     if( menuOutputMcufFile.isSelected( ) )
org/blinkenarea/Blimp/Blimp.java 2542)       outMcufFile( );
org/blinkenarea/Blimp/Blimp.java 2543) 
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2544)     //FlexiPix output
org/blinkenarea/Blimp/Blimp.java 2545)     if( menuOutputFlexiPix.isSelected( ) )
org/blinkenarea/Blimp/Blimp.java 2546)       outFlexiPix( );
org/blinkenarea/Blimp/Blimp.java 2547) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2548)     //re-output after 1 s
org/blinkenarea/Blimp/Blimp.java 2549)     timerOut.setInitialDelay( 1000 );
org/blinkenarea/Blimp/Blimp.java 2550)     timerOut.restart( );
org/blinkenarea/Blimp/Blimp.java 2551)   }
org/blinkenarea/Blimp/Blimp.java 2552) 
org/blinkenarea/Blimp/Blimp.java 2553)   //output current frame via MCUF
org/blinkenarea/Blimp/Blimp.java 2554)   private void outMcuf( )
org/blinkenarea/Blimp/Blimp.java 2555)   {
org/blinkenarea/Blimp/Blimp.java 2556)     byte [] data;
org/blinkenarea/Blimp/Blimp.java 2557)     DatagramPacket pack;
org/blinkenarea/Blimp/Blimp.java 2558) 
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2559)     // exit if no socket
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2560)     if( outMcufSock == null )
org/blinkenarea/Blimp/Blimp.java 2561)       return;
org/blinkenarea/Blimp/Blimp.java 2562) 
org/blinkenarea/Blimp/Blimp.java 2563)     //convert current frame into MCUF
org/blinkenarea/Blimp/Blimp.java 2564)     data = curFrame.toNetwork( BlinkenConstants.BlinkenProtoMcuf );
org/blinkenarea/Blimp/Blimp.java 2565)     if( data == null || data.length == 0 )
org/blinkenarea/Blimp/Blimp.java 2566)       return;
org/blinkenarea/Blimp/Blimp.java 2567) 
org/blinkenarea/Blimp/Blimp.java 2568)     //send packet
org/blinkenarea/Blimp/Blimp.java 2569)     pack = new DatagramPacket( data, data.length, outMcufHost, outMcufPort );
org/blinkenarea/Blimp/Blimp.java 2570)     try {
org/blinkenarea/Blimp/Blimp.java 2571)       outMcufSock.send( pack );
org/blinkenarea/Blimp/Blimp.java 2572)     }
org/blinkenarea/Blimp/Blimp.java 2573)     catch( java.io.IOException e )
org/blinkenarea/Blimp/Blimp.java 2574)     {
org/blinkenarea/Blimp/Blimp.java 2575)     }
org/blinkenarea/Blimp/Blimp.java 2576)   }
org/blinkenarea/Blimp/Blimp.java 2577) 
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 2578)   //output current frame via MCUF to file
org/blinkenarea/Blimp/Blimp.java 2579)   private void outMcufFile( )
org/blinkenarea/Blimp/Blimp.java 2580)   {
org/blinkenarea/Blimp/Blimp.java 2581)     byte [] data;
org/blinkenarea/Blimp/Blimp.java 2582)     DatagramPacket pack;
org/blinkenarea/Blimp/Blimp.java 2583) 
org/blinkenarea/Blimp/Blimp.java 2584)     // exit if no file open
org/blinkenarea/Blimp/Blimp.java 2585)     if( outMcufFile == null )
org/blinkenarea/Blimp/Blimp.java 2586)       return;
org/blinkenarea/Blimp/Blimp.java 2587) 
org/blinkenarea/Blimp/Blimp.java 2588)     //convert current frame into MCUF
org/blinkenarea/Blimp/Blimp.java 2589)     data = curFrame.toNetwork( BlinkenConstants.BlinkenProtoMcuf );
org/blinkenarea/Blimp/Blimp.java 2590)     if( data == null || data.length == 0 )
org/blinkenarea/Blimp/Blimp.java 2591)       return;
org/blinkenarea/Blimp/Blimp.java 2592) 
org/blinkenarea/Blimp/Blimp.java 2593)     //write data to file
org/blinkenarea/Blimp/Blimp.java 2594)     try {
org/blinkenarea/Blimp/Blimp.java 2595)       outMcufFile.write( data );
org/blinkenarea/Blimp/Blimp.java 2596)     }
org/blinkenarea/Blimp/Blimp.java 2597)     catch( java.io.IOException e )
org/blinkenarea/Blimp/Blimp.java 2598)     {
org/blinkenarea/Blimp/Blimp.java 2599)     }
org/blinkenarea/Blimp/Blimp.java 2600)   }
org/blinkenarea/Blimp/Blimp.java 2601) 
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2602)   //output current frame to FlexiPix
org/blinkenarea/Blimp/Blimp.java 2603)   private void outFlexiPix( )
org/blinkenarea/Blimp/Blimp.java 2604)   {
org/blinkenarea/Blimp/Blimp.java 2605)     BlinkenFrame frame;
org/blinkenarea/Blimp/Blimp.java 2606)     int width, height;
org/blinkenarea/Blimp/Blimp.java 2607)     byte [] data;
org/blinkenarea/Blimp/Blimp.java 2608) 
org/blinkenarea/Blimp/Blimp.java 2609)     // exit if no FlexiPix display
org/blinkenarea/Blimp/Blimp.java 2610)     if( outFlexiPixDisplay == null )
org/blinkenarea/Blimp/Blimp.java 2611)       return;
org/blinkenarea/Blimp/Blimp.java 2612) 
org/blinkenarea/Blimp/Blimp.java 2613)     //convert current frame to 24bit RGB and FlexiPix display size
org/blinkenarea/Blimp/Blimp.java 2614)     frame = new BlinkenFrame( curFrame );
org/blinkenarea/Blimp/Blimp.java 2615)     frame.resize( frame.getHeight( ), frame.getWidth( ), 3, 255 );
org/blinkenarea/Blimp/Blimp.java 2616)     width = outFlexiPixDisplay.getWidth( );
org/blinkenarea/Blimp/Blimp.java 2617)     height = outFlexiPixDisplay.getHeight( );
org/blinkenarea/Blimp/Blimp.java 2618)     frame.scale( height, width );
org/blinkenarea/Blimp/Blimp.java 2619) 
org/blinkenarea/Blimp/Blimp.java 2620)     //convert frame into MCUF data
org/blinkenarea/Blimp/Blimp.java 2621)     data = frame.toNetwork( BlinkenConstants.BlinkenProtoMcuf );
org/blinkenarea/Blimp/Blimp.java 2622)     if( data == null || data.length == 0 )
org/blinkenarea/Blimp/Blimp.java 2623)       return;
org/blinkenarea/Blimp/Blimp.java 2624) 
org/blinkenarea/Blimp/Blimp.java 2625)     //transfer data to FlexiPix display object
org/blinkenarea/Blimp/Blimp.java 2626)     outFlexiPixDisplay.data(data,
org/blinkenarea/Blimp/Blimp.java 2627)                             3, width * 3,         // x stride, y stride
org/blinkenarea/Blimp/Blimp.java 2628)                             12,                   // index of top-left pixel
org/blinkenarea/Blimp/Blimp.java 2629)                             0, 0, width, height); // whole area
org/blinkenarea/Blimp/Blimp.java 2630) 
org/blinkenarea/Blimp/Blimp.java 2631)     //send packets to real FlexiPix display
org/blinkenarea/Blimp/Blimp.java 2632)     outFlexiPixDisplay.send( );
org/blinkenarea/Blimp/Blimp.java 2633)   }
org/blinkenarea/Blimp/Blimp.java 2634) 
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2635)   //entry point of main thread
Blimp.java                       2636)   public void run( )
Blimp.java                       2637)   {
Blimp.java                       2638)     int i, val;
Blimp.java                       2639)     Dimension size;
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2640)     ImageIcon icon;
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2641)     Insets smallMargin;
Blimp.java                       2642) 
Blimp.java                       2643)     //initialize current movie, frame
Blimp.java                       2644)     curDir = new File( "." );
Christian Heimke Blimp v.0.5 (2004-11-19)

Christian Heimke authored 13 years ago

Blimp.java                       2645)     curMovie = new BlinkenMovie( defHeight, defWidth, defChannels, defMaxval );
Stefan Schuermans version available in class...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2646)     curMovie.insertInfo( 0, "creator", String.format( "Blimp (version %d.%d.%d)", Version.Major, Version.Minor, Version.Revision ) );
Christian Heimke Blimp v.0.5 (2004-11-19)

Christian Heimke authored 13 years ago

Blimp.java                       2647)     curMovie.insertFrame( 0, new BlinkenFrame( defHeight, defWidth, defChannels, defMaxval, defDuration ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2648)     curFrame = null;
Blimp.java                       2649) 
Blimp.java                       2650)     //runnning as full application
Blimp.java                       2651)     if( isFullApp )
Blimp.java                       2652)     {
Blimp.java                       2653)       //create main window
Blimp.java                       2654)       JFrame.setDefaultLookAndFeelDecorated( true );
Blimp.java                       2655)       frame = new JFrame( "Blimp" );
Blimp.java                       2656)       frame.setDefaultCloseOperation( JFrame.DO_NOTHING_ON_CLOSE );
Blimp.java                       2657)       frame.addWindowListener( this );
Blimp.java                       2658)       //create menu bar
Blimp.java                       2659)       menubar = new JMenuBar( );
Blimp.java                       2660)       frame.setJMenuBar( menubar );
Blimp.java                       2661)       //create main panel
Blimp.java                       2662)       panel = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2663)       frame.getContentPane( ).add( panel );
Blimp.java                       2664)       //use main window as parent for dialogs
Blimp.java                       2665)       dialogParent = frame;
Blimp.java                       2666)     }
Blimp.java                       2667)     //runnning as applet
Blimp.java                       2668)     else
Blimp.java                       2669)     {
Blimp.java                       2670)       //no main window - applet is main window
Blimp.java                       2671)       frame = null;
Blimp.java                       2672)       //create menu bar
Blimp.java                       2673)       menubar = new JMenuBar( );
Blimp.java                       2674)       setJMenuBar( menubar );
Blimp.java                       2675)       //create main panel
Blimp.java                       2676)       panel = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2677)       getContentPane( ).add( panel );
Blimp.java                       2678)       //use applet as parent for dialogs
Blimp.java                       2679)       dialogParent = this;
Blimp.java                       2680)     }
Blimp.java                       2681) 
Blimp.java                       2682)     //create menus
Blimp.java                       2683)     //file menu
Blimp.java                       2684)     menuFile = new JMenu( "File" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2685)     menuFile.setMnemonic( KeyEvent.VK_F );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2686)     menubar.add( menuFile );
Blimp.java                       2687)     menuFileNew = new JMenuItem( "New" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2688)     menuFileNew.setMnemonic( KeyEvent.VK_N );
Blimp.java                       2689)     menuFileNew.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_N, KeyEvent.CTRL_MASK ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2690)     menuFileNew.addActionListener( this );
Blimp.java                       2691)     menuFile.add( menuFileNew );
Blimp.java                       2692)     menuFileLoad = new JMenuItem( "Load..." );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2693)     menuFileLoad.setMnemonic( KeyEvent.VK_L );
Blimp.java                       2694)     menuFileLoad.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_L, KeyEvent.CTRL_MASK ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2695)     menuFileLoad.addActionListener( this );
Blimp.java                       2696)     menuFile.add( menuFileLoad );
Blimp.java                       2697)     menuFileSave = new JMenuItem( "Save" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2698)     menuFileSave.setMnemonic( KeyEvent.VK_S );
Blimp.java                       2699)     menuFileSave.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_S, KeyEvent.CTRL_MASK ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2700)     menuFileSave.addActionListener( this );
Blimp.java                       2701)     menuFile.add( menuFileSave );
Blimp.java                       2702)     menuFileSaveAs = new JMenuItem( "Save as..." );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2703)     menuFileSaveAs.setMnemonic( KeyEvent.VK_A );
Blimp.java                       2704)     menuFileSaveAs.setDisplayedMnemonicIndex( 5 );
Blimp.java                       2705)     menuFileSaveAs.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_A, KeyEvent.CTRL_MASK ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2706)     menuFileSaveAs.addActionListener( this );
Blimp.java                       2707)     menuFile.add( menuFileSaveAs );
Blimp.java                       2708)     if( isFullApp )
Blimp.java                       2709)       menuFile.addSeparator( );
Blimp.java                       2710)     menuFileQuit = new JMenuItem( "Quit" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2711)     menuFileQuit.setMnemonic( KeyEvent.VK_Q );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2712)     menuFileQuit.addActionListener( this );
Blimp.java                       2713)     if( isFullApp )
Blimp.java                       2714)       menuFile.add( menuFileQuit );
Blimp.java                       2715)     //information menu
Blimp.java                       2716)     menuInfo = new JMenu( "Information" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2717)     menuInfo.setMnemonic( KeyEvent.VK_I );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2718)     menubar.add( menuInfo );
Blimp.java                       2719)     menuInfoShow = new JMenuItem( "Show..." );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2720)     menuInfoShow.setMnemonic( KeyEvent.VK_S );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2721)     menuInfoShow.addActionListener( this );
Blimp.java                       2722)     menuInfo.add( menuInfoShow );
Blimp.java                       2723)     menuInfoAdd = new JMenuItem( "Add..." );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2724)     menuInfoAdd.setMnemonic( KeyEvent.VK_A );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2725)     menuInfoAdd.addActionListener( this );
Blimp.java                       2726)     menuInfo.add( menuInfoAdd );
Blimp.java                       2727)     menuInfoDelete = new JMenuItem( "Delete..." );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2728)     menuInfoDelete.setMnemonic( KeyEvent.VK_D );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2729)     menuInfoDelete.addActionListener( this );
Blimp.java                       2730)     menuInfo.add( menuInfoDelete );
Blimp.java                       2731)     //edit menu
Blimp.java                       2732)     menuEdit = new JMenu( "Edit" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2733)     menuEdit.setMnemonic( KeyEvent.VK_E );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2734)     menubar.add( menuEdit );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2735)     menuEditResize = new JMenu("Resize Movie");
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2736)     menuEdit.add( menuEditResize );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2737)     menuEditResize.setMnemonic( KeyEvent.VK_R );
org/blinkenarea/Blimp/Blimp.java 2738)     menuEditResizeUser = new JMenuItem( "user defined format..." );
org/blinkenarea/Blimp/Blimp.java 2739)     menuEditResizeUser.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2740)     menuEditResize.add( menuEditResizeUser );
org/blinkenarea/Blimp/Blimp.java 2741)     menuEditResize.addSeparator( );
org/blinkenarea/Blimp/Blimp.java 2742)     menuEditResizeKnown = new JMenuItem[knownFormats.length];
org/blinkenarea/Blimp/Blimp.java 2743)     for( i = 0; i < knownFormats.length; i++ )
org/blinkenarea/Blimp/Blimp.java 2744)     {
org/blinkenarea/Blimp/Blimp.java 2745)       menuEditResizeKnown[i] = new JMenuItem( knownFormats[i] );
org/blinkenarea/Blimp/Blimp.java 2746)       menuEditResizeKnown[i].addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2747)       menuEditResize.add( menuEditResizeKnown[i] );
org/blinkenarea/Blimp/Blimp.java 2748)     }
org/blinkenarea/Blimp/Blimp.java 2749)     menuEditScale = new JMenu ( "Scale Movie" );
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       2750)     menuEdit.add( menuEditScale );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2751)     menuEditScale.setMnemonic( KeyEvent.VK_S );
org/blinkenarea/Blimp/Blimp.java 2752)     menuEditScaleUser = new JMenuItem( "user defined size..." );
org/blinkenarea/Blimp/Blimp.java 2753)     menuEditScaleUser.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2754)     menuEditScale.add( menuEditScaleUser );
org/blinkenarea/Blimp/Blimp.java 2755)     menuEditScale.addSeparator( );
org/blinkenarea/Blimp/Blimp.java 2756)     menuEditScaleKnown = new JMenuItem[knownSizes.length];
org/blinkenarea/Blimp/Blimp.java 2757)     for( i = 0; i < knownSizes.length; i++ )
org/blinkenarea/Blimp/Blimp.java 2758)     {
org/blinkenarea/Blimp/Blimp.java 2759)       menuEditScaleKnown[i] = new JMenuItem( knownSizes[i] );
org/blinkenarea/Blimp/Blimp.java 2760)       menuEditScaleKnown[i].addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2761)       menuEditScale.add( menuEditScaleKnown[i] );
org/blinkenarea/Blimp/Blimp.java 2762)     }
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2763)     menuEdit.addSeparator( );
Blimp.java                       2764)     menuEditInsertFrame = new JMenuItem( "Insert Frame" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2765)     menuEditInsertFrame.setMnemonic( KeyEvent.VK_I );
Blimp.java                       2766)     menuEditInsertFrame.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_I, KeyEvent.CTRL_MASK ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2767)     menuEditInsertFrame.addActionListener( this );
Blimp.java                       2768)     menuEdit.add( menuEditInsertFrame );
Blimp.java                       2769)     menuEditDuplicateFrame = new JMenuItem( "Duplicate Frame" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2770)     menuEditDuplicateFrame.setMnemonic( KeyEvent.VK_D );
Blimp.java                       2771)     menuEditDuplicateFrame.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_D, KeyEvent.CTRL_MASK ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2772)     menuEditDuplicateFrame.setEnabled( false );
Blimp.java                       2773)     menuEditDuplicateFrame.addActionListener( this );
Blimp.java                       2774)     menuEdit.add( menuEditDuplicateFrame );
Blimp.java                       2775)     menuEditDeleteFrame = new JMenuItem( "Delete Frame" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2776)     menuEditDeleteFrame.setMnemonic( KeyEvent.VK_L );
Blimp.java                       2777)     menuEditDeleteFrame.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_X, KeyEvent.CTRL_MASK ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2778)     menuEditDeleteFrame.setEnabled( false );
Blimp.java                       2779)     menuEditDeleteFrame.addActionListener( this );
Blimp.java                       2780)     menuEdit.add( menuEditDeleteFrame );
Christian Heimke Blimp v.0.6 (2005-03-10)

Christian Heimke authored 13 years ago

Blimp.java                       2781)     menuEdit.addSeparator( );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2782)     menuEditImportImages = new JMenuItem( "Import Images..." );
Blimp.java                       2783)     menuEditImportImages.setMnemonic( KeyEvent.VK_P );
Blimp.java                       2784)     menuEditImportImages.setDisplayedMnemonicIndex( 7 );
Blimp.java                       2785)     menuEditImportImages.addActionListener( this );
Blimp.java                       2786)     menuEdit.add( menuEditImportImages );
Blimp.java                       2787)     menuEditImportMovie = new JMenuItem( "Import Movie..." );
Blimp.java                       2788)     menuEditImportMovie.setMnemonic( KeyEvent.VK_M );
Blimp.java                       2789)     menuEditImportMovie.setDisplayedMnemonicIndex( 7 );
Blimp.java                       2790)     menuEditImportMovie.addActionListener( this );
Blimp.java                       2791)     menuEdit.add( menuEditImportMovie );
Blimp.java                       2792)     //frame selection menu
Blimp.java                       2793)     menuFrameSel = new JMenu( "Frame-Selection" );
Blimp.java                       2794)     menuFrameSel.setMnemonic( KeyEvent.VK_S );
Blimp.java                       2795)     menubar.add( menuFrameSel );
Blimp.java                       2796)     menuFrameSelNone = new JMenuItem( "Select None" );
Blimp.java                       2797)     menuFrameSelNone.setMnemonic( KeyEvent.VK_N );
Blimp.java                       2798)     menuFrameSelNone.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_N, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2799)     menuFrameSelNone.addActionListener( this );
Blimp.java                       2800)     menuFrameSel.add( menuFrameSelNone );
Blimp.java                       2801)     menuFrameSelSingle = new JMenuItem( "Select Single Frame" );
Blimp.java                       2802)     menuFrameSelSingle.setMnemonic( KeyEvent.VK_F );
Blimp.java                       2803)     menuFrameSelSingle.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_F, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2804)     menuFrameSelSingle.setEnabled( false );
Blimp.java                       2805)     menuFrameSelSingle.addActionListener( this );
Blimp.java                       2806)     menuFrameSel.add( menuFrameSelSingle );
Blimp.java                       2807)     menuFrameSelStart = new JMenuItem( "Start of Selection" );
Blimp.java                       2808)     menuFrameSelStart.setMnemonic( KeyEvent.VK_S );
Blimp.java                       2809)     menuFrameSelStart.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_S, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2810)     menuFrameSelStart.setEnabled( false );
Blimp.java                       2811)     menuFrameSelStart.addActionListener( this );
Blimp.java                       2812)     menuFrameSel.add( menuFrameSelStart );
Blimp.java                       2813)     menuFrameSelEnd = new JMenuItem( "End of Selection" );
Blimp.java                       2814)     menuFrameSelEnd.setMnemonic( KeyEvent.VK_E );
Blimp.java                       2815)     menuFrameSelEnd.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_E, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2816)     menuFrameSelEnd.setEnabled( false );
Blimp.java                       2817)     menuFrameSelEnd.addActionListener( this );
Blimp.java                       2818)     menuFrameSel.add( menuFrameSelEnd );
Blimp.java                       2819)     menuFrameSel.addSeparator( );
Blimp.java                       2820)     menuFrameSelCopy = new JMenuItem( "Copy" );
Blimp.java                       2821)     menuFrameSelCopy.setMnemonic( KeyEvent.VK_C );
Blimp.java                       2822)     menuFrameSelCopy.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_C, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2823)     menuFrameSelCopy.setEnabled( false );
Blimp.java                       2824)     menuFrameSelCopy.addActionListener( this );
Blimp.java                       2825)     menuFrameSel.add( menuFrameSelCopy );
Blimp.java                       2826)     menuFrameSelMove = new JMenuItem( "Move" );
Blimp.java                       2827)     menuFrameSelMove.setMnemonic( KeyEvent.VK_M );
Blimp.java                       2828)     menuFrameSelMove.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_M, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2829)     menuFrameSelMove.setEnabled( false );
Blimp.java                       2830)     menuFrameSelMove.addActionListener( this );
Blimp.java                       2831)     menuFrameSel.add( menuFrameSelMove );
Blimp.java                       2832)     menuFrameSelReverse = new JMenuItem( "Reverse" );
Blimp.java                       2833)     menuFrameSelReverse.setMnemonic( KeyEvent.VK_R );
Blimp.java                       2834)     menuFrameSelReverse.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_R, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2835)     menuFrameSelReverse.setEnabled( false );
Blimp.java                       2836)     menuFrameSelReverse.addActionListener( this );
Blimp.java                       2837)     menuFrameSel.add( menuFrameSelReverse );
Blimp.java                       2838)     menuFrameSelDelete = new JMenuItem( "Delete" );
Blimp.java                       2839)     menuFrameSelDelete.setMnemonic( KeyEvent.VK_L );
Blimp.java                       2840)     menuFrameSelDelete.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_X, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK ) );
Blimp.java                       2841)     menuFrameSelDelete.setEnabled( false );
Blimp.java                       2842)     menuFrameSelDelete.addActionListener( this );
Blimp.java                       2843)     menuFrameSel.add( menuFrameSelDelete );
Stefan Schuermans added scrolling text genera...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2844)     //generate menu
org/blinkenarea/Blimp/Blimp.java 2845)     menuGen = new JMenu( "Generate" );
org/blinkenarea/Blimp/Blimp.java 2846)     menuGen.setMnemonic( KeyEvent.VK_G );
org/blinkenarea/Blimp/Blimp.java 2847)     menubar.add( menuGen );
org/blinkenarea/Blimp/Blimp.java 2848)     menuGenScrollText = new JMenuItem( "Scrolling Text..." );
org/blinkenarea/Blimp/Blimp.java 2849)     menuGenScrollText.setMnemonic( KeyEvent.VK_S );
org/blinkenarea/Blimp/Blimp.java 2850)     menuGenScrollText.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2851)     menuGen.add( menuGenScrollText );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2852)     //play menu
Blimp.java                       2853)     menuPlay = new JMenu( "Play" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2854)     menuPlay.setMnemonic( KeyEvent.VK_P );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2855)     menubar.add( menuPlay );
Blimp.java                       2856)     menuPlayStart = new JMenuItem( "Start" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2857)     menuPlayStart.setMnemonic( KeyEvent.VK_S );
Blimp.java                       2858)     menuPlayStart.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_F11, 0 ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2859)     menuPlayStart.addActionListener( this );
Blimp.java                       2860)     menuPlay.add( menuPlayStart );
Blimp.java                       2861)     menuPlayStop = new JMenuItem( "Stop" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2862)     menuPlayStop.setMnemonic( KeyEvent.VK_P );
Blimp.java                       2863)     menuPlayStop.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_F12, 0 ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2864)     menuPlayStop.setEnabled( false );
Blimp.java                       2865)     menuPlayStop.addActionListener( this );
Blimp.java                       2866)     menuPlay.add( menuPlayStop );
Blimp.java                       2867)     menuPlay.addSeparator( );
Blimp.java                       2868)     menuPlayBegin = new JCheckBoxMenuItem( "From Begin", false );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2869)     menuPlayBegin.setMnemonic( KeyEvent.VK_B );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2870)     menuPlayBegin.addActionListener( this );
Blimp.java                       2871)     menuPlay.add( menuPlayBegin );
Blimp.java                       2872)     menuPlayLoop = new JCheckBoxMenuItem( "Looped", false );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2873)     menuPlayLoop.setMnemonic( KeyEvent.VK_L );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2874)     menuPlayLoop.addActionListener( this );
Blimp.java                       2875)     menuPlay.add( menuPlayLoop );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2876)     //output menu
org/blinkenarea/Blimp/Blimp.java 2877)     menuOutput = new JMenu( "Output" );
org/blinkenarea/Blimp/Blimp.java 2878)     menuOutput.setMnemonic( KeyEvent.VK_O );
org/blinkenarea/Blimp/Blimp.java 2879)     menubar.add( menuOutput );
org/blinkenarea/Blimp/Blimp.java 2880)     groupOutput = new ButtonGroup( );
org/blinkenarea/Blimp/Blimp.java 2881)     menuOutputNone = new JRadioButtonMenuItem( "none", false );
org/blinkenarea/Blimp/Blimp.java 2882)     menuOutputNone.setMnemonic( KeyEvent.VK_N );
org/blinkenarea/Blimp/Blimp.java 2883)     menuOutputNone.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2884)     menuOutput.add( menuOutputNone );
org/blinkenarea/Blimp/Blimp.java 2885)     groupOutput.add( menuOutputNone );
org/blinkenarea/Blimp/Blimp.java 2886)     menuOutputMcuf = new JRadioButtonMenuItem( "MCUF", false );
org/blinkenarea/Blimp/Blimp.java 2887)     menuOutputMcuf.setMnemonic( KeyEvent.VK_M );
org/blinkenarea/Blimp/Blimp.java 2888)     menuOutputMcuf.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2889)     menuOutput.add( menuOutputMcuf );
org/blinkenarea/Blimp/Blimp.java 2890)     groupOutput.add( menuOutputMcuf );
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 2891)     menuOutputMcufFile = new JRadioButtonMenuItem( "MCUF file/device", false );
org/blinkenarea/Blimp/Blimp.java 2892)     menuOutputMcufFile.setMnemonic( KeyEvent.VK_D );
org/blinkenarea/Blimp/Blimp.java 2893)     menuOutputMcufFile.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2894)     menuOutput.add( menuOutputMcufFile );
org/blinkenarea/Blimp/Blimp.java 2895)     groupOutput.add( menuOutputMcufFile );
Stefan Schuermans added FlexiPix output

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2896)     menuOutputFlexiPix = new JRadioButtonMenuItem( "FlexiPix", false );
org/blinkenarea/Blimp/Blimp.java 2897)     menuOutputFlexiPix.setMnemonic( KeyEvent.VK_F );
org/blinkenarea/Blimp/Blimp.java 2898)     menuOutputFlexiPix.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2899)     menuOutput.add( menuOutputFlexiPix );
org/blinkenarea/Blimp/Blimp.java 2900)     groupOutput.add( menuOutputFlexiPix );
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2901)     menuOutputNone.setSelected( true );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2902)     //help menu
Blimp.java                       2903)     menuHelp = new JMenu( "Help" );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2904)     menuHelp.setMnemonic( KeyEvent.VK_H );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2905)     menubar.add( menuHelp );
Blimp.java                       2906)     menuHelpAbout = new JMenuItem( "About..." );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2907)     menuHelpAbout.setMnemonic( KeyEvent.VK_A );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2908)     menuHelpAbout.addActionListener( this );
Blimp.java                       2909)     menuHelp.add( menuHelpAbout );
Blimp.java                       2910) 
Blimp.java                       2911)     //create controls
Blimp.java                       2912)     smallMargin = new Insets( 1, 1, 1, 1 );
Blimp.java                       2913)     panel.setBorder( new EmptyBorder( 5, 5, 5, 5 ) );
Blimp.java                       2914)     //status bar
Blimp.java                       2915)     panelStatus = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2916)     panel.add( panelStatus, BorderLayout.SOUTH );
Blimp.java                       2917)     panelStatus.add( new JSeparator( JSeparator.HORIZONTAL ), BorderLayout.NORTH );
Blimp.java                       2918)     labelStatus = new JLabel( "ready..." );
Blimp.java                       2919)     panelStatus.add( labelStatus, BorderLayout.CENTER );
Blimp.java                       2920)     //main panel
Blimp.java                       2921)     panelMain = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2922)     panel.add( panelMain, BorderLayout.CENTER );
Blimp.java                       2923)     //frames panel
Blimp.java                       2924)     panelFrames = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2925)     panelMain.add( panelFrames, BorderLayout.SOUTH );
Blimp.java                       2926)     scrollFrames = new JScrollBar( SwingConstants.HORIZONTAL, 0, 0, 0, 0 );
Blimp.java                       2927)     scrollFrames.addAdjustmentListener( this );
Blimp.java                       2928)     panelFrames.add( scrollFrames, BorderLayout.CENTER );
Blimp.java                       2929)     labelFrames = new JLabel( "frame: -/0" );
Blimp.java                       2930)     labelFrames.setLabelFor( scrollFrames );
Blimp.java                       2931)     panelFrames.add( labelFrames, BorderLayout.WEST );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       2932)     labelSelFrames = new JLabel( "selected: -/-" );
Blimp.java                       2933)     labelSelFrames.setLabelFor( scrollFrames );
Blimp.java                       2934)     panelFrames.add( labelSelFrames, BorderLayout.EAST );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2935)     //outer and middle frame panel
Blimp.java                       2936)     panelOuterFrame = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2937)     panelMain.add( panelOuterFrame, BorderLayout.CENTER );
Blimp.java                       2938)     panelOuterFrame.add( new JSeparator( JSeparator.HORIZONTAL ), BorderLayout.SOUTH );
Blimp.java                       2939)     panelMiddleFrame = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2940)     panelOuterFrame.add( panelMiddleFrame, BorderLayout.CENTER );
Blimp.java                       2941)     panelMiddleFrame.add( new JSeparator( JSeparator.VERTICAL ), BorderLayout.WEST );
Blimp.java                       2942)     panelMiddleFrame.add( new JSeparator( JSeparator.VERTICAL ), BorderLayout.EAST );
Blimp.java                       2943)     //frame panel
Blimp.java                       2944)     panelFrame = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       2945)     panelMiddleFrame.add( panelFrame, BorderLayout.CENTER );
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2946)     panelZoom = new JPanel( new BorderLayout( 5, 5 ) );
org/blinkenarea/Blimp/Blimp.java 2947)     panelFrame.add( panelZoom, BorderLayout.EAST );
org/blinkenarea/Blimp/Blimp.java 2948)     panelZoomName = new JPanel( new GridLayout( 2, 1, 0, 0 ) );
org/blinkenarea/Blimp/Blimp.java 2949)     panelZoom.add( panelZoomName, BorderLayout.NORTH );
org/blinkenarea/Blimp/Blimp.java 2950)     labelZoomName = new JLabel( "zoom", JLabel.CENTER );
org/blinkenarea/Blimp/Blimp.java 2951)     panelZoomName.add( labelZoomName );
org/blinkenarea/Blimp/Blimp.java 2952)     labelZoom = new JLabel( "", JLabel.CENTER );
org/blinkenarea/Blimp/Blimp.java 2953)     panelZoomName.add( labelZoom );
org/blinkenarea/Blimp/Blimp.java 2954)     sliderZoom = new JSlider( JSlider.VERTICAL, 0, 6 * ZoomAspectResolution, 3 * ZoomAspectResolution );
org/blinkenarea/Blimp/Blimp.java 2955)     sliderZoom.setSnapToTicks( true );
org/blinkenarea/Blimp/Blimp.java 2956)     sliderZoom.setInverted( true );
org/blinkenarea/Blimp/Blimp.java 2957)     sliderZoom.addChangeListener( this );
org/blinkenarea/Blimp/Blimp.java 2958)     sliderZoom.setToolTipText( "zoom" );
org/blinkenarea/Blimp/Blimp.java 2959)     panelZoom.add( sliderZoom, BorderLayout.CENTER );
org/blinkenarea/Blimp/Blimp.java 2960)     labelZoom.setLabelFor( sliderZoom );
org/blinkenarea/Blimp/Blimp.java 2961)     textZoom = new JTextField( 4 );
org/blinkenarea/Blimp/Blimp.java 2962)     textZoom.setHorizontalAlignment( JTextField.CENTER );
org/blinkenarea/Blimp/Blimp.java 2963)     textZoom.getDocument( ).addDocumentListener( this );
org/blinkenarea/Blimp/Blimp.java 2964)     textZoom.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2965)     textZoom.addFocusListener( this );
org/blinkenarea/Blimp/Blimp.java 2966)     panelZoom.add( textZoom, BorderLayout.SOUTH );
org/blinkenarea/Blimp/Blimp.java 2967)     panelAspect = new JPanel( new BorderLayout( 5, 5 ) );
org/blinkenarea/Blimp/Blimp.java 2968)     panelFrame.add( panelAspect, BorderLayout.WEST );
org/blinkenarea/Blimp/Blimp.java 2969)     panelAspectName = new JPanel( new GridLayout( 2, 1, 0, 0 ) );
org/blinkenarea/Blimp/Blimp.java 2970)     panelAspect.add( panelAspectName, BorderLayout.NORTH );
org/blinkenarea/Blimp/Blimp.java 2971)     labelAspectName = new JLabel( "aspect", JLabel.CENTER );
org/blinkenarea/Blimp/Blimp.java 2972)     panelAspectName.add( labelAspectName );
org/blinkenarea/Blimp/Blimp.java 2973)     labelAspect = new JLabel( "", JLabel.CENTER );
org/blinkenarea/Blimp/Blimp.java 2974)     panelAspectName.add( labelAspect );
Christian Heimke Blimp v.1.3.4 (2008-09-14)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2975)     sliderAspect = new JSlider( JSlider.VERTICAL, -3 * ZoomAspectResolution, 3 * ZoomAspectResolution, aspectZoomToSliderValue( defAspect ) );
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 2976)     sliderAspect.setSnapToTicks( true );
org/blinkenarea/Blimp/Blimp.java 2977)     sliderAspect.addChangeListener( this );
org/blinkenarea/Blimp/Blimp.java 2978)     sliderAspect.setToolTipText( "aspect" );
org/blinkenarea/Blimp/Blimp.java 2979)     panelAspect.add( sliderAspect, BorderLayout.CENTER );
org/blinkenarea/Blimp/Blimp.java 2980)     labelAspect.setLabelFor( sliderAspect );
org/blinkenarea/Blimp/Blimp.java 2981)     textAspect = new JTextField( 4 );
org/blinkenarea/Blimp/Blimp.java 2982)     textAspect.setHorizontalAlignment( JTextField.CENTER );
org/blinkenarea/Blimp/Blimp.java 2983)     textAspect.getDocument( ).addDocumentListener( this );
org/blinkenarea/Blimp/Blimp.java 2984)     textAspect.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 2985)     textAspect.addFocusListener( this );
org/blinkenarea/Blimp/Blimp.java 2986)     panelAspect.add( textAspect, BorderLayout.SOUTH );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       2987)     frameEditor = new BlinkenFrameEditor( );
Blimp.java                       2988)     scrollpaneFrame = new JScrollPane( frameEditor );
Blimp.java                       2989)     panelFrame.add( scrollpaneFrame, BorderLayout.CENTER );
Blimp.java                       2990)     labelFrameInfo = new JLabel( "", JLabel.CENTER );
Blimp.java                       2991)     labelFrameInfo.setLabelFor( frameEditor );
Blimp.java                       2992)     panelFrame.add( labelFrameInfo, BorderLayout.NORTH );
Blimp.java                       2993)     frameEditor.setEditorListener( this );
Blimp.java                       2994)     panelDuration = new JPanel( new FlowLayout( FlowLayout.CENTER, 5, 5 ) );
Blimp.java                       2995)     panelFrame.add( panelDuration, BorderLayout.SOUTH );
Blimp.java                       2996)     textDuration = new JTextField( 5 );
Blimp.java                       2997)     textDuration.setHorizontalAlignment( JTextField.CENTER );
Blimp.java                       2998)     textDuration.setEnabled( false );
Blimp.java                       2999)     textDuration.getDocument( ).addDocumentListener( this );
Blimp.java                       3000)     textDuration.addActionListener( this );
Blimp.java                       3001)     textDuration.addFocusListener( this );
Blimp.java                       3002)     labelDuration = new JLabel( "duration (ms): " );
Blimp.java                       3003)     labelDuration.setLabelFor( textDuration );
Blimp.java                       3004)     panelDuration.add( labelDuration );
Blimp.java                       3005)     panelDuration.add( textDuration );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       3006)     //tool, action and edit panels
Blimp.java                       3007)     panelOuterEdit = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       3008)     panelOuterFrame.add( panelOuterEdit, BorderLayout.WEST );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3009)     panelOuterTools = new JPanel( new GridLayout( 2, 1, 5, 5 ) );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       3010)     panelOuterEdit.add( panelOuterTools, BorderLayout.CENTER );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3011)     panelMiddleTools = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       3012)     panelOuterTools.add( panelMiddleTools );
Blimp.java                       3013)     panelTools = new JPanel( new GridLayout( 4, 3, 5, 5 ) );
Blimp.java                       3014)     panelMiddleTools.add( panelTools, BorderLayout.CENTER );
Blimp.java                       3015)     panelMiddleTools.add( new JSeparator( JSeparator.HORIZONTAL ), BorderLayout.SOUTH );
Blimp.java                       3016)     panelActions = new JPanel( new GridLayout( 5, 3, 5, 5 ) );
Blimp.java                       3017)     panelOuterTools.add( panelActions );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       3018)     panelMiddleEdit = new JPanel( new BorderLayout( 5, 5 ) );
Blimp.java                       3019)     panelOuterEdit.add( panelMiddleEdit, BorderLayout.SOUTH );
Blimp.java                       3020)     panelMiddleEdit.add( new JSeparator( JSeparator.HORIZONTAL ), BorderLayout.NORTH );
Blimp.java                       3021)     panelEdit = new JPanel( new GridLayout( 1, 3, 5, 5 ) );
Blimp.java                       3022)     panelMiddleEdit.add( panelEdit, BorderLayout.CENTER );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3023)     //tool buttons
Blimp.java                       3024)     groupTools = new ButtonGroup( );
Blimp.java                       3025)     buttonToolsNone = new JToggleButton( );
Blimp.java                       3026)     buttonToolsNone.setMargin( smallMargin );
Blimp.java                       3027)     buttonToolsNone.setToolTipText( "no tool" );
Blimp.java                       3028)     buttonToolsNone.addActionListener( this );
Blimp.java                       3029)     groupTools.add( buttonToolsNone );
Blimp.java                       3030)     panelTools.add( buttonToolsNone );
Blimp.java                       3031)     buttonToolsColorPicker = new JToggleButton( loadImageIcon( "ColorPicker.png" ) );
Blimp.java                       3032)     buttonToolsColorPicker.setMargin( smallMargin );
Blimp.java                       3033)     buttonToolsColorPicker.setToolTipText( "Color Picker" );
Blimp.java                       3034)     buttonToolsColorPicker.addActionListener( this );
Blimp.java                       3035)     groupTools.add( buttonToolsColorPicker );
Blimp.java                       3036)     panelTools.add( buttonToolsColorPicker );
Blimp.java                       3037)     buttonToolsDot = new JToggleButton( loadImageIcon( "Dot.png" ) );
Blimp.java                       3038)     buttonToolsDot.setMargin( smallMargin );
Blimp.java                       3039)     buttonToolsDot.setToolTipText( "Dot" );
Blimp.java                       3040)     buttonToolsDot.addActionListener( this );
Blimp.java                       3041)     groupTools.add( buttonToolsDot );
Blimp.java                       3042)     panelTools.add( buttonToolsDot );
Blimp.java                       3043)     buttonToolsLine = new JToggleButton( loadImageIcon( "Line.png" ) );
Blimp.java                       3044)     buttonToolsLine.setMargin( smallMargin );
Blimp.java                       3045)     buttonToolsLine.setToolTipText( "Line" );
Blimp.java                       3046)     buttonToolsLine.addActionListener( this );
Blimp.java                       3047)     groupTools.add( buttonToolsLine );
Blimp.java                       3048)     panelTools.add( buttonToolsLine );
Blimp.java                       3049)     buttonToolsRect = new JToggleButton( loadImageIcon( "Rectangle.png" ) );
Blimp.java                       3050)     buttonToolsRect.setMargin( smallMargin );
Blimp.java                       3051)     buttonToolsRect.setToolTipText( "Rectangle" );
Blimp.java                       3052)     buttonToolsRect.addActionListener( this );
Blimp.java                       3053)     groupTools.add( buttonToolsRect );
Blimp.java                       3054)     panelTools.add( buttonToolsRect );
Blimp.java                       3055)     buttonToolsFilledRect = new JToggleButton( loadImageIcon( "FilledRectangle.png" ) );
Blimp.java                       3056)     buttonToolsFilledRect.setMargin( smallMargin );
Blimp.java                       3057)     buttonToolsFilledRect.setToolTipText( "Filled Rectangle" );
Blimp.java                       3058)     buttonToolsFilledRect.addActionListener( this );
Blimp.java                       3059)     groupTools.add( buttonToolsFilledRect );
Blimp.java                       3060)     panelTools.add( buttonToolsFilledRect );
Blimp.java                       3061)     panelTools.add( new JLabel( ) );
Blimp.java                       3062)     buttonToolsCircle = new JToggleButton( loadImageIcon( "Circle.png" ) );
Blimp.java                       3063)     buttonToolsCircle.setMargin( smallMargin );
Blimp.java                       3064)     buttonToolsCircle.setToolTipText( "Circle" );
Blimp.java                       3065)     buttonToolsCircle.addActionListener( this );
Blimp.java                       3066)     groupTools.add( buttonToolsCircle );
Blimp.java                       3067)     panelTools.add( buttonToolsCircle );
Blimp.java                       3068)     buttonToolsFilledCircle = new JToggleButton( loadImageIcon( "FilledCircle.png" ) );
Blimp.java                       3069)     buttonToolsFilledCircle.setMargin( smallMargin );
Blimp.java                       3070)     buttonToolsFilledCircle.setToolTipText( "Filled Circle" );
Blimp.java                       3071)     buttonToolsFilledCircle.addActionListener( this );
Blimp.java                       3072)     groupTools.add( buttonToolsFilledCircle );
Blimp.java                       3073)     panelTools.add( buttonToolsFilledCircle );
Blimp.java                       3074)     panelTools.add( new JLabel( ) );
Blimp.java                       3075)     buttonToolsCopy = new JToggleButton( loadImageIcon( "Copy.png" ) );
Blimp.java                       3076)     buttonToolsCopy.setMargin( smallMargin );
Blimp.java                       3077)     buttonToolsCopy.setToolTipText( "Copy" );
Blimp.java                       3078)     buttonToolsCopy.addActionListener( this );
Blimp.java                       3079)     groupTools.add( buttonToolsCopy );
Blimp.java                       3080)     panelTools.add( buttonToolsCopy );
Blimp.java                       3081)     buttonToolsPaste = new JToggleButton( loadImageIcon( "Paste.png" ) );
Blimp.java                       3082)     buttonToolsPaste.setMargin( smallMargin );
Blimp.java                       3083)     buttonToolsPaste.setToolTipText( "Paste" );
Blimp.java                       3084)     buttonToolsPaste.addActionListener( this );
Blimp.java                       3085)     groupTools.add( buttonToolsPaste );
Blimp.java                       3086)     panelTools.add( buttonToolsPaste );
Blimp.java                       3087)     buttonToolsNone.setSelected( true );
Blimp.java                       3088)     frameEditor.setTool( BlinkenFrameEditor.toolNone );
Blimp.java                       3089)     //action buttons
Blimp.java                       3090)     buttonActionsInvert = new JButton( loadImageIcon( "Invert.png" ) );
Blimp.java                       3091)     buttonActionsInvert.setMargin( smallMargin );
Blimp.java                       3092)     buttonActionsInvert.setToolTipText( "Invert" );
Blimp.java                       3093)     buttonActionsInvert.addActionListener( this );
Blimp.java                       3094)     panelActions.add( buttonActionsInvert );
Blimp.java                       3095)     buttonActionsMirrorHor = new JButton( loadImageIcon( "MirrorHor.png" ) );
Blimp.java                       3096)     buttonActionsMirrorHor.setMargin( smallMargin );
Blimp.java                       3097)     buttonActionsMirrorHor.setToolTipText( "Mirror Horizontally" );
Blimp.java                       3098)     buttonActionsMirrorHor.addActionListener( this );
Blimp.java                       3099)     panelActions.add( buttonActionsMirrorHor );
Blimp.java                       3100)     buttonActionsRollLeft = new JButton( loadImageIcon( "RollLeft.png" ) );
Blimp.java                       3101)     buttonActionsRollLeft.setMargin( smallMargin );
Blimp.java                       3102)     buttonActionsRollLeft.setToolTipText( "Roll Left" );
Blimp.java                       3103)     buttonActionsRollLeft.addActionListener( this );
Blimp.java                       3104)     panelActions.add( buttonActionsRollLeft );
Blimp.java                       3105)     buttonActionsRotate90 = new JButton( loadImageIcon( "Rotate90.png" ) );
Blimp.java                       3106)     buttonActionsRotate90.setMargin( smallMargin );
Blimp.java                       3107)     buttonActionsRotate90.setToolTipText( "Rotate 90 Degrees" );
Blimp.java                       3108)     buttonActionsRotate90.addActionListener( this );
Blimp.java                       3109)     panelActions.add( buttonActionsRotate90 );
Blimp.java                       3110)     buttonActionsMirrorVer = new JButton( loadImageIcon( "MirrorVer.png" ) );
Blimp.java                       3111)     buttonActionsMirrorVer.setMargin( smallMargin );
Blimp.java                       3112)     buttonActionsMirrorVer.setToolTipText( "Mirror Vertically" );
Blimp.java                       3113)     buttonActionsMirrorVer.addActionListener( this );
Blimp.java                       3114)     panelActions.add( buttonActionsMirrorVer );
Blimp.java                       3115)     buttonActionsRollRight = new JButton( loadImageIcon( "RollRight.png" ) );
Blimp.java                       3116)     buttonActionsRollRight.setMargin( smallMargin );
Blimp.java                       3117)     buttonActionsRollRight.setToolTipText( "Roll Right" );
Blimp.java                       3118)     buttonActionsRollRight.addActionListener( this );
Blimp.java                       3119)     panelActions.add( buttonActionsRollRight );
Blimp.java                       3120)     buttonActionsRotate180 = new JButton( loadImageIcon( "Rotate180.png" ) );
Blimp.java                       3121)     buttonActionsRotate180.setMargin( smallMargin );
Blimp.java                       3122)     buttonActionsRotate180.setToolTipText( "Rotate 180 Degrees" );
Blimp.java                       3123)     buttonActionsRotate180.addActionListener( this );
Blimp.java                       3124)     panelActions.add( buttonActionsRotate180 );
Blimp.java                       3125)     buttonActionsMirrorDiag = new JButton( loadImageIcon( "MirrorDiag.png" ) );
Blimp.java                       3126)     buttonActionsMirrorDiag.setMargin( smallMargin );
Blimp.java                       3127)     buttonActionsMirrorDiag.setToolTipText( "Mirror Diagonally (\\)" );
Blimp.java                       3128)     buttonActionsMirrorDiag.addActionListener( this );
Blimp.java                       3129)     panelActions.add( buttonActionsMirrorDiag );
Blimp.java                       3130)     buttonActionsRollUp = new JButton( loadImageIcon( "RollUp.png" ) );
Blimp.java                       3131)     buttonActionsRollUp.setMargin( smallMargin );
Blimp.java                       3132)     buttonActionsRollUp.setToolTipText( "Roll Up" );
Blimp.java                       3133)     buttonActionsRollUp.addActionListener( this );
Blimp.java                       3134)     panelActions.add( buttonActionsRollUp );
Blimp.java                       3135)     buttonActionsRotate270 = new JButton( loadImageIcon( "Rotate270.png" ) );
Blimp.java                       3136)     buttonActionsRotate270.setMargin( smallMargin );
Blimp.java                       3137)     buttonActionsRotate270.setToolTipText( "Rotate 270 Degrees" );
Blimp.java                       3138)     buttonActionsRotate270.addActionListener( this );
Blimp.java                       3139)     panelActions.add( buttonActionsRotate270 );
Blimp.java                       3140)     buttonActionsMirrorDiag2 = new JButton( loadImageIcon( "MirrorDiag2.png" ) );
Blimp.java                       3141)     buttonActionsMirrorDiag2.setMargin( smallMargin );
Blimp.java                       3142)     buttonActionsMirrorDiag2.setToolTipText( "Mirror Diagonally (/)" );
Blimp.java                       3143)     buttonActionsMirrorDiag2.addActionListener( this );
Blimp.java                       3144)     panelActions.add( buttonActionsMirrorDiag2 );
Blimp.java                       3145)     buttonActionsRollDown = new JButton( loadImageIcon( "RollDown.png" ) );
Blimp.java                       3146)     buttonActionsRollDown.setMargin( smallMargin );
Blimp.java                       3147)     buttonActionsRollDown.setToolTipText( "Roll Down" );
Blimp.java                       3148)     buttonActionsRollDown.addActionListener( this );
Blimp.java                       3149)     panelActions.add( buttonActionsRollDown );
Blimp.java                       3150)     panelActions.add( new JLabel( ) );
Blimp.java                       3151)     buttonActionsUndo = new JButton( loadImageIcon( "Undo.png" ) );
Blimp.java                       3152)     buttonActionsUndo.setMargin( smallMargin );
Blimp.java                       3153)     buttonActionsUndo.setToolTipText( "Undo" );
Blimp.java                       3154)     buttonActionsUndo.setEnabled( false );
Blimp.java                       3155)     buttonActionsUndo.addActionListener( this );
Blimp.java                       3156)     panelActions.add( buttonActionsUndo );
Blimp.java                       3157)     buttonActionsRedo = new JButton( loadImageIcon( "Redo.png" ) );
Blimp.java                       3158)     buttonActionsRedo.setMargin( smallMargin );
Blimp.java                       3159)     buttonActionsRedo.setToolTipText( "Redo" );
Blimp.java                       3160)     buttonActionsRedo.setEnabled( false );
Blimp.java                       3161)     buttonActionsRedo.addActionListener( this );
Blimp.java                       3162)     panelActions.add( buttonActionsRedo );
Christian Heimke Blimp v.1.1 (2005-04-16)

Christian Heimke authored 13 years ago

Blimp.java                       3163)     //edit buttons
Blimp.java                       3164)     buttonEditInsertFrame = new JButton( loadImageIcon( "InsertFrame.png" ) );
Blimp.java                       3165)     buttonEditInsertFrame.setMargin( smallMargin );
Blimp.java                       3166)     buttonEditInsertFrame.setToolTipText( "Insert Frame" );
Blimp.java                       3167)     buttonEditInsertFrame.addActionListener( this );
Blimp.java                       3168)     panelEdit.add( buttonEditInsertFrame );
Blimp.java                       3169)     buttonEditDuplicateFrame = new JButton( loadImageIcon( "DuplicateFrame.png" ) );
Blimp.java                       3170)     buttonEditDuplicateFrame.setMargin( smallMargin );
Blimp.java                       3171)     buttonEditDuplicateFrame.setToolTipText( "Duplicate Frame" );
Blimp.java                       3172)     buttonEditDuplicateFrame.addActionListener( this );
Blimp.java                       3173)     panelEdit.add( buttonEditDuplicateFrame );
Blimp.java                       3174)     buttonEditDeleteFrame = new JButton( loadImageIcon( "DeleteFrame.png" ) );
Blimp.java                       3175)     buttonEditDeleteFrame.setMargin( smallMargin );
Blimp.java                       3176)     buttonEditDeleteFrame.setToolTipText( "Delete Frame" );
Blimp.java                       3177)     buttonEditDeleteFrame.addActionListener( this );
Blimp.java                       3178)     panelEdit.add( buttonEditDeleteFrame );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3179)     //color panel
Blimp.java                       3180)     panelColors = new JPanel( new GridLayout( 2, 1, 5, 5 ) );
Blimp.java                       3181)     panelOuterFrame.add( panelColors, BorderLayout.EAST );
Blimp.java                       3182)     panelColorsChoose = new JPanel( new GridLayout( constColorCntY, constColorCntX, 5, 5 ) );
Blimp.java                       3183)     panelColors.add( panelColorsChoose );
Blimp.java                       3184)     buttonsColor = new JToggleButton[constColorCnt];
Blimp.java                       3185)     groupColor = new ButtonGroup( );
Blimp.java                       3186)     for( i = 0; i < constColorCnt; i++ )
Blimp.java                       3187)     {
Blimp.java                       3188)       buttonsColor[i] = new JToggleButton( );
Blimp.java                       3189)       buttonsColor[i].setMargin( smallMargin );
Blimp.java                       3190)       buttonsColor[i].addActionListener( this );
Blimp.java                       3191)       groupColor.add( buttonsColor[i] );
Blimp.java                       3192)       panelColorsChoose.add( buttonsColor[i] );
Blimp.java                       3193)     }
Blimp.java                       3194)     //color panel - settings
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3195)     panelColorsSettings = new JPanel( new GridLayout( 5, 1, 5, 0 ) );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3196)     panelColors.add( panelColorsSettings );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3197)     panelColorsPredef = new JPanel( new GridLayout( 1, 2, 5, 5 ) );
org/blinkenarea/Blimp/Blimp.java 3198)     buttonColorsPredefGray = new JButton( );
org/blinkenarea/Blimp/Blimp.java 3199)     buttonColorsPredefGray.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 3200)     buttonColorsPredefGray.setToolTipText( "gray" );
org/blinkenarea/Blimp/Blimp.java 3201)     panelColorsPredef.add( buttonColorsPredefGray );
org/blinkenarea/Blimp/Blimp.java 3202)     buttonColorsPredefColor = new JButton( );
org/blinkenarea/Blimp/Blimp.java 3203)     buttonColorsPredefColor.addActionListener( this );
org/blinkenarea/Blimp/Blimp.java 3204)     buttonColorsPredefColor.setToolTipText( "color" );
org/blinkenarea/Blimp/Blimp.java 3205)     panelColorsPredef.add( buttonColorsPredefColor );
org/blinkenarea/Blimp/Blimp.java 3206)     panelColorsSettings.add( panelColorsPredef );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3207)     labelColorsColor = new JLabel( "color:" );
Blimp.java                       3208)     labelColorsColor.setVerticalAlignment( JLabel.BOTTOM );
Blimp.java                       3209)     panelColorsSettings.add( labelColorsColor );
Blimp.java                       3210)     panelColorsColor = new JPanel( new FlowLayout( FlowLayout.CENTER, 5, 3 ) );
Blimp.java                       3211)     panelColorsSettings.add( panelColorsColor );
Blimp.java                       3212)     buttonColorsColor = new JButton( );
Blimp.java                       3213)     buttonColorsColor.setMargin( smallMargin );
Blimp.java                       3214)     buttonColorsColor.addActionListener( this );
Blimp.java                       3215)     panelColorsColor.add( buttonColorsColor );
Blimp.java                       3216)     textColorsColor = new JTextField( "FFFFFF", 6 );
Blimp.java                       3217)     textColorsColor.setHorizontalAlignment( JTextField.CENTER );
Blimp.java                       3218)     textColorsColor.addActionListener( this );
Blimp.java                       3219)     textColorsColor.addFocusListener( this );
Blimp.java                       3220)     panelColorsColor.add( textColorsColor );
Blimp.java                       3221)     labelColorsColor.setLabelFor( panelColorsColor );
Blimp.java                       3222)     labelColorsAlpha = new JLabel( "alpha:" );
Blimp.java                       3223)     labelColorsAlpha.setVerticalAlignment( JLabel.BOTTOM );
Blimp.java                       3224)     panelColorsSettings.add( labelColorsAlpha );
Blimp.java                       3225)     panelColorsAlpha = new JPanel( new FlowLayout( FlowLayout.CENTER, 5, 3 ) );
Blimp.java                       3226)     panelColorsSettings.add( panelColorsAlpha );
Blimp.java                       3227)     sliderColorsAlpha = new JSlider( JSlider.HORIZONTAL, 0, 255, 255 );
Blimp.java                       3228)     size = sliderColorsAlpha.getPreferredSize( );
Blimp.java                       3229)     size.width = size.width * 2 / 5;
Blimp.java                       3230)     sliderColorsAlpha.setPreferredSize( size );
Blimp.java                       3231)     sliderColorsAlpha.setSnapToTicks( true );
Blimp.java                       3232)     sliderColorsAlpha.addChangeListener( this );
Blimp.java                       3233)     panelColorsAlpha.add( sliderColorsAlpha );
Blimp.java                       3234)     textColorsAlpha = new JTextField( "FF", 2 );
Blimp.java                       3235)     textColorsAlpha.setHorizontalAlignment( JTextField.CENTER );
Blimp.java                       3236)     textColorsAlpha.addActionListener( this );
Blimp.java                       3237)     textColorsAlpha.addFocusListener( this );
Blimp.java                       3238)     panelColorsAlpha.add( textColorsAlpha );
Blimp.java                       3239)     labelColorsAlpha.setLabelFor( panelColorsAlpha );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3240) 
org/blinkenarea/Blimp/Blimp.java 3241)     //initialize colors
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3242)     colorIdx = 0;
Blimp.java                       3243)     colors = new Color[constColorCnt];
Blimp.java                       3244)     iconsColor = new ImageIcon[constColorCnt];
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3245)     size = textColorsAlpha.getPreferredSize( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3246)     for( i = 0; i < constColorCnt; i++ )
Blimp.java                       3247)     {
Blimp.java                       3248)       iconsColor[i] = new ImageIcon( new BufferedImage( size.width, size.height, BufferedImage.TYPE_INT_RGB ) );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3249)       buttonsColor[i].setIcon( iconsColor[i] );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3250)       buttonsColor[i].setIcon( iconsColor[i] );
Blimp.java                       3251)     }
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3252)     icon = new ImageIcon( new BufferedImage( size.width, size.height, BufferedImage.TYPE_INT_RGB ) );
org/blinkenarea/Blimp/Blimp.java 3253)     iconGradientGray( icon );
org/blinkenarea/Blimp/Blimp.java 3254)     buttonColorsPredefGray.setIcon( icon );
org/blinkenarea/Blimp/Blimp.java 3255)     icon = new ImageIcon( new BufferedImage( size.width, size.height, BufferedImage.TYPE_INT_RGB ) );
org/blinkenarea/Blimp/Blimp.java 3256)     iconGradientColor( icon );
org/blinkenarea/Blimp/Blimp.java 3257)     buttonColorsPredefColor.setIcon( icon );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3258)     iconColorsColor = new ImageIcon( new BufferedImage( size.width, size.height, BufferedImage.TYPE_INT_RGB ) );
Blimp.java                       3259)     buttonColorsColor.setIcon( iconColorsColor );
Blimp.java                       3260)     buttonsColor[colorIdx].setSelected( true );
Blimp.java                       3261)     frameEditor.setColor( colors[colorIdx] );
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3262)     actionColorsPredefGray( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3263) 
Blimp.java                       3264)     //create play timer
Blimp.java                       3265)     timerPlay = new javax.swing.Timer( 100, this );
Blimp.java                       3266)     timerPlay.setRepeats( false );
Blimp.java                       3267)     timerPlay.stop( );
Blimp.java                       3268) 
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3269)     //create output timer
org/blinkenarea/Blimp/Blimp.java 3270)     timerOut = new javax.swing.Timer( 1000, this );
org/blinkenarea/Blimp/Blimp.java 3271)     timerOut.setRepeats( false );
org/blinkenarea/Blimp/Blimp.java 3272)     timerOut.stop( );
org/blinkenarea/Blimp/Blimp.java 3273) 
Christian Heimke Blimp v.1.3 (2006-10-10)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3274)     //update display and controls
org/blinkenarea/Blimp/Blimp.java 3275)     setZoomAspect( );
org/blinkenarea/Blimp/Blimp.java 3276)     showZoom( );
org/blinkenarea/Blimp/Blimp.java 3277)     showAspect( );
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3278)     updateFrames( 0 );
Blimp.java                       3279) 
Blimp.java                       3280)     //running as full application
Blimp.java                       3281)     if( isFullApp )
Blimp.java                       3282)     {
Blimp.java                       3283)       //calculate size for main window, menus and controls
Blimp.java                       3284)       frame.pack( );
Blimp.java                       3285)       //show main window
Blimp.java                       3286)       frame.setVisible( true );
Blimp.java                       3287)     }
Blimp.java                       3288)     //running as applet
Blimp.java                       3289)     else
Blimp.java                       3290)     {
Blimp.java                       3291)       //arrange menus and controls
Blimp.java                       3292)       size = getSize( );
Blimp.java                       3293)       resize( 1, 1 );
Blimp.java                       3294)       resize( size );
Blimp.java                       3295)     }
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       3296) 
Blimp.java                       3297)     //load initial file
Blimp.java                       3298)     if( initialFile != null )
Blimp.java                       3299)     {
Blimp.java                       3300)       //set current file and current directory
Blimp.java                       3301)       curFile = (new File( initialFile )).getAbsoluteFile( );
Blimp.java                       3302)       curDir = curFile.getParentFile( );
Blimp.java                       3303) 
Blimp.java                       3304)       //load file
Blimp.java                       3305)       fileLoad( );
Blimp.java                       3306)     }
Christian Heimke Blimp v.0.2 (2004-11-10)

Christian Heimke authored 13 years ago

Blimp.java                       3307)   }
Blimp.java                       3308) 
Blimp.java                       3309)   //entry point for applet
Blimp.java                       3310)   public void init( )
Blimp.java                       3311)   {
Blimp.java                       3312)     javax.swing.SwingUtilities.invokeLater( this );
Blimp.java                       3313)   }
Blimp.java                       3314) 
Blimp.java                       3315)   //entry point for full application
Blimp.java                       3316)   public static void main( String[] args )
Blimp.java                       3317)   {
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       3318)     int i;
Blimp.java                       3319)     BlinkenMovie movie;
Blimp.java                       3320)     Pattern sizePattern, dimPattern;
Blimp.java                       3321)     Matcher sizeMatcher, dimMatcher;
Blimp.java                       3322)     String txtOld, txtNew;
Blimp.java                       3323) 
Blimp.java                       3324)     //running interactively - without arguments
Blimp.java                       3325)     if( args.length <= 0 )
Blimp.java                       3326)     {
Blimp.java                       3327)       javax.swing.SwingUtilities.invokeLater( new Blimp( null ) );
Blimp.java                       3328)       return;
Blimp.java                       3329)     }
Blimp.java                       3330) 
Blimp.java                       3331)     //running interactively - load initial file
Blimp.java                       3332)     if( args.length == 1 && ! args[0].substring( 0, 1 ).equals( "-" ) )
Blimp.java                       3333)     {
Blimp.java                       3334)       javax.swing.SwingUtilities.invokeLater( new Blimp( args[0] ) );
Blimp.java                       3335)       return;
Blimp.java                       3336)     }
Blimp.java                       3337) 
Blimp.java                       3338)     //running as command line tool
Blimp.java                       3339)     System.out.println( "BlinkenLightsInteractiveMovieProgram\n" +
Stefan Schuermans version available in class...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3340)                         String.format( "Blimp (version %d.%d.%d)", Version.Major, Version.Minor, Version.Revision ) +
Stefan Schuermans add MCUF file/device output

Stefan Schuermans authored 11 years ago

org/blinkenarea/Blimp/Blimp.java 3341)                         "Copyright (C) 2004-2013: Stefan Schuermans <stefan@blinkenarea.org>\n" +
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       3342)                         "Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" +
Christian Heimke Blimp v.1.3.2 (2008-02-23)

Christian Heimke authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3343)                         "a blinkenarea.org project\n" );
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       3344) 
Blimp.java                       3345)     //initialize patterns
Blimp.java                       3346)     sizePattern = Pattern.compile( "^([0-9]+)x([0-9]+)-([0-9]+)/([0-9]+)$" );
Blimp.java                       3347)     dimPattern = Pattern.compile( "^([0-9]+)x([0-9]+)$" );
Blimp.java                       3348) 
Blimp.java                       3349)     //get initial movie
Christian Heimke Blimp v.0.5 (2004-11-19)

Christian Heimke authored 13 years ago

Blimp.java                       3350)     movie = new BlinkenMovie( defHeight, defWidth, defChannels, defMaxval );
Stefan Schuermans version available in class...

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3351)     movie.insertInfo( 0, "creator", String.format( "Blimp (version %d.%d.%d)", Version.Major, Version.Minor, Version.Revision ) );
Christian Heimke Blimp v.0.5 (2004-11-19)

Christian Heimke authored 13 years ago

Blimp.java                       3352)     movie.insertFrame( 0, new BlinkenFrame( defHeight, defWidth, defChannels, defMaxval, defDuration ) );
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       3353) 
Blimp.java                       3354)     //process parameters
Blimp.java                       3355)     for( i = 0; i < args.length; i++ )
Blimp.java                       3356)     {
Blimp.java                       3357) 
Blimp.java                       3358)       if( args[i].equals( "-h" ) || args[i].equals( "--help" ) )
Blimp.java                       3359)       {
Blimp.java                       3360)         System.out.println( "interactive movie editor:\n" +
Blimp.java                       3361)                             "  java Blimp [<initial-file>]\n" +
Blimp.java                       3362)                             "\n" +
Blimp.java                       3363)                             "command line tool:\n" +
Blimp.java                       3364)                             "  java Blimp <parameter> [<parameter> [...]]\n" +
Blimp.java                       3365)                             "parameters:\n" +
Blimp.java                       3366)                             "  -i / --input <file>                                  load movie\n" +
Blimp.java                       3367)                             "  -r / --resize <width>x<height>-<channels>/<colors>   resize movie\n" +
Blimp.java                       3368)                             "  -s / --scale <width>x<height>                        scale movie\n" +
Blimp.java                       3369)                             "  -o / --output <file>                                 save movie\n" +
Blimp.java                       3370)                             "\n" );
Blimp.java                       3371)       }
Blimp.java                       3372) 
Blimp.java                       3373)       else if( args[i].equals( "-i" ) || args[i].equals( "--input" ) )
Blimp.java                       3374)       {
Blimp.java                       3375)         if( i + 1 >= args.length )
Blimp.java                       3376)         {
Blimp.java                       3377)           System.out.println( "parameter \"-i\" / \"--input\" requires an argument" );
Blimp.java                       3378)           break;
Blimp.java                       3379)         }
Blimp.java                       3380)         i++;
Blimp.java                       3381)         if( ! movie.load( args[i] ) )
Blimp.java                       3382)         {
Blimp.java                       3383)           System.out.println( "movie \"" + args[i] +  "\" could not be loaded..." );
Blimp.java                       3384)           break;
Blimp.java                       3385)         }
Blimp.java                       3386)         System.out.println( "movie \"" + args[i] +  "\" was loaded successfully..." );
Blimp.java                       3387)       }
Blimp.java                       3388) 
Blimp.java                       3389)       else if( args[i].equals( "-r" ) || args[i].equals( "--resize" ) )
Blimp.java                       3390)       {
Blimp.java                       3391)         if( i + 1 >= args.length )
Blimp.java                       3392)         {
Blimp.java                       3393)           System.out.println( "parameter \"-r\" / \"--resize\" requires an argument" );
Blimp.java                       3394)           break;
Blimp.java                       3395)         }
Blimp.java                       3396)         i++;
Blimp.java                       3397)         txtOld = movie.getWidth( ) + "x" +
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3398)                  movie.getHeight( ) + "-" +
org/blinkenarea/Blimp/Blimp.java 3399)                  movie.getChannels( ) + "/" +
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       3400)                  (movie.getMaxval( ) + 1);
Blimp.java                       3401)         if( ! (sizeMatcher = sizePattern.matcher( args[i] )).find( ) )
Blimp.java                       3402)         {
Blimp.java                       3403)           System.out.println( "invalid format \"" + args[i] + "\"of size (<width>x<height>-<channles>/<colors>)" );
Blimp.java                       3404)           break;
Blimp.java                       3405)         }
Blimp.java                       3406)         movie.resize( Integer.parseInt( sizeMatcher.group( 2 ) ),
Blimp.java                       3407)                       Integer.parseInt( sizeMatcher.group( 1 ) ),
Blimp.java                       3408)                       Integer.parseInt( sizeMatcher.group( 3 ) ),
Blimp.java                       3409)                       Integer.parseInt( sizeMatcher.group( 4 ) ) - 1 );
Blimp.java                       3410)         txtNew = movie.getWidth( ) + "x" +
Stefan Schuermans added MCUF output feature

Stefan Schuermans authored 13 years ago

org/blinkenarea/Blimp/Blimp.java 3411)                  movie.getHeight( ) + "-" +
org/blinkenarea/Blimp/Blimp.java 3412)                  movie.getChannels( ) + "/" +
Christian Heimke Blimp v.0.3 (2004-11-12)

Christian Heimke authored 13 years ago

Blimp.java                       3413)                  (movie.getMaxval( ) + 1);
Blimp.java                       3414)         System.out.println( "resized movie from \"" + txtOld + "\" to \"" + txtNew + "\"..." );
Blimp.java                       3415)       }
Blimp.java                       3416) 
Blimp.java                       3417)       else if( args[i].equals( "-s" ) || args[i].equals( "--scale" ) )
Blimp.java                       3418)       {
Blimp.java                       3419)         if( i + 1 >= args.length )
Blimp.java                       3420)         {
Blimp.java                       3421)           System.out.println( "parameter \"-s\" / \"--scale\" requires an argument" );
Blimp.java                       3422)           break;
Blimp.java                       3423)         }
Blimp.java                       3424)         i++;
Blimp.java                       3425)         txtOld = movie.getWidth( ) + "x" +
Blimp.java                       3426)                  movie.getHeight( );
Blimp.java                       3427)         if( ! (dimMatcher = dimPattern.matcher( args[i] )).find( ) )
Blimp.java                       3428)         {
Blimp.java                       3429)           System.out.println( "invalid format \"" + args[i] + "\" of dimension (<width>x<height>)" );
Blimp.java                       3430)           break;
Blimp.java                       3431)         }
Blimp.java                       3432)         movie.scale( Integer.parseInt( dimMatcher.group( 2 ) ),
Blimp.java                       3433)                      Integer.parseInt( dimMatcher.group( 1 ) ) );
Blimp.java                       3434)         txtNew = movie.getWidth( ) + "x" +
Blimp.java                       3435)                  movie.getHeight( );
Blimp.java                       3436)         System.out.println( "scaled movie from \"" + txtOld + "\" to \"" + txtNew + "\"..." );
Blimp.java                       3437)       }
Blimp.java                       3438) 
Blimp.java                       3439)       else if( args[i].equals( "-o" ) || args[i].equals( "--output" ) )
Blimp.java                       3440)       {
Blimp.java                       3441)         if( i + 1 >= args.length )
Blimp.java                       3442)         {
Blimp.java                       3443)           System.out.println( "parameter \"-o\" / \"--output\" requires an argument" );
Blimp.java                       3444)           break;
Blimp.java                       3445)         }
Blimp.java                       3446)         i++;
Blimp.java                       3447)         if( ! movie.save( args[i] ) )
Blimp.java                       3448)         {
Blimp.java                       3449)           System.out.println( "movie \"" + args[i] +  "\" could not be saved..." );
Blimp.java                       3450)           break;
Blimp.java                       3451)         }
Blimp.java                       3452)         System.out.println( "movie \"" + args[i] +  "\" was saved successfully..." );
Blimp.java                       3453)       }
Blimp.java                       3454) 
Blimp.java                       3455)       else
Blimp.java                       3456)         System.out.println( "unknown parameter \"" + args[i] + "\" - use \"-h\" or \"--help\" to get help" );
Blimp.java                       3457) 
Blimp.java                       3458)     } //for( i...