ucar.unidata.idv.ui
Class ImageGenerator

java.lang.Object
  extended by ucar.unidata.ui.WindowHolder
      extended by ucar.unidata.idv.IdvManager
          extended by ucar.unidata.idv.ui.ImageGenerator
All Implemented Interfaces:
ActionListener, EventListener, IdvConstants

public class ImageGenerator
extends IdvManager

Manages the user interface for the IDV

Author:
IDV development team

Nested Class Summary
protected static class ImageGenerator.MyBreakException
          Class MyBreakException for handling break tags
protected static class ImageGenerator.MyContinueException
          Class MyContinueException for handling continue tags
protected static class ImageGenerator.MyReturnException
          Class MyReturnException allows us to return from a isl procedure by throwing an exception.
 
Field Summary
static String ATTR_ANCHOR
          isl tag
static String ATTR_ANGLE
          isl tag
static String ATTR_BACKGROUND
          isl tag
static String ATTR_BOTTOM
          isl tag
static String ATTR_BUNDLE
          isl attribute
static String ATTR_CAPTION
          isl tag
static String ATTR_CLASS
          isl tag
static String ATTR_CLEAR
          isl tag
static String ATTR_CODE
          isl tag
static String ATTR_COLOR
          isl tag
static String ATTR_COLUMNS
          isl tag
static String ATTR_COMMAND
          isl tag
static String ATTR_COPY
          isl tag
static String ATTR_DATASOURCE
          isl attribute
static String ATTR_DEBUG
          isl tag
static String ATTR_DEFAULT
          isl tag
static String ATTR_DESTINATION
          isl attribute
static String ATTR_DIR
          isl tag
static String ATTR_DISPLAY
          isl tag
static String ATTR_EAST
          isl tag
static String ATTR_ENTRY
          isl tag
static String ATTR_EVERY
          isl tag
static String ATTR_EXPR
          isl tag
static String ATTR_FILE
          isl tag
static String ATTR_FIRST
          isl attribute
static String ATTR_FONTFACE
          isl tag
static String ATTR_FONTSIZE
          isl tag
static String ATTR_FRAMERATE
          isl tag
static String ATTR_FROM
          isl attr
static String ATTR_FROMFILE
          isl tag
static String ATTR_GLOBAL
          isl attribute
static String ATTR_HEIGHT
          isl tag
static String ATTR_HOURS
          isl tag
static String ATTR_HSPACE
          isl tag
static String ATTR_ID
          isl tag
static String ATTR_IMAGE
          isl tag
static String ATTR_INTERVAL
          isl tag
static String ATTR_LAST
          isl attribute
static String ATTR_LAT
          isl tag
static String ATTR_LEFT
          isl tag
static String ATTR_LINECOLOR
          isl tag
static String ATTR_LON
          isl tag
static String ATTR_LOOP
          isl tag
static String ATTR_MESSAGE
          isl tag
static String ATTR_MINUTES
          isl tag
static String ATTR_NAME
          isl tag
static String ATTR_NORTH
          isl tag
static String ATTR_OFFSCREEN
          isl tag
static String ATTR_ONERROR
          isl attribute
static String ATTR_ORIENTATION
          isl tag
static String ATTR_PARAM
          isl tag
static String ATTR_PASSWORD
          isl attribute
static String ATTR_PATTERN
          isl tag
static String ATTR_PLACE
          isl tag
static String ATTR_PROPERTY
          isl tag
static String ATTR_QUALITY
          isl tag
static String ATTR_RIGHT
          isl tag
static String ATTR_ROWS
          isl tag
static String ATTR_SECONDS
          isl tag
static String ATTR_SERVER
          isl attribute
static String ATTR_SHOWLINES
          isl tag
static String ATTR_SLEEP
          isl tag
static String ATTR_SORT
          isl attribute
static String ATTR_SORTDIR
          isl attribute
static String ATTR_SOUTH
          isl tag
static String ATTR_SPACE
          isl tag
static String ATTR_TEMPLATE
          isl tag
static String ATTR_TEXT
          isl tag
static String ATTR_TICKMARKS
          isl tag
static String ATTR_TIMES
          isl tag
static String ATTR_TO
          isl attr
static String ATTR_TOP
          isl tag
