Class PowerManagerButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
LargePowerManagerButton, SmallPowerManagerButton

public abstract class PowerManagerButton extends JButton
A button handling layout power
This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See Also:
  • Constructor Details

  • Method Details

    • dispose

      public void dispose()
    • initComponents

      protected void initComponents()
      Initialize any components within the button or aspects of the button itself. The default implementation does nothing.
    • loadIcons

      abstract void loadIcons()
      Must be overridden to provide icons for power state indicators.
    • setPowerIcons

      protected void setPowerIcons()
    • getPowerUnknownIcon

      Returns:
      the icon that represents an unknown power state
    • setPowerUnknownIcon

      public void setPowerUnknownIcon(NamedIcon powerUnknownIcon)
      Parameters:
      powerUnknownIcon - the icon that represents an unknown power state
    • getPowerOffIcon

      Returns:
      the icon that represents a power off state
    • setPowerOffIcon

      public void setPowerOffIcon(NamedIcon powerOffIcon)
      Parameters:
      powerOffIcon - the icon that represents a power off state
    • getPowerOnIcon

      Returns:
      the icon that represents a power on state
    • setPowerOnIcon

      public void setPowerOnIcon(NamedIcon powerOnIcon)
      Parameters:
      powerOnIcon - the icon that represents a power on state
    • getPowerIdleIcon

      Returns:
      the icon that represents a power on state
    • setPowerIdleIcon

      public void setPowerIdleIcon(NamedIcon icon)
      Parameters:
      icon - the icon that represents a power Idle state.
    • setFullText

      protected void setFullText(boolean fullText)
      Parameters:
      fullText - true if text should be shown