Пример #1
0
  /**
   * Process the mouse click action on this menu item.
   *
   * @param evt The event that caused this method to be called
   */
  public void actionPerformed(ActionEvent evt) {
    entityWrapper.setChildrenShown(!entityWrapper.getChildrenShown());
    mapPanel.entityUpdateRequired();

    String prop_name = entityWrapper.getChildrenShown() ? HIDE_TITLE_PROP : SHOW_TITLE_PROP;

    I18nManager intl_mgr = I18nManager.getManager();
    putValue(NAME, intl_mgr.getString(prop_name));
  }
Пример #2
0
  /** Construct a new action that handles the given wrapper and talks to the map panel */
  ShowChildrenAction(EntityWrapper eWrapper, AbstractView.AbstractImagePanel map) {

    I18nManager intl_mgr = I18nManager.getManager();

    String prop_name = eWrapper.getChildrenShown() ? HIDE_TITLE_PROP : SHOW_TITLE_PROP;

    putValue(NAME, intl_mgr.getString(prop_name));

    mapPanel = map;
    entityWrapper = eWrapper;

    // Only enable this if there are children to show
    Entity entity = eWrapper.getEntity();
    setEnabled(entity.hasChildren());
  }