diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-12-12 23:19:21 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-12-12 23:19:21 +0000 |
commit | 5e28e3a630f7eadc09c215d7c684faae7ffecca4 (patch) | |
tree | 31d40d963d9119e23e99a69fbebd6d1bb5293f84 /java/src/IceGridGUI/LiveDeployment/Root.java | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1616. Fixed SSL bug with (diff) | |
download | ice-5e28e3a630f7eadc09c215d7c684faae7ffecca4.tar.bz2 ice-5e28e3a630f7eadc09c215d7c684faae7ffecca4.tar.xz ice-5e28e3a630f7eadc09c215d7c684faae7ffecca4.zip |
Completed ShowLogDialog implementation
Diffstat (limited to 'java/src/IceGridGUI/LiveDeployment/Root.java')
-rwxr-xr-x | java/src/IceGridGUI/LiveDeployment/Root.java | 57 |
1 files changed, 44 insertions, 13 deletions
diff --git a/java/src/IceGridGUI/LiveDeployment/Root.java b/java/src/IceGridGUI/LiveDeployment/Root.java index cafe9e8d64d..d545c96b5af 100755 --- a/java/src/IceGridGUI/LiveDeployment/Root.java +++ b/java/src/IceGridGUI/LiveDeployment/Root.java @@ -37,7 +37,8 @@ public class Root extends ListArrayTreeNode _coordinator = coordinator; _childrenArray[0] = _slaves; _childrenArray[1] = _nodes; - + _messageSizeMax = Ice.Util.getInstance(_coordinator.getCommunicator()).messageSizeMax(); + _tree = new JTree(this, true); _treeModel = (DefaultTreeModel)_tree.getModel(); _objectDialog = new ObjectDialog(this); @@ -866,6 +867,12 @@ public class Root extends ListArrayTreeNode { return "Registry " + _label + " " + (stdout ? "Stdout" : "Stderr"); } + + public String getDefaultFilename() + { + return _replicaName + (stdout ? ".out" : ".err"); + } + }); } @@ -884,8 +891,7 @@ public class Root extends ListArrayTreeNode if(d == null) { d = new ShowLogDialog(this, factory, - _logPeriod, _logInitialLines, - _logMaxLines, _logMaxSize, _logMaxReadLines); + _logMaxLines, _logMaxSize, _logInitialLines, _logMaxReadSize, _logPeriod); _showLogDialogMap.put(factory.getTitle(), d); } @@ -911,25 +917,47 @@ public class Root extends ListArrayTreeNode _showLogDialogMap.clear(); } + public int getMessageSizeMax() + { + return _messageSizeMax; + } + + + public void setLogPrefs(int maxLines, int maxSize, int initialLines, int maxReadSize, int period) + { + _logMaxLines = maxLines; + _logMaxSize = maxSize; + _logInitialLines = initialLines; + _logMaxReadSize = maxReadSize; + _logPeriod = period; + + storeLogPrefs(); + } + private void loadLogPrefs() { Preferences logPrefs = _coordinator.getPrefs().node("Log"); - _logPeriod = logPrefs.getInt("period", 300); - _logInitialLines = logPrefs.getInt("initialLines", 10); _logMaxLines = logPrefs.getInt("maxLines", 500); _logMaxSize = logPrefs.getInt("maxSize", 20000); - _logMaxReadLines = logPrefs.getInt("maxReadLines", 50); + _logInitialLines = logPrefs.getInt("initialLines", 10); + _logMaxReadSize = logPrefs.getInt("maxReadSize", 10000); + _logPeriod = logPrefs.getInt("period", 300); + + if(_logMaxReadSize + 512 > _messageSizeMax) + { + _logMaxReadSize = _messageSizeMax - 512; + } } private void storeLogPrefs() { Preferences logPrefs = _coordinator.getPrefs().node("Log"); - logPrefs.putInt("period", _logPeriod); - logPrefs.putInt("initialLines", _logInitialLines); logPrefs.putInt("maxLines", _logMaxLines); logPrefs.putInt("maxSize", _logMaxSize); - logPrefs.putInt("maxReadLines", _logMaxReadLines); + logPrefs.putInt("initialLines", _logInitialLines); + logPrefs.putInt("maxReadSize", _logMaxReadSize); + logPrefs.putInt("period", _logPeriod); } @@ -1000,13 +1028,16 @@ public class Root extends ListArrayTreeNode // // ShowLogDialog // + final int _messageSizeMax; + java.util.Map _showLogDialogMap = new java.util.HashMap(); - int _logPeriod; - int _logInitialLines; + int _logMaxLines; int _logMaxSize; - int _logMaxReadLines; - + int _logInitialLines; + int _logMaxReadSize; + int _logPeriod; + static private RegistryEditor _editor; static private JPopupMenu _popup; static private DefaultTreeCellRenderer _cellRenderer; |