Class TLcdMouseOverGroup

java.lang.Object
com.luciad.gui.swing.navigationcontrols.TLcdMouseOverGroup

public class TLcdMouseOverGroup extends Object
This class is responsible for enabling/disabling all components added to this group when either of them receives a MouseEntered/MouseExited event. It is used to make sure all subpanels of the navigation controls light up as one if the mouse moves over one of them. As a concept it is very similar to a ButtonGroup. As an extra feature you can configure this class to keep components always enabled. This can be dynamically chosen at runtime.
Since:
10.0
  • Constructor Details

    • TLcdMouseOverGroup

      public TLcdMouseOverGroup(boolean aAlwaysEnabled)
      The constructor for a TLcdMouseOverGroup. You can add components to this group, who will share a enabled/disabled state based on received MouseEvents. When one of the components receives a MouseEntered event all components will be enabled. When a Component receives a MouseExited Event all components will be disabled. When a component receives a MousePressed event, all components remain enabled, even if the mouse moves away until a MouseReleased event is received.
      Parameters:
      aAlwaysEnabled - a flag indicating whether or not elements of this group should ever be disabled. When true, components added to this group will be enabled by default, and will not be disabled based on received MouseEvents.
  • Method Details

    • add

      public void add(Component aComponent)
      This method adds a Component to this TLcdMouseOverGroup .
      Parameters:
      aComponent - The Component to be added.
    • remove

      public void remove(Component aComponent)
      This method removes a Component from this TLcdMouseOverGroup .
      Parameters:
      aComponent - The Component to be removed.
    • isAlwaysEnabled

      public boolean isAlwaysEnabled()
      Returns the value of the always enabled flag. If true elements in this group will always be enabled, independent from the position of the cursor.
      Returns:
      true is always enabled is enabled, false otherwise.
      See Also:
    • setAlwaysEnabled

      public void setAlwaysEnabled(boolean aAlwaysEnabled)
      This method sets the always enabled flag. Use this to dynamically toggle between always enabled and only enabled at mouse-over.
      Parameters:
      aAlwaysEnabled - sets the always enabled flag to the passed value.