static String ATTR_TYPE
          isl tag
static String ATTR_URL
          isl tag
static String ATTR_USEPROJECTION
          isl tag
static String ATTR_USER
          isl attribute
static String ATTR_VALUE
          isl tag
static String ATTR_VALUES
          isl tag
static String ATTR_VIEW
          isl tag
static String ATTR_VSPACE
          isl tag
static String ATTR_WAIT
          isl attribute
static String ATTR_WEST
          isl tag
static String ATTR_WHAT
          isl attribute
static String ATTR_WHERE
          isl tag
static String ATTR_WIDTH
          isl tag
static String PROP_ANIMATIONTIME
          macro property
static String PROP_CONTENTS
          macro property
static String PROP_IMAGEFILE
          macro property
static String PROP_IMAGEINDEX
          macro property
static String PROP_IMAGEPATH
          macro property
static String PROP_LOOPINDEX
          macro property
static String PROP_OFFSCREEN
          macro property
static String PROP_VIEWINDEX
          macro property
static String PROP_VIEWNAME
          macro property
static String TAG_APPEND
          isl tag
static String TAG_BUNDLE
          isl tag
static String TAG_CLIP
          isl tag
static String TAG_COLORBAR
          isl tag
static String TAG_DISPLAY
          isl tag
static String TAG_ELSE
          isl tag
static String TAG_FILESET
          isl tag
static String TAG_GROUP
          isl tag
static String TAG_IMAGE
          isl tag
static String TAG_IMPORT
          isl tag
static String TAG_ISL
          isl tag
static String TAG_KML
          isl tag
static String TAG_KMZFILE
          isl tag
static String TAG_MATTE
          isl tag
static String TAG_MOVIE
          isl tag
static String TAG_OUTPUT
          isl tag
static String TAG_OVERLAY
          isl tag
static String TAG_PAUSE
          isl tag
static String TAG_PROPERTY
          isl tag
static String TAG_RESIZE
          isl tag
static String TAG_SETFILES
          isl tag
static String TAG_SPLIT
          isl tag
static String TAG_TEMPLATE
          isl tag
static String TAG_THEN
          isl tag
static String TAG_THUMBNAIL
          isl tag
static String TAG_TRANSPARENT
          isl tag
static String TAG_WRITE
          isl tag
static String VALUE_ASCENDING
          isl attribute
static String VALUE_BOTTOM
          attr value
static String VALUE_DESCENDING
          isl attribute
static String VALUE_LEFT
          attr value
static String VALUE_RIGHT
          attr value
static String VALUE_TIME
          isl attribute
static String VALUE_TOP
          attr value
 
Fields inherited from class ucar.unidata.ui.WindowHolder
contents, dialog, frame, window
 
Fields inherited from interface ucar.unidata.idv.IdvConstants
ARG_B64BUNDLE, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILE_VMSTATE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_HISTORY, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
 
Constructor Summary
ImageGenerator(IntegratedDataViewer idv)
          Create me with the IDV
ImageGenerator(IntegratedDataViewer idv, List scriptFiles)
          Create me with the IDV and start processing files
 
Method Summary
 String applyMacros(Element node, String attr)
          Find the attribute value of the given node.
 boolean applyMacros(Element node, String attr, boolean dflt)
          If the attribute does not exist return the dflt.
 Color applyMacros(Element node, String attr, Color dflt)
          If the attribute does not exist return the dflt.
 double applyMacros(Element node, String attr, double dflt)
          If the attribute does not exist return the dflt.
 int applyMacros(Element node, String attr, int dflt)
          If the attribute does not exist return the dflt.
 String applyMacros(Element node, String attr, String dflt)
          If the attribute does not exist return the dflt.
 String applyMacros(String s)
          Do the macro substitution
 void captureImage(String filename)
          Capture an image from the first active view managers
 void captureMovie(String filename)
          Capture a movie from the first view manager
 void captureMovie(String filename, Element scriptingNode)
          Capture the movie
protected  void debug(String msg)
          Print the message if in debug mode
 void doneCapturingMovie()
          Called to notify this object that the movie capture is done
protected  boolean error(String msg)
          Utility to print a message and return false.
