|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
faa.tg.dra.gui.Drat
public class Drat
Drat starts the Data Reduction and Analysis Toolkit GUI. This file does not need to be changed to add a tool to the Drat GUI. To add a tool, create a panel class for the tool in the package "faa.tg.dra.gui". The class must be named "<toolClassName>Panel". Then add the Panel information to the drat.properties file. (See other Panels in the directory for examples.)See the source: Drat.java
| Nested Class Summary | |
|---|---|
(package private) class |
Drat.AboutAction
Action to Process a About Request. |
private class |
Drat.ActionChangedListener
|
protected class |
Drat.AppCloser
To terminate the DRAT GUI when run as an application. |
(package private) class |
Drat.ClearAllAction
Action to Process an RmFilter Request: remove all components from the scrollingPanel. |
(package private) class |
Drat.ExitAction
Minimal implementation of an exit command. |
(package private) class |
Drat.FilterColorAction
Action to Select a background color for the panels. |
(package private) class |
Drat.HelpAction
Action to Process a Help Request |
(package private) class |
Drat.HelpBrowseAction
Action to process a help request that selects a browser: executes system call: "<browser> <helpFileName>" . |
class |
Drat.NewAction
Clears the filter list. |
(package private) class |
Drat.OpenAction
Opens a DRAT configuration file and uses it to load the filter list. |
(package private) class |
Drat.OpenRecentAction
Opens a recently used used DRAT configuration file |
(package private) class |
Drat.PanelAddAction
Action to generate a DR&A panel on the DRAT GUI display. |
(package private) class |
Drat.PlotAction
Perform action to run the current DR&A configuration. |
(package private) class |
Drat.RmFilterAction
Action to Process an RmFilter Request - Remove a component from scrollingPanel |
(package private) class |
Drat.RunAction
Perform action to run the current DR&A configuration. |
(package private) class |
Drat.SaveAction
Save the filter list under current DRAT configuration file. |
(package private) class |
Drat.SaveAsAction
Saves the filter list as a DRAT configuration file. |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
javax.swing.JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
java.awt.Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
java.awt.Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static java.lang.String |
aboutAction
|
static java.lang.String |
actionSuffix
Suffix applied to the key used in resource file lookups for an action. |
static java.lang.String |
clearAllAction
|
static java.lang.String |
currentUI
|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
static java.lang.String |
DEFAULT_TITLE
|
private javax.swing.Action[] |
defaultActions
Actions defined by the Gui class |
static java.lang.String |
defaultFilesProperties
File path is relative to the package directory Drat is in. |
(package private) DragAndDropMouseListener |
dndListener
|
(package private) DraPanelList |
draPanels
|
(package private) javax.swing.JFrame |
dratFrame
|
static java.lang.String |
exitAction
|
(package private) static java.awt.Color |
filterColor
|
static java.lang.String |
filterColorAction
|
private java.util.Hashtable<java.lang.Object,javax.swing.Action> |
guiActions
|
private java.lang.String |
guiTitle
|
static java.lang.String |
helpAction
|
static java.lang.String |
helpBrowseAction
|
private static java.lang.String |
helpFileName
The help file for the DRAT GUI (default "dratmanual.htm"). |
(package private) HookupManager |
hookupManager
|
static java.lang.String |
imageSuffix
Suffix applied to the key used in resource file lookups for an image. |
private static java.text.NumberFormat |
integerFormatter
|
private static boolean |
keepAsterisk
|
static java.lang.String |
labelSuffix
Suffix applied to the key used in resource file lookups for a label. |
protected java.lang.String |
lastFileNameUsed
|
(package private) javax.swing.JPanel |
mainPanel
|
static int |
MAXIMUM_GUI_WIDTH
|
private javax.swing.JMenuBar |
menubar
|
private java.util.Hashtable<java.lang.String,javax.swing.JMenuItem> |
menuItems
|
protected java.util.Vector<java.lang.String> |
names
|
static java.lang.String |
newAction
|
static java.lang.String |
openAction
Constants for GUI menu setup; for more information see GUI properties. |
static java.lang.String |
openRecentAction
|
(package private) java.awt.Window |
parentWindow
|
private static java.text.NumberFormat |
percentFormatter
|
static java.lang.String |
PLOT_XML_DIR_PROP
|
static java.lang.String |
plotAction
|
static java.lang.String |
RECENT_CONFIG_FILE
the name of the file where a list of recent DRAT files is kept |
static int |
RECENT_SIZE
Number of recently used drat configuration files to keep |
private static java.util.ResourceBundle |
resources
|
static java.lang.String |
rmFilterAction
|
static java.lang.String |
runAction
|
private javax.swing.JButton |
runButton
|
static java.lang.String |
saveAction
|
static java.lang.String |
saveAsAction
|
private javax.swing.JScrollPane |
scroller
|
(package private) javax.swing.JPanel |
scrollingPanel
|
(package private) static long |
serialVersionUID
|
static java.util.regex.Pattern |
stdTokensPattern
|
static java.lang.String |
tipSuffix
Suffix applied to the key used in resource file lookups for tooltip text. |
private static java.util.regex.Pattern |
toolbarDividerPattern
|
private javax.swing.JPanel |
toolbarPanel
The panel containing the toolbar(s). |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Drat()
Constructor for the Data Reduction & Analysis Toolkit (DRAT) graphical user interface. |
|
Drat(java.lang.String[] params)
Constructor for the Data Reduction & Analysis Toolkit (DRAT) graphical user interface. |
|
Drat(java.lang.String dratConfigFileName,
java.lang.String recFileName)
Creates a DRAT GUI with a specified configuration file already loaded, and allowing the input/output file names to be sat according to a specified recording file name. |
|
Drat(java.awt.Window parentWindow)
Constructor for the Data Reduction & Analysis Toolkit (DRAT) graphical user interface that allows this GUI to be the child of another window. |
|
Drat(java.awt.Window parentWin,
java.lang.String dratConfigFileName)
Creates a DRAT GUI with a specified configuration file already loaded. |
|
Drat(java.awt.Window parentWin,
java.lang.String dratConfigFileName,
java.lang.String recFileName)
Creates a DRAT GUI with a specified configuration file already loaded, and allowing the input/output file names to be sat according to a specified recording file name. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Provides the method for the ActionListener interface. |
void |
addName(java.lang.String newName)
Adds new to list of recently used DRAT config files |
boolean |
canMovePanelInto(DraggableJPanel panel)
returns whether a panel can be moved into here |
protected java.beans.PropertyChangeListener |
createActionChangeListener(javax.swing.JMenuItem b)
|
protected javax.swing.JMenu |
createMenu(java.lang.String key)
Create a menu for the app. |
protected javax.swing.JMenuBar |
createMenubar()
Create the menubar for the app. |
protected javax.swing.JMenuItem |
createMenuItem(java.lang.String cmd)
This is the hook through which all menu items are created. |
protected java.awt.Component |
createTool(java.lang.String key)
Hook through which every toolbar item is created. |
protected javax.swing.JButton |
createToolbarButton(java.lang.String key)
Create a button to go inside of the toolbar. |
private javax.swing.JPanel |
createToolbarPanel()
Create the toolbar panel. |
protected javax.swing.Action |
getAction(java.lang.String cmd)
Fetch the action indicated by the command String. |
javax.swing.Action[] |
getActions()
Fetch the list of actions supported. |
static java.util.Iterator |
getConfigIterator()
Gets an iterator for the predefined configuration filenames stored in the config directory. |
static java.io.File |
getConfigResourceFile(java.lang.String dratFileName)
Get the configuration file from the given filename: if the file does not exist, use the name to lookup a DRAT configuration file in the config directory. |
static java.lang.String |
getDefaultFileProperty(java.lang.String propertyName)
Returns default file property, or returns null if file not found: converts file separator characters if necessary. |
DraPanelList |
getDraPanels()
Get the DraPanels stored by the DRAT. |
protected static java.net.URL |
getDratResource(java.lang.String key)
Returns the URL for the resource indicated by the input parameter. |
protected static java.lang.String |
getDratResourceString(java.lang.String nm)
Returns the URL for the resource indicated by the input parameter. |
static java.lang.String |
getHelpFileName()
|
protected javax.swing.JMenuBar |
getMenubar()
Returns the menubar for the DRAT GUI. |
protected javax.swing.JMenuItem |
getMenuItem(java.lang.String cmd)
Fetch the menu item that was created for the given command. |
private static java.lang.String |
getOutFileName(java.lang.String dratConfig,
java.lang.String recFile)
Returns a filename derived fom the input filename prefix and the DRAT configuration filename. |
int |
getPanelWidth()
Return the width of the DRAT GUI panel. |
private java.io.File |
getRecentFile()
gets file that contains recently used config files |
static java.net.URL |
getResource(java.lang.String name)
Gets a resource using a path relative to the Drat.class directory. |
static java.io.InputStream |
getResourceAsStream(java.lang.String name)
Gets an input stream for reading a resource using a path relative to the Drat.class directory. |
static java.net.URL |
getResourceFileURL(java.lang.String name)
Gets a DRAT resource file, checking secondary locations if resource was not found in the path relative to the Drat.class directory. |
protected javax.swing.JPanel |
getToolbarPanel()
Return the DRAT GUI toolbar panel. |
private void |
initializeActions()
Initialize the actions that the GUI menu performs. |
void |
loadConfigFile(java.io.File dratConfigFile)
Load a panel configuration from a DRAT configuration file. |
static void |
main(java.lang.String[] args)
|
void |
movePanelBelow(DraggableJPanel panelToMove,
DraggableJPanel panelToMoveBelow)
Moves the panelToMove to the location after the panelToPlaceAfter. |
void |
movePanelInto(DraggableJPanel panel)
Moves panel into newPanel caller is responsible for removing panel from old container panel |
void |
readInNames()
Reads in recently used drat config file names |
void |
removeAllDraPanels()
Remove all the DraPanels from the current DRAT GUI configuration. |
static void |
runConfig(java.lang.String dratConfig)
Run a DRAT configuration for the File described by the given filename: does not affect the GUI or use it as input. |
static void |
runConfig(java.lang.String dratConfig,
java.lang.String[] recFiles)
Run a configuration for each of a set of input files, replacing the DRAT configuration's input and output files with derived filenames. |
static void |
runConfigs(java.lang.String[] dratConfigs,
java.lang.String[] recFiles)
Run a set of DRAT configuration for each of a set of input files, replacing the input and output files of each DRAT configuration with derived filenames. |
void |
runCurrentConfiguration()
Run the DRAT configuration specified by DRAT's GUI interface. |
void |
setDraPanelProperties(java.util.Properties inputProps,
int idx)
Set the properties of the index of the specified DraPanel. |
void |
setDraPanelProperty(java.lang.String name,
java.lang.String value,
int idx)
Set the properties of the index of the specified DraPanel. |
void |
setDraPanels(DraPanelList draPanels)
Set the DraPanels to be used by the DRAT. |
void |
setTitle(java.lang.String title)
Sets the title to the specified string. |
void |
setTitleSuffix(java.lang.String titleSuffix)
Sets the title suffix to the specified string. |
private void |
startDratGui()
Drat GUI processing (instead of parameter-activated batch processing). |
protected static java.io.File |
storeJarFileAsTempFile(java.net.URL url,
java.lang.String tempTypeName,
java.lang.String fileExt)
Extracts file from JAR and stores it as a temporary file in the default temporary directory and returns the new temp file name. |
static DraPanel |
toDraPanel(java.util.Properties panelProps)
Return DraPanel defined by a Properties object. |
static DraPanelList |
toDraPanelList(java.io.File dratConfigFile)
Return list of filter/factory panel instances from the DRAT configuration file. |
static DraPanelList |
toDraPanelList(java.io.File dratConfigFile,
java.lang.String recFile)
Return list of filter/factory panel instances from the DRAT configuration file, replacing the configuration's recording file name with the given file name and replacing the configuration's output file name with a derived name. |
static DraPanelList |
toDraPanelList(PropertyPerLine ppl)
Return list of DraPanels defined by a PropertyPerLine object. |
| Methods inherited from class javax.swing.JFrame |
|---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setUndecorated |
| Methods inherited from class java.awt.Window |
|---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface faa.tg.dra.gui.DratPanelDropListener |
|---|
getTitle |
| Methods inherited from interface faa.tg.dra.gui.PopDeleteInterface |
|---|
repaint |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
public static final java.lang.String DEFAULT_TITLE
public static final int MAXIMUM_GUI_WIDTH
public static final java.lang.String currentUI
public static final java.lang.String defaultFilesProperties
public static final java.lang.String PLOT_XML_DIR_PROP
private static java.lang.String helpFileName
private static java.util.ResourceBundle resources
static java.awt.Color filterColor
private static java.text.NumberFormat percentFormatter
private static java.text.NumberFormat integerFormatter
private static java.util.regex.Pattern toolbarDividerPattern
public static final java.util.regex.Pattern stdTokensPattern
private static boolean keepAsterisk
private java.lang.String guiTitle
private javax.swing.JButton runButton
private javax.swing.JScrollPane scroller
javax.swing.JPanel scrollingPanel
java.awt.Window parentWindow
javax.swing.JFrame dratFrame
javax.swing.JPanel mainPanel
HookupManager hookupManager
DraPanelList draPanels
DragAndDropMouseListener dndListener
private java.util.Hashtable<java.lang.Object,javax.swing.Action> guiActions
private java.util.Hashtable<java.lang.String,javax.swing.JMenuItem> menuItems
private javax.swing.JMenuBar menubar
private javax.swing.JPanel toolbarPanel
public static final java.lang.String imageSuffix
public static final java.lang.String labelSuffix
public static final java.lang.String actionSuffix
public static final java.lang.String tipSuffix
public static final java.lang.String openAction
public static final java.lang.String openRecentAction
public static final java.lang.String newAction
public static final java.lang.String saveAction
public static final java.lang.String saveAsAction
public static final java.lang.String exitAction
public static final java.lang.String plotAction
public static final java.lang.String runAction
public static final java.lang.String helpAction
public static final java.lang.String helpBrowseAction
public static final java.lang.String aboutAction
public static final java.lang.String rmFilterAction
public static final java.lang.String clearAllAction
public static final java.lang.String filterColorAction
public static final int RECENT_SIZE
protected java.util.Vector<java.lang.String> names
protected java.lang.String lastFileNameUsed
public static final java.lang.String RECENT_CONFIG_FILE
private javax.swing.Action[] defaultActions
| Constructor Detail |
|---|
public Drat()
throws DraException
DraException - User or configuration error while running DRAT.
public Drat(java.awt.Window parentWindow)
throws DraException
parentWindow - Parent window for the DRAT GUI.
DraException - User or configuration error while running DRAT.
public Drat(java.awt.Window parentWin,
java.lang.String dratConfigFileName)
throws DraException,
java.io.IOException
parentWin - Parent window for the DRAT GUI.dratConfigFileName - Configuration file saved by DRAT.
DraException - User or configuration error while running DRAT.
java.io.IOException - Thrown if error while loading configuration file.
public Drat(java.lang.String dratConfigFileName,
java.lang.String recFileName)
throws DraException,
java.io.IOException
dratConfigFileName - Configuration file saved by DRAT.recFileName - Name of a TGF recording file for a simulation.
DraException - User or configuration error while running DRAT.
java.io.IOException - Thrown if error while loading configuration file.
public Drat(java.awt.Window parentWin,
java.lang.String dratConfigFileName,
java.lang.String recFileName)
throws DraException,
java.io.IOException
parentWin - Parent window for the DRAT GUI.dratConfigFileName - Configuration file saved by DRAT.recFileName - Name of a TGF recording file for a simulation.
DraException - User or configuration error while running DRAT.
java.io.IOException - Thrown if error while loading configuration file.
public Drat(java.lang.String[] params)
throws DraException
params - Command line or specified parameters.
DraException - User or configuration error while running DRAT.| Method Detail |
|---|
private void initializeActions()
private void startDratGui()
throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic DraPanelList getDraPanels()
getDraPanels in interface PopDeleteInterfacepublic void setDraPanels(DraPanelList draPanels)
setDraPanels in interface PopDeleteInterfacedraPanels - List of DraPanels.public boolean canMovePanelInto(DraggableJPanel panel)
canMovePanelInto in interface DratPanelDropListenerpanel - - the panel to move
public void movePanelInto(DraggableJPanel panel)
throws javax.naming.OperationNotSupportedException
movePanelInto in interface DratPanelDropListenerpanel - - the panel to move
javax.naming.OperationNotSupportedException - - is thrown if panel can
not be moved into new container
public void movePanelBelow(DraggableJPanel panelToMove,
DraggableJPanel panelToMoveBelow)
movePanelBelow in interface JPanelDropListenerpanelToMove - DraggableJPanel being moved.panelToMoveBelow - DraggableJPanel to place the panelToMove after.
public void setDraPanelProperty(java.lang.String name,
java.lang.String value,
int idx)
public void setDraPanelProperties(java.util.Properties inputProps,
int idx)
throws OldTgfFileException
OldTgfFileException - Obsolete properties file format.public void loadConfigFile(java.io.File dratConfigFile)
public void runCurrentConfiguration()
throws DraException
DraException - Error from configuration setup.public void removeAllDraPanels()
removeAllDraPanels in interface PopDeleteInterface
private static java.lang.String getOutFileName(java.lang.String dratConfig,
java.lang.String recFile)
<inputFnamePrefix>.<dratConfigFnamePrefix>
public static java.io.File getConfigResourceFile(java.lang.String dratFileName)
throws DraException
dratFileName - The filename of the DRAT configuration file.
DraException - Configuration file "name.drat" was not found in
the configuration directory.public static java.lang.String getHelpFileName()
protected static java.io.File storeJarFileAsTempFile(java.net.URL url,
java.lang.String tempTypeName,
java.lang.String fileExt)
url - URL for input stream to import JAR file from.tempTypeName - Type of file to extract (minimum 3 chars).fileExt - The desired file extension, or null if unimportant.
public static DraPanel toDraPanel(java.util.Properties panelProps)
throws OldTgfFileException
panelProps - The Properties defining the DraPanel.
OldTgfFileException - File configuration format is obsolete.
public static DraPanelList toDraPanelList(PropertyPerLine ppl)
throws OldTgfFileException
ppl - The PropertiesPerLine object storing the class instances.
OldTgfFileException - Obsolete configuration properties format.
public static DraPanelList toDraPanelList(java.io.File dratConfigFile)
throws java.io.IOException,
OldTgfFileException
dratConfigFile - Configuration file in PropertyPerLine format that
stores the class instances.
java.io.IOException - Thrown if error while loading configuration file.
OldTgfFileException - File configuration format is obsolete.
public static DraPanelList toDraPanelList(java.io.File dratConfigFile,
java.lang.String recFile)
throws java.io.IOException,
DraException
Does not affect the GUI or use it as input.
If the recFile name is null or "", the DraPanelList returned is what was specified by the DRAT configuration file. Otherwise, the recFile name replaces the input file name of the configuration file and the filename of the output will be derived from the recFile name and the DRAT configuration filename:
<inputFilenamePrefix>.<dratConfigurationPrefix>The configuration file contains multiple Properties in the PropertyPerLine format.
If there is more than one reader panel, the later reader panels will have the sequence number of their panel appended to the input filename. The same will occur for output filenames if there is more than one writer panel.
dratConfigFile - Configuration file in PropertyPerLine format that
stores the class instances.recFile - Recording file name to replace configuration's input file
name with: output file name prefix also derives from this.
OldTgfFileException - File configuration format is obsolete.
DraException - No readers, or error setting filename.
java.io.IOException - Thrown if error while loading configuration file.
public static java.lang.String getDefaultFileProperty(java.lang.String propertyName)
throws java.io.IOException
java.io.IOException - If error loading the properties file.
public static void runConfig(java.lang.String dratConfig)
throws DraException
dratConfig - The name of the configuration file to run with.
DraException - User or configuration error while running DRAT.
public static void runConfig(java.lang.String dratConfig,
java.lang.String[] recFiles)
throws DraException
Does not affect the GUI or use it as input.
If the recFiles array is null, the configuration file is run, as is. If the recFiles array contains a list of input files, the configuration file is run on each input file in the list rather than on the input file specified in the configuration. The filename of the output will be derived from the input filename and the DRAT configuration name:
<inputFilenamePrefix>.<dratConfigurationPrefix>
dratConfig - The name of the configuration file to run with.recFiles - Array of names of input files to run DRAT on.
DraException - Setup error for the given input configuration.
public static void runConfigs(java.lang.String[] dratConfigs,
java.lang.String[] recFiles)
throws DraException
Does not affect the GUI or use it as input.
dratConfigs - Array of names of configuration files to run with.recFiles - Array of names of input files to run DRAT on.
DraException - Setup error for the given input configuration.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerevent - The ActionEvent to perform.public javax.swing.Action[] getActions()
public int getPanelWidth()
public void setTitle(java.lang.String title)
setTitle in class java.awt.Frametitle - The String to set the title to.public void setTitleSuffix(java.lang.String titleSuffix)
titleSuffix - The String to set the title suffix to.protected static java.lang.String getDratResourceString(java.lang.String nm)
nm - The name of the resource String to return.
protected static java.net.URL getDratResource(java.lang.String key)
key - The key String that indicates the resource to return.
public static java.net.URL getResource(java.lang.String name)
name - The resource name.
Class.getResource(String)public static java.net.URL getResourceFileURL(java.lang.String name)
Allows file choosers to work when executing from a JAR file.
Uses Class.getResource() to load the resource with the Drat package directory as the base directory. If TGF is being run through a JNLP file or by using AppletViewer, this will find the TGF resource (which is not found by the method ClassLoader.getSystemResource(). This also keeps all resource file paths relative to the package directory of this class.
name - The resource name.
Class.getResource(String)public static java.io.InputStream getResourceAsStream(java.lang.String name)
name - The resource name.
Class.getResourceAsStream(String)public static java.util.Iterator getConfigIterator()
protected javax.swing.JMenuBar getMenubar()
protected javax.swing.JMenuBar createMenubar()
protected javax.swing.JMenu createMenu(java.lang.String key)
key - The key String that inicates the menu to return.
protected java.beans.PropertyChangeListener createActionChangeListener(javax.swing.JMenuItem b)
protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
cmd - The command string that inicates the menu item to return.
getMenuItem(java.lang.String)protected javax.swing.JMenuItem getMenuItem(java.lang.String cmd)
cmd - Name of the action.
protected javax.swing.Action getAction(java.lang.String cmd)
cmd - Name of the action.
protected javax.swing.JPanel getToolbarPanel()
private javax.swing.JPanel createToolbarPanel()
protected java.awt.Component createTool(java.lang.String key)
protected javax.swing.JButton createToolbarButton(java.lang.String key)
key - Key in the resource file to serve as the basis of lookups.public void addName(java.lang.String newName)
newName - - the name to add to the recently used DRAT config filespublic void readInNames()
private java.io.File getRecentFile()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||