X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fmxchange%2Faddressbook%2Fmenu%2FBaseMenu.java;h=d39e1be37e55e78f9711c2ddff67ca2ed7b4532b;hb=528eeece943480f5a89d0067cfb6e4cb86f528b5;hp=cf5b916ff17bc502bb76710ada4d1fb2afdee318;hpb=d320d13f3f26ab01c36a7d6857918b141977454a;p=addressbook-swing.git diff --git a/src/org/mxchange/addressbook/menu/BaseMenu.java b/src/org/mxchange/addressbook/menu/BaseMenu.java index cf5b916..d39e1be 100644 --- a/src/org/mxchange/addressbook/menu/BaseMenu.java +++ b/src/org/mxchange/addressbook/menu/BaseMenu.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Roland Haeder + * Copyright (C) 2016 - 2020 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ package org.mxchange.addressbook.menu; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.List; import org.mxchange.addressbook.BaseAddressbookSystem; @@ -27,7 +28,7 @@ import org.mxchange.jcore.client.Client; /** * A general menu class *

- * @author Roland Haeder + * @author Roland Häder */ public abstract class BaseMenu extends BaseAddressbookSystem implements Menu { @@ -55,7 +56,7 @@ public abstract class BaseMenu extends BaseAddressbookSystem implements Menu { @Override public void show (final Client client) { // Trace message - this.getLogger().logTrace(MessageFormat.format("client={0} CALLED!", client)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("client={0} CALLED!", client)); //NOI18N // Client must not be null if (null == client) { @@ -67,7 +68,7 @@ public abstract class BaseMenu extends BaseAddressbookSystem implements Menu { Iterator iterator = this.menuList.iterator(); // Debug message - this.getLogger().logDebug("Showing menu with '" + this.menuList.size() + "' entries."); + this.getLoggerBeanLocal().logDebug("Showing menu with '" + this.menuList.size() + "' entries."); // Output all menus while (iterator.hasNext()) { @@ -79,7 +80,7 @@ public abstract class BaseMenu extends BaseAddressbookSystem implements Menu { } // Trace message - this.getLogger().logTrace("EXIT!"); //NOI18N + this.getLoggerBeanLocal().logTrace("EXIT!"); //NOI18N } /** @@ -87,8 +88,8 @@ public abstract class BaseMenu extends BaseAddressbookSystem implements Menu { *

* @return menuList List of menu entries */ - protected final List getMenuList () { - return this.menuList; + protected List getMenuList () { + return Collections.unmodifiableList(this.menuList); } /** @@ -99,12 +100,12 @@ public abstract class BaseMenu extends BaseAddressbookSystem implements Menu { */ protected void initMenu (final String menuType, final Client client) { // Trace message - this.getLogger().logTrace(MessageFormat.format("menuType={0},client={1} - CALLED!", menuType, client)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("menuType={0},client={1} - CALLED!", menuType, client)); //NOI18N // Init menu list this.menuList = new ArrayList<>(5); // Trace message - this.getLogger().logTrace("EXIT!"); //NOI18N + this.getLoggerBeanLocal().logTrace("EXIT!"); //NOI18N } }