protected  boolean error(String msg, Exception exc)
          Utility to print a message and return false.
 boolean evaluateIsl(String isl)
          Evaluate the given isl
 String fields(String datasource, String pattern)
          callable by jython to find the data choices that match the given pattern
 DisplayControlImpl findDisplayControl(String id)
          Find the display control identified by the given id
static void ftpPut(String server, String userName, String password, String destination, byte[] bytes)
          Do an FTP put of the given bytes
 Date getAnimationTime()
          Find the animation time of the first Animation in a view manager we find
 Image getImage()
          Get the Image of the current display
 String getLetter(int i)
          _more_
 String getRoman(int i)
          _more_
 void loadBundle(String bundleFile, List setFiles)
          Load the given bundle file
protected static String makeXmlFromString(String s)
          Create XML from the input String
 BufferedImage matteImage(BufferedImage image, String bgString, int top, int left, int bottom, int right)
          Matte the image
 void pause()
          Wait until all displays are built
protected  BufferedImage processImage(BufferedImage image, String filename, Element node, Hashtable props, ViewManager viewManager)
          Process the image
 boolean processScriptFile(String islFile)
          Process the isl files
 void processScriptFiles(List scriptFiles)
          Process the list of isl files
protected  boolean processTagAppend(Element node)
          Handle the append tag
protected  boolean processTagAsk(Element node)
          process the given node
protected  boolean processTagAsktocontinue(Element node)
          process the given node
protected  boolean processTagBreak(Element node)
          process the given node
protected  boolean processTagBundle(Element node)
          process the given node
protected  boolean processTagCall(Element node)
          process the given node
protected  boolean processTagCall(Element node, Element procNode)
          process the given node
protected  boolean processTagCenter(Element node)
          process the given node
protected  boolean processTagClear(Element node)
          Handle the clear tag
protected  boolean processTagContinue(Element node)
          process the given node
protected  boolean processTagCopy(Element node)
          process the given node
protected  boolean processTagDatasource(Element node)
          process the given node
protected  boolean processTagDelete(Element node)
          process the given node
protected  boolean processTagDisplay(Element node)
          process the given node
protected  boolean processTagEcho(Element node)
          process the given node
protected  boolean processTagExec(Element node)
          process the given node
protected  boolean processTagExists(Element node)
          process the given node
protected  boolean processTagFileset(Element node)
          process the given node
protected  boolean processTagForeach(Element node)
          process the given node
protected  boolean processTagFtp(Element node)
          process the given node
protected  boolean processTagGc(Element node)
          process the given node
protected  boolean processTagGroup(Element node)
          process the given node
protected  boolean processTagHtml(Element node)
          process the given node
protected  boolean processTagIf(Element node)
          process the given node
protected  boolean processTagImage(Element node)
          process the given node
protected  boolean processTagImport(Element node)
          process the given node
protected  boolean processTagIncrement(Element node)
          Handle the append tag
protected  boolean processTagIsl(Element node)
          process the given node
protected  boolean processTagJoin(Element node)
          process the given node
protected  boolean processTagJython(Element node)
          process the given node
protected  boolean processTagMkdir(Element node)
          process the given node
protected  boolean processTagMove(Element node)
          process the given node
protected  boolean processTagMovie(Element node)
          process the given node
protected  boolean processTagOutput(Element node)
          process the given node
protected  boolean processTagPanel(Element node)
          process the given node
protected  boolean processTagPause(Element node)
          process the given node
protected  boolean processTagProcedure(Element node)
          process the given node
protected  boolean processTagProperty(Element node)
          process the given node
protected  boolean processTagReload(Element node)
          process the given node
protected  boolean processTagRemoveall(Element node)
          process the given node
protected  boolean processTagRemovedisplays(Element node)
          process the given node
protected  boolean processTagRename(Element node)
          process the given node
protected  boolean processTagReplace(Element node)
          Handle the append tag
protected  boolean processTagReturn(Element node)
          process the given node
protected  boolean processTagSetfiles(Element node)
          process the given node
protected  boolean processTagStop(Element node)
          process the given node
protected  boolean processTagWait(Element node)
          process the given node
 void putIndex(Hashtable props, String name, int v)
          _more_
protected  Image resize(Image image, Element node)
          Resize the image
 BufferedImage resizeImage(