update to javac 1.5

This commit is contained in:
mattijs
2008-05-02 11:41:51 +01:00
parent 26ac5e118f
commit 40d04f4874
28 changed files with 79 additions and 106 deletions

View File

@ -176,7 +176,7 @@ public class App
mainFrame_.initialise(args); mainFrame_.initialise(args);
mainFrame_.show(); mainFrame_.setVisible(true);
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------

View File

@ -172,10 +172,10 @@ public class CaseBrowserModel
keyMap_.clear(); keyMap_.clear();
// Loop over all host nodes. // Loop over all host nodes.
Enumeration enum = hostMap_.keys(); Enumeration iter = hostMap_.keys();
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
String hostName = (String)enum.nextElement(); String hostName = (String)iter.nextElement();
// Get host node. // Get host node.
DefaultMutableTreeNode hostNode = DefaultMutableTreeNode hostNode =
@ -306,10 +306,10 @@ public class CaseBrowserModel
// { // {
// //
// // Loop over all host nodes. // // Loop over all host nodes.
// Enumeration enum = hostMap_.keys(); // itereration iter = hostMap_.keys();
// while (enum.hasMoreElements()) // while (iter.hasMoreElements())
// { // {
// String hostName = (String)enum.nextElement(); // String hostName = (String)iter.nextElement();
// //
// // Get host node. // // Get host node.
// DefaultMutableTreeNode hostNode = // DefaultMutableTreeNode hostNode =
@ -862,10 +862,10 @@ public class CaseBrowserModel
keyMap_.clear(); keyMap_.clear();
// Loop over all host nodes. // Loop over all host nodes.
Enumeration enum = hostMap_.keys(); Enumeration iter = hostMap_.keys();
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
String hostName = (String)enum.nextElement(); String hostName = (String)iter.nextElement();
// Get host node. // Get host node.
DefaultMutableTreeNode hostNode = DefaultMutableTreeNode hostNode =

View File

@ -1720,7 +1720,7 @@ public class CaseBrowserPanel
null, null,
context.getCaseBrowser() context.getCaseBrowser()
); );
processEditor.show(); processEditor.setVisible(true);
} }
} }
} }
@ -1795,7 +1795,7 @@ public class CaseBrowserPanel
dictHolder.value dictHolder.value
); );
compoundEditor.setTitle("OpenFOAM Dictionary"); compoundEditor.setTitle("OpenFOAM Dictionary");
compoundEditor.show(); compoundEditor.setVisible(true);
if (dictHolder.value.modified()) if (dictHolder.value.modified())
{ {
@ -2511,7 +2511,7 @@ public class CaseBrowserPanel
} }
// Show the dialog. // Show the dialog.
dlg.show(); dlg.setVisible(true);
if (!dlg.wasCancelled()) if (!dlg.wasCancelled())
{ {
@ -2881,7 +2881,7 @@ public class CaseBrowserPanel
controlDict.getDictEntry() controlDict.getDictEntry()
); );
compoundEditor.setTitle("Clone Case"); compoundEditor.setTitle("Clone Case");
compoundEditor.show(); compoundEditor.setVisible(true);
// Show busy cursor. // Show busy cursor.
BusyCursor busyCursor = new BusyCursor BusyCursor busyCursor = new BusyCursor

View File

@ -137,11 +137,11 @@ public class CaseManager
int caseNo = 0; int caseNo = 0;
// Close all cases. // Close all cases.
Enumeration enum = caseMap_.elements(); Enumeration iter = caseMap_.elements();
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
// Get next case. // Get next case.
CasePanel casePanel = (CasePanel)enum.nextElement(); CasePanel casePanel = (CasePanel)iter.nextElement();
// Give option of saving if modified // Give option of saving if modified
casePanel.checkAndSave casePanel.checkAndSave
@ -176,11 +176,11 @@ public class CaseManager
// ); // );
//caseNo = 0; //caseNo = 0;
//// Close all cases. //// Close all cases.
//enum = casePostMap_.elements(); //iter = casePostMap_.elements();
//while (enum.hasMoreElements()) //while (iter.hasMoreElements())
//{ //{
// // Get next case. // // Get next case.
// CasePostPanel casePostPanel = (CasePostPanel)enum.nextElement(); // CasePostPanel casePostPanel = (CasePostPanel)iter.nextElement();
// //
// // Do exactly if 'close case' on casePostPanel was pressed // // Do exactly if 'close case' on casePostPanel was pressed
// casePostClosed // casePostClosed

View File

@ -1295,7 +1295,7 @@ public class CasePanel
"controlDict", "controlDict",
null null
); );
runPanel.show(); runPanel.setVisible(true);
} }
} }
} }

View File

