/** * Updates this dialog's locale-dependent state. * * Here: updates title and actions. * <p> * * * @see #setLocale(Locale) */ protected void updateLocaleState(Locale locale) { setTitleFromContent(); for (Object key : getRootPane().getActionMap().allKeys()) { if (key instanceof String) { Action contentAction = content.getActionMap().get(key); Action rootPaneAction = getAction(key); if ((!rootPaneAction.equals(contentAction))) { String keyString = getUIString((String) key, locale); if (!key.equals(keyString)) { rootPaneAction.putValue(Action.NAME, keyString); } } } } }
/** * Updates this dialog's locale-dependent state. * * Here: updates title and actions. * <p> * * * @see #setLocale(Locale) */ protected void updateLocaleState(Locale locale) { setTitleFromContent(); for (Object key : getRootPane().getActionMap().allKeys()) { if (key instanceof String) { Action contentAction = content.getActionMap().get(key); Action rootPaneAction = getAction(key); if ((!rootPaneAction.equals(contentAction))) { String keyString = getUIString((String) key, locale); if (!key.equals(keyString)) { rootPaneAction.putValue(Action.NAME, keyString); } } } } }
/** * Updates this dialog's locale-dependent state. * * Here: updates title and actions. * <p> * * * @see #setLocale(Locale) */ protected void updateLocaleState(Locale locale) { setTitleFromContent(); for (Object key : getRootPane().getActionMap().allKeys()) { if (key instanceof String) { Action contentAction = content.getActionMap().get(key); Action rootPaneAction = getAction(key); if ((!rootPaneAction.equals(contentAction))) { String keyString = getUIString((String) key, locale); if (!key.equals(keyString)) { rootPaneAction.putValue(Action.NAME, keyString); } } } } }
/** * Updates this dialog's locale-dependent state. * * Here: updates title and actions. * <p> * * * @see #setLocale(Locale) */ protected void updateLocaleState(Locale locale) { setTitleFromContent(); for (Object key : getRootPane().getActionMap().allKeys()) { if (key instanceof String) { Action contentAction = content.getActionMap().get(key); Action rootPaneAction = getAction(key); if ((!rootPaneAction.equals(contentAction))) { String keyString = getUIString((String) key, locale); if (!key.equals(keyString)) { rootPaneAction.putValue(Action.NAME, keyString); } } } } }
/** * Updates this dialog's locale-dependent state. * * Here: updates title and actions. * <p> * * * @see #setLocale(Locale) */ protected void updateLocaleState(Locale locale) { setTitleFromContent(); for (Object key : getRootPane().getActionMap().allKeys()) { if (key instanceof String) { Action contentAction = content.getActionMap().get(key); Action rootPaneAction = getAction(key); if ((!rootPaneAction.equals(contentAction))) { String keyString = getUIString((String) key, locale); if (!key.equals(keyString)) { rootPaneAction.putValue(Action.NAME, keyString); } } } } }
/** * PENDING: widen access - this could be public to make the content really * pluggable? * * @param content */ private void setContent(JComponent content) { if (this.content != null) { throw new IllegalStateException("content must not be set more than once"); } initActions(); Action contentCloseAction = content.getActionMap().get(CLOSE_ACTION_COMMAND); if (contentCloseAction != null) { putAction(CLOSE_ACTION_COMMAND, contentCloseAction); } Action contentExecuteAction = content.getActionMap().get(EXECUTE_ACTION_COMMAND); if (contentExecuteAction != null) { putAction(EXECUTE_ACTION_COMMAND, contentExecuteAction); } this.content = content; build(); setTitleFromContent(); }
/** * PENDING: widen access - this could be public to make the content really * pluggable? * * @param content */ private void setContent(JComponent content) { if (this.content != null) { throw new IllegalStateException("content must not be set more than once"); } initActions(); Action contentCloseAction = content.getActionMap().get(CLOSE_ACTION_COMMAND); if (contentCloseAction != null) { putAction(CLOSE_ACTION_COMMAND, contentCloseAction); } Action contentExecuteAction = content.getActionMap().get(EXECUTE_ACTION_COMMAND); if (contentExecuteAction != null) { putAction(EXECUTE_ACTION_COMMAND, contentExecuteAction); } this.content = content; build(); setTitleFromContent(); }
/** * PENDING: widen access - this could be public to make the content really * pluggable? * * @param content */ private void setContent(JComponent content) { if (this.content != null) { throw new IllegalStateException("content must not be set more than once"); } initActions(); Action contentCloseAction = content.getActionMap().get(CLOSE_ACTION_COMMAND); if (contentCloseAction != null) { putAction(CLOSE_ACTION_COMMAND, contentCloseAction); } Action contentExecuteAction = content.getActionMap().get(EXECUTE_ACTION_COMMAND); if (contentExecuteAction != null) { putAction(EXECUTE_ACTION_COMMAND, contentExecuteAction); } this.content = content; build(); setTitleFromContent(); }
/** * PENDING: widen access - this could be public to make the content really * pluggable? * * @param content */ private void setContent(JComponent content) { if (this.content != null) { throw new IllegalStateException("content must not be set more than once"); } initActions(); Action contentCloseAction = content.getActionMap().get(CLOSE_ACTION_COMMAND); if (contentCloseAction != null) { putAction(CLOSE_ACTION_COMMAND, contentCloseAction); } Action contentExecuteAction = content.getActionMap().get(EXECUTE_ACTION_COMMAND); if (contentExecuteAction != null) { putAction(EXECUTE_ACTION_COMMAND, contentExecuteAction); } this.content = content; build(); setTitleFromContent(); }
/** * PENDING: widen access - this could be public to make the content really * pluggable? * * @param content */ private void setContent(JComponent content) { if (this.content != null) { throw new IllegalStateException("content must not be set more than once"); } initActions(); Action contentCloseAction = content.getActionMap().get(CLOSE_ACTION_COMMAND); if (contentCloseAction != null) { putAction(CLOSE_ACTION_COMMAND, contentCloseAction); } Action contentExecuteAction = content.getActionMap().get(EXECUTE_ACTION_COMMAND); if (contentExecuteAction != null) { putAction(EXECUTE_ACTION_COMMAND, contentExecuteAction); } this.content = content; build(); setTitleFromContent(); }