translated root menu item as discussed in this sf.net thread.

https://sourceforge.net/forum/message.php?msg_id=5614246
This commit is contained in:
trifonnt 2008-11-12 12:52:41 +00:00
parent 77f5e629c8
commit ae8be3adbf
1 changed files with 4 additions and 1 deletions

View File

@ -125,6 +125,9 @@ public final class VTreePanel extends CPanel
// Get Tree // Get Tree
MTree vTree = new MTree (Env.getCtx(), AD_Tree_ID, m_editable, true, null); MTree vTree = new MTree (Env.getCtx(), AD_Tree_ID, m_editable, true, null);
m_root = vTree.getRoot(); m_root = vTree.getRoot();
m_root.setName(Msg.getMsg(Env.getCtx(), vTree.getName() ) ); // translate name of menu.
// m_root.setName(Msg.getMsg(Env.getCtx(), "Menu") ); // @Trifon; this is the hardcoded way.
log.config("root=" + m_root); log.config("root=" + m_root);
m_nodeTableName = vTree.getNodeTableName(); m_nodeTableName = vTree.getNodeTableName();
treeModel = new DefaultTreeModel(m_root, true); treeModel = new DefaultTreeModel(m_root, true);
@ -136,7 +139,7 @@ public final class VTreePanel extends CPanel
for (JToolBar jt : toolbar) for (JToolBar jt : toolbar)
jt.removeAll(); jt.removeAll();
toolbarMap = new HashMap<Integer, JToolBar>(); toolbarMap = new HashMap<Integer, JToolBar>();
Enumeration enTop =m_root.children(); Enumeration enTop = m_root.children();
JToolBar jt = null; JToolBar jt = null;
Map<JToolBar,String> titleMap = new HashMap<JToolBar, String>(); Map<JToolBar,String> titleMap = new HashMap<JToolBar, String>();
while (enTop.hasMoreElements()) while (enTop.hasMoreElements())