001package jmri.jmrit.throttle.buttons;
002
003import javax.annotation.CheckForNull;
004
005import jmri.PowerManager;
006import jmri.jmrit.catalog.NamedIcon;
007
008/**
009 * 
010 * A Large button handling layout power
011 * 
012 * <hr>
013 * This file is part of JMRI.
014 * <p>
015 * JMRI is free software; you can redistribute it and/or modify it under the
016 * terms of version 2 of the GNU General Public License as published by the Free
017 * Software Foundation. See the "COPYING" file for a copy of this license.
018 * <p>
019 * JMRI is distributed in the hope that it will be useful, but WITHOUT ANY
020 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
021 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
022 *
023 */
024
025public class LargePowerManagerButton extends PowerManagerButton {
026
027    /**
028     * Create a Large Power Manager Button for a given Power Manager.
029     * @param fullText true if displaying text and graphic, false for graphic only.
030     * @param powerMgr The PowerManager to monitor and control.
031     */
032    public LargePowerManagerButton(boolean fullText, @CheckForNull PowerManager powerMgr) {
033        super(fullText, powerMgr);
034    }
035
036    /**
037     * Create a Large Power Manager Button for the default Power Manager.
038     * @param fullText true if displaying text and graphic, false for graphic only.
039     */
040    public LargePowerManagerButton(Boolean fullText) {
041        super(fullText);
042    }
043
044    /**
045     * Create a Large Power Manager Button for the default Power Manager,
046     * displaying text and graphic.
047     */
048    public LargePowerManagerButton() {
049        super();
050    }
051
052    @Override
053    protected void loadIcons() {
054        setPowerOnIcon(new NamedIcon("resources/icons/throttles/power_green.png", "resources/icons/throttles/power_green.png"));
055        setPowerOffIcon(new NamedIcon("resources/icons/throttles/power_red.png", "resources/icons/throttles/power_red.png"));
056        setPowerIdleIcon(new NamedIcon("resources/icons/throttles/power_yellow.png", "resources/icons/throttles/power_yellow.png"));
057        setPowerUnknownIcon(new NamedIcon("resources/icons/throttles/power_yellow.png", "resources/icons/throttles/power_yellow.png"));
058    }
059
060}