Class AppearanceControlLabel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
nl.tudelft.simulation.dsol.swing.gui.appearance.AppearanceControlLabel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, AppearanceControl

public class AppearanceControlLabel extends JLabel implements AppearanceControl
Label with appearance control.

Copyright (c) 2020-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.

Author:
Alexander Verbraeck
See Also:
  • Constructor Details

    • AppearanceControlLabel

      public AppearanceControlLabel()
      Generate an empty label with appearance control.
    • AppearanceControlLabel

      public AppearanceControlLabel(String text)
      Generate a label with appearance control with text.
      Parameters:
      text - String; the text of the label
  • Method Details

    • isForeground

      public boolean isForeground()
      Returns whether this item has a controllable foreground.
      Specified by:
      isForeground in interface AppearanceControl
      Returns:
      whether this item has a controllable foreground
    • isBackground

      public boolean isBackground()
      Returns whether this item has a controllable background.
      Specified by:
      isBackground in interface AppearanceControl
      Returns:
      whether this item has a controllable background
    • toString

      public String toString()
      Overrides:
      toString in class Component