diff --git a/tools/unicodetools/com/ibm/rbm/gui/RBGroupPanel.java b/tools/unicodetools/com/ibm/rbm/gui/RBGroupPanel.java index a27cfeb98d..7b2a73a0b9 100644 --- a/tools/unicodetools/com/ibm/rbm/gui/RBGroupPanel.java +++ b/tools/unicodetools/com/ibm/rbm/gui/RBGroupPanel.java @@ -490,3 +490,32 @@ class GroupComboActionListener implements ActionListener { } else RBManagerGUI.debugMsg("Selection changed, but no active components"); } } + +/** + * The list model for groups + */ +class GroupItemsListModel extends AbstractListModel { + BundleGroup group; + + public void setGroup(BundleGroup group) { + this.group = group; + } + + public GroupItemsListModel(BundleGroup group) { + this.group = group; + } + + public int getSize() { + if (group == null) return 0; + return group.getItemCount(); + } + + public Object getElementAt(int index) { + return group.getBundleItem(index); + } + + public void update() { + fireContentsChanged(this, 0, getSize()-1); + } +} + diff --git a/tools/unicodetools/com/ibm/rbm/gui/RBManagerGUI.java b/tools/unicodetools/com/ibm/rbm/gui/RBManagerGUI.java index 7402c4c333..25a622b116 100644 --- a/tools/unicodetools/com/ibm/rbm/gui/RBManagerGUI.java +++ b/tools/unicodetools/com/ibm/rbm/gui/RBManagerGUI.java @@ -262,6 +262,7 @@ public class RBManagerGUI extends JFrame implements ActionListener, MouseListene public void createBundleItem() { new BundleItemCreationDialog(rbm, this, Resources.getTranslation("dialog_title_new_item"), true); updateDisplayPanels(); + updateProjectTree(); } /** @@ -1288,33 +1289,6 @@ class RBTreeCellRenderer extends DefaultTreeCellRenderer { } } -// The list model for groups - -class GroupItemsListModel extends AbstractListModel { - BundleGroup group; - - public void setGroup(BundleGroup group) { - this.group = group; - } - - public GroupItemsListModel(BundleGroup group) { - this.group = group; - } - - public int getSize() { - if (group == null) return 0; - return group.getItemCount(); - } - - public Object getElementAt(int index) { - return group.getBundleItem(index); - } - - public void update() { - fireContentsChanged(this, 0, getSize()-1); - } -} - // Table model for resource bundle projects class RBProject { diff --git a/tools/unicodetools/com/ibm/rbm/gui/RBProjectItemPanel.java b/tools/unicodetools/com/ibm/rbm/gui/RBProjectItemPanel.java index b575e89175..875e471cec 100644 --- a/tools/unicodetools/com/ibm/rbm/gui/RBProjectItemPanel.java +++ b/tools/unicodetools/com/ibm/rbm/gui/RBProjectItemPanel.java @@ -143,11 +143,13 @@ class RBProjectItemPanel extends JPanel implements ActionListener { for (int i=0; i < bundles.size(); i++) { Bundle bundle = (Bundle)bundles.elementAt(i); BundleItem bundleItem = bundle.getBundleItem(key); - boolean translated = bundleItem.isTranslated(); + //boolean translated = bundleItem.isTranslated(); JLabel encodingLabel = new JLabel(Resources.getTranslation("project_panel_bundle", bundle.toString()), SwingConstants.LEFT); - if (!translated) encodingLabel.setText(Resources.getTranslation("project_panel_bundle_untranslated", - bundle.toString())); + if (bundleItem == null || !bundleItem.isTranslated()) { + encodingLabel.setText(Resources.getTranslation("project_panel_bundle_untranslated", + bundle.toString())); + } String fieldText = (bundleItem == null ? Resources.getTranslation("project_panel_item_inherits") : bundleItem.getTranslation()); JTextField itemField = new JTextField(fieldText);