@ -314,12 +314,12 @@ public class BoundaryDefinitionModelItem
patchPhysicalTypeDesc_.patchType(patchType_); patchPhysicalTypeDesc_.patchType(patchType_);
// Set the patch field types. // Set the patch field types.
Enumeration enum = patchFieldTypeMap_.keys(); Enumeration iter = patchFieldTypeMap_.keys();
StringPair[] patchFieldTypes = new StringPair[patchFieldTypeMap_.size()]; StringPair[] patchFieldTypes = new StringPair[patchFieldTypeMap_.size()];
int nField = 0; int nField = 0;
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
String fieldName = (String)enum.nextElement(); String fieldName = (String)iter.nextElement();
String patchFieldType = (String)patchFieldTypeMap_.get(fieldName); String patchFieldType = (String)patchFieldTypeMap_.get(fieldName);
patchFieldTypes[nField++] = new StringPair(fieldName, patchFieldType); patchFieldTypes[nField++] = new StringPair(fieldName, patchFieldType);
} }

View File

@ -101,7 +101,7 @@ public class CaseNameCache
App.getRootFrame(), App.getRootFrame(),
CaseBrowserPanel.SELECT_CASE_MODE CaseBrowserPanel.SELECT_CASE_MODE
); );
caseChooser.show(); caseChooser.setVisible(true);
if if
( (

View File

@ -174,7 +174,7 @@ public class CompoundCache
); );
editor.setTitle(displayName_); editor.setTitle(displayName_);
editor.show(); editor.setVisible(true);
// Update the cached display string. // Update the cached display string.
displayValue_ = getCompoundDisplayString(3); displayValue_ = getCompoundDisplayString(3);
// Signal that editing has stopped. // Signal that editing has stopped.

View File

@ -122,8 +122,7 @@ public class DictionaryCache
dictEntry_ dictEntry_
); );
editor.setTitle(displayName_); editor.setTitle(displayName_);
editor.setVisible(true);
editor.show();
// Update the cached display string. // Update the cached display string.
displayValue_ = getCompoundDisplayString(3); displayValue_ = getCompoundDisplayString(3);
// Signal that editing has stopped. // Signal that editing has stopped.

View File

@ -139,7 +139,7 @@ public class DimensionSetCache
editor.setTitle(displayName_); editor.setTitle(displayName_);
editor.show(); editor.setVisible(true);
// Update value in case it has been updated. // Update value in case it has been updated.
getEntryValue(); getEntryValue();
// Signal that editing has stopped. // Signal that editing has stopped.

View File

@ -135,7 +135,7 @@ public class FixedListCache
typeDescriptor_ typeDescriptor_
); );
editor.setTitle(displayName_); editor.setTitle(displayName_);
editor.show(); editor.setVisible(true);
// Update the cached display string. // Update the cached display string.
displayValue_ = getCompoundDisplayString(3); displayValue_ = getCompoundDisplayString(3);
// Signal that editing has stopped. // Signal that editing has stopped.

View File

@ -124,7 +124,7 @@ public class HostNameCache
// Pop up host chooser panel // Pop up host chooser panel
HostChooserDlg hostChooser = HostChooserDlg hostChooser =
new HostChooserDlg(App.getRootFrame()); new HostChooserDlg(App.getRootFrame());
hostChooser.show(); hostChooser.setVisible(true);
if (hostChooser.getHostName() != null) if (hostChooser.getHostName() != null)
{ {

View File

@ -189,7 +189,7 @@ public class ListCache
); );
editor.setTitle(displayName_); editor.setTitle(displayName_);
editor.show(); editor.setVisible(true);
// Signal that editing has stopped. // Signal that editing has stopped.
editor_.stopCellEditing(); editor_.stopCellEditing();
} }

View File

@ -187,7 +187,7 @@ public class RootAndCaseCache
App.getRootFrame(), App.getRootFrame(),
CaseBrowserPanel.SELECT_CASE_MODE CaseBrowserPanel.SELECT_CASE_MODE
); );
caseChooser.show(); caseChooser.setVisible(true);
if if
( (

View File

@ -129,7 +129,7 @@ public class RootDirCache
App.getRootFrame(), App.getRootFrame(),
CaseBrowserPanel.SELECT_ROOT_MODE CaseBrowserPanel.SELECT_ROOT_MODE
); );
caseChooser.show(); caseChooser.setVisible(true);
if if
( (

View File

@ -127,7 +127,7 @@ public class SelectionCache
); );
editor.setTitle(displayName_); editor.setTitle(displayName_);
editor.show(); editor.setVisible(true);
// Update the cached display string. // Update the cached display string.
displayValue_ = getSelectionDisplayString(); displayValue_ = getSelectionDisplayString();
// Signal that editing has stopped. // Signal that editing has stopped.

View File

