Package VASSAL.i18n

Class TranslateWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ListSelectionListener, TreeSelectionListener, RootPaneContainer, WindowConstants
Direct Known Subclasses:
TranslateVassalWindow

public class TranslateWindow extends JDialog implements ListSelectionListener, TreeSelectionListener
Window for editing translations of a Configurable object
See Also:
  • Field Details Link icon

    • TRANSLATION_NEEDED_COLOR Link icon

      protected static final Color TRANSLATION_NEEDED_COLOR
    • TRANSLATION_DONE_COLOR Link icon

      protected static final Color TRANSLATION_DONE_COLOR
    • NO_TRANSLATION_NEEDED_COLOR Link icon

      protected static final Color NO_TRANSLATION_NEEDED_COLOR
    • target Link icon

      protected Translatable target
    • keys Link icon

      protected String[] keys
    • keyTable Link icon

      protected JTable keyTable
    • keyTarget Link icon

      protected Translatable keyTarget
    • tree Link icon

      protected JTree tree
    • currentTranslation Link icon

      protected Translation currentTranslation
    • langBox Link icon

      protected JComboBox<String> langBox
    • boxListener Link icon

      protected ActionListener boxListener
    • lastSelectedLangIndex Link icon

      protected int lastSelectedLangIndex
    • currentKey Link icon

      protected String currentKey
    • myConfigureTree Link icon

      protected ConfigureTree myConfigureTree
    • copyButtons Link icon

      protected VASSAL.i18n.TranslateWindow.CopyButton[] copyButtons
    • okButton Link icon

      protected JButton okButton
    • cancelButton Link icon

      protected JButton cancelButton
  • Constructor Details Link icon

  • Method Details Link icon

    • initComponents Link icon

      protected void initComponents()
    • getHeaderPanel Link icon

      protected Component getHeaderPanel()
    • getNewTranslation Link icon

      protected void getNewTranslation()
      User has clicked on the Add Translation button. Create a new PropertiesWindow for a translation and display it.
    • refreshTranslationList Link icon

      protected void refreshTranslationList(Configurable target)
      Called from MyPropertiesWindow when the user saves the new translation
      Parameters:
      target - new Translation
    • buildMainPanel Link icon

      protected Component buildMainPanel()
    • buildKeyTablePanel Link icon

      protected JPanel buildKeyTablePanel()
    • getButtonPanel Link icon

      protected Component getButtonPanel()
    • commitTableEdit Link icon

      protected void commitTableEdit()
    • changeLanguage Link icon

      protected void changeLanguage(String selectedTranslation)
      New Language selected from the drop-down box
    • valueChanged Link icon

      public void valueChanged(TreeSelectionEvent e)
      When a new node is selected, display keys for the new component in the keys table
      Specified by:
      valueChanged in interface TreeSelectionListener
    • valueChanged Link icon

      public void valueChanged(ListSelectionEvent e)
      When a key is selected in the table, display the source and translated texts in the right hand panels
      Specified by:
      valueChanged in interface ListSelectionListener
    • createNodes Link icon

      protected void createNodes(TranslateWindow.MyTreeNode top)
      Create the nodes for the JTree display
    • getDisplayName Link icon

      public static String getDisplayName(Translatable t)
    • cancel Link icon

      protected void cancel()
      Cancel button clicked. Check for outstanding changes.
    • querySave Link icon

      protected boolean querySave() throws IOException
      Throws:
      IOException
    • save Link icon

      protected void save() throws IOException
      Save button clicked
      Throws:
      IOException - oops
    • saveTranslation Link icon

      protected boolean saveTranslation() throws IOException
      Save the current Translation
      Throws:
      IOException - oops
    • reloadTranslation Link icon

      protected void reloadTranslation() throws IOException
      Reload the current translation from the archive
      Throws:
      IOException - oops