@ -1783,7 +1783,7 @@ public class CaseEditorModule
CaseBrowserPanel.SELECT_CASE_MODE CaseBrowserPanel.SELECT_CASE_MODE
); );
caseChooser.show(); caseChooser.setVisible(true);
if if
( (

View File

@ -193,11 +193,11 @@ public class PatchEditorModel
} }
// Now that the map is initialised, build the tree. // Now that the map is initialised, build the tree.
Enumeration enum = boundaryDefMap_.elements(); Enumeration iter = boundaryDefMap_.elements();
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
DefaultMutableTreeNode node = DefaultMutableTreeNode node =
(DefaultMutableTreeNode)enum.nextElement(); (DefaultMutableTreeNode)iter.nextElement();
BoundaryDefinitionModelItem nodeInfo = BoundaryDefinitionModelItem nodeInfo =
(BoundaryDefinitionModelItem)node.getUserObject(); (BoundaryDefinitionModelItem)node.getUserObject();

View File

@ -211,7 +211,7 @@ public class PatchEditorWindow
// Initialise and show the boundary type selector dialog. // Initialise and show the boundary type selector dialog.
PatchPhysicalTypeSelectorDlg dlg = new PatchPhysicalTypeSelectorDlg(null, patchModel_); PatchPhysicalTypeSelectorDlg dlg = new PatchPhysicalTypeSelectorDlg(null, patchModel_);
dlg.show(); dlg.setVisible(true);
// If the dialog wasn't cancelled, update the boundary type name. // If the dialog wasn't cancelled, update the boundary type name.
if (!dlg.wasCancelled()) if (!dlg.wasCancelled())

View File

@ -327,7 +327,7 @@ public class ProcessEditor extends javax.swing.JDialog
labels, values labels, values
); );
dlg.show(); dlg.setVisible(true);
} }

View File

@ -343,7 +343,7 @@ public class InvokeUtilityAction
desc.name + "Dict", desc.name + "Dict",
controlDict controlDict
); );
runPanel.show(); runPanel.setVisible(true);
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -62,10 +62,10 @@ public class CollapseTreeAction
TreeModel model = tree_.getModel(); TreeModel model = tree_.getModel();
DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot();
Enumeration enum = root.depthFirstEnumeration(); Enumeration iter = root.depthFirstEnumeration();
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)enum.nextElement(); DefaultMutableTreeNode node = (DefaultMutableTreeNode)iter.nextElement();
TreePath tp = new TreePath(node.getPath()); TreePath tp = new TreePath(node.getPath());
tree_.collapsePath(tp); tree_.collapsePath(tp);
} }

View File

@ -62,10 +62,10 @@ public class ExpandTreeAction
TreeModel model = tree_.getModel(); TreeModel model = tree_.getModel();
DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot();
Enumeration enum = root.depthFirstEnumeration(); Enumeration iter = root.depthFirstEnumeration();
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)enum.nextElement(); DefaultMutableTreeNode node = (DefaultMutableTreeNode)iter.nextElement();
TreePath tp = new TreePath(node.getPath()); TreePath tp = new TreePath(node.getPath());
tree_.expandPath(tp); tree_.expandPath(tp);
} }

View File

@ -179,7 +179,7 @@ public class FileEditor
simpleEditor_.openFile(workFile_); simpleEditor_.openFile(workFile_);
} }
simpleEditor_.show(); simpleEditor_.setVisible(true);
} }

View File

@ -168,7 +168,7 @@ public class RunPanel
} }
show(); setVisible(true);
} }
catch(FoamXError fxErr) catch(FoamXError fxErr)
{ {
@ -607,7 +607,7 @@ public class RunPanel
// Pop up host chooser panel // Pop up host chooser panel
HostChooserDlg hostChooser = HostChooserDlg hostChooser =
new HostChooserDlg(parent_); new HostChooserDlg(parent_);
hostChooser.show(); hostChooser.setVisible(true);
if (hostChooser.getHostName() != null) if (hostChooser.getHostName() != null)
{ {
@ -680,7 +680,7 @@ public class RunPanel
JDialog dialog = pane.createDialog(this, "FoamX..."); JDialog dialog = pane.createDialog(this, "FoamX...");
dialog.setModal(false); dialog.setModal(false);
dialog.pack(); dialog.pack();
dialog.show(); dialog.setVisible(true);
// Install new file change listener // Install new file change listener
StringHolder holder = new StringHolder(); StringHolder holder = new StringHolder();
@ -755,7 +755,7 @@ public class RunPanel
parent_, parent_,
argumentsEntry.getDictEntry() argumentsEntry.getDictEntry()
); );
compoundEditor.show(); compoundEditor.setVisible(true);
// Update displayed value // Update displayed value
setArgsField(false, argumentsEntry); setArgsField(false, argumentsEntry);
@ -791,7 +791,7 @@ public class RunPanel
controlDict_.getDictEntry() controlDict_.getDictEntry()
); );
compoundEditor.show(); compoundEditor.setVisible(true);
DictionaryEntryCache argumentsEntry = DictionaryEntryCache argumentsEntry =
controlDict_.getSubEntry("arguments"); controlDict_.getSubEntry("arguments");

View File

@ -700,6 +700,6 @@ public class SimpleEditor extends JFrame implements FileListener
frame.openFile(file); frame.openFile(file);
frame.show(); frame.setVisible(true);
} }
} }

View File

@ -335,10 +335,10 @@ public class WindowManager
{ {
int x = 0; int x = 0;
Enumeration enum = windowMap_.elements(); Enumeration iter = windowMap_.elements();
while (enum.hasMoreElements()) while (iter.hasMoreElements())
{ {
FoamXInternalFrame frame = (FoamXInternalFrame)enum.nextElement(); FoamXInternalFrame frame = (FoamXInternalFrame)iter.nextElement();
frame.setBounds(x, x, defaultFrameWidth_, defaultFrameHeight_); frame.setBounds(x, x, defaultFrameWidth_, defaultFrameHeight_);
x += 20; x += 20;

View File

@ -30,8 +30,6 @@
# Loader for FoamX Java Client. # Loader for FoamX Java Client.
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set default JDK path.
jdkhome="/usr/java/jdk1.4"
Script=${0##*/} Script=${0##*/}
@ -76,18 +74,19 @@ cleanup() {
} }
# isValid jobControlFile ## isValid jobControlFile
isValid() { #isValid() {
grep 'startDate' $1 > /dev/null && \ # grep 'startDate' $1 > /dev/null && \
grep 'startTime' $1 > /dev/null && \ # grep 'startTime' $1 > /dev/null && \
grep 'userName' $1 > /dev/null && \ # grep 'userName' $1 > /dev/null && \
grep 'foamVersion' $1 > /dev/null && \ # grep 'foamVersion' $1 > /dev/null && \
grep 'code' $1 > /dev/null && \ # grep 'code' $1 > /dev/null && \
grep 'currentDir' $1 > /dev/null && \ # grep 'currentDir' $1 > /dev/null && \
grep 'argList' $1 > /dev/null # grep 'argList' $1 > /dev/null
#
# return $?
#}
return $?
}
#------------------------- #-------------------------
# #
@ -95,33 +94,12 @@ isValid() {
# #
#------------------------- #-------------------------
# If JAVA_PATH or JAVA_HOME are set, it overrides the default. #if [ -z "$FOAM_JOB_DIR" ]; then
if [ -n "$JAVA_PATH" ]; then # echo "FOAM_JOB_DIR environment variable not set. This should point to the"
jdkhome=$JAVA_PATH # echo "Foam jobControl directory."
elif [ -n "$JAVA_HOME" ]; then # echo ""
jdkhome=$JAVA_HOME # exit 1
fi #fi
# check that the JDK exists.
if [ -z "$jdkhome" ] ; then
echo "Java path not set. Please set JAVA_PATH to the JDK installation"
echo "directory."
echo ""
exit 1
fi
if [ ! -x "$jdkhome/bin/java" ] ; then
echo "Cannot find JDK at $jdkhome. Please set JAVA_PATH to the"
echo "JDK installation directory."
echo ""
exit 1
fi
if [ -z "$FOAM_JOB_DIR" ]; then
echo "FOAM_JOB_DIR environment variable not set. This should point to the"
echo "Foam jobControl directory."
echo ""
exit 1
fi
# Make sure that the FoamX configuration directory is available. # Make sure that the FoamX configuration directory is available.
if [ ! -d "$FOAMX_CONFIG" ] ; then if [ ! -d "$FOAMX_CONFIG" ] ; then
@ -232,12 +210,8 @@ if [ "$XHB_PID" ]; then
fi fi
#- For mico > 2.3.7 : force to use 1.0 #- For mico > 2.3.7 : force to use 1.0
if [ `uname -s` = 'AIX' ]; then #orbArgs="-ORBDefaultInitRef corbaloc:iiop:1.0:$HOSTNAME:$HOSTPORT"
orbArgs='' orbArgs="-ORBDefaultInitRef corbaloc:iiop:1.0:$HOSTNAME:$HOSTPORT -ORBInitialPort $HOSTPORT -ORBInitialHost $HOSTNAME"
else
#orbArgs="-ORBDefaultInitRef corbaloc:iiop:1.0:$HOSTNAME:$HOSTPORT"
orbArgs="-ORBDefaultInitRef corbaloc:iiop:1.0:$HOSTNAME:$HOSTPORT -ORBInitialPort $HOSTPORT -ORBInitialHost $HOSTNAME"
fi
#echo "Starting Java with ORB arguments : $orbArgs" #echo "Starting Java with ORB arguments : $orbArgs"
# Set Language to English # Set Language to English