Class LoginMethodPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
WAuthenticationUserPassLoginMethodPanel

public abstract class LoginMethodPanel extends JPanel
A basis for client-side login panels on the IrisSplashScreen.
See Also:
  • Field Details

    • okButton

      protected final JButton okButton
    • cancelled

      protected volatile boolean cancelled
    • isAuthenticated

      protected volatile boolean isAuthenticated
    • effectiveUserName

      protected String effectiveUserName
    • authorizedUserName

      protected String authorizedUserName
    • serverWait

      protected AsyncWaitForAuthServerOperation serverWait
    • isOpaque

      protected final boolean isOpaque
    • font

      protected final Font font
    • textColor

      protected final Color textColor
    • log

      protected final com.fishlib.io.logger.Logger log
  • Constructor Details

  • Method Details

    • dialogExit

      public void dialogExit(com.illumon.iris.console.utils.LoginMethodPanel.ExitType exitType)
      Exit the login panel, either with a login attempt or a cancellation.
      Parameters:
      exitType - Which type of close operation is being performed.
    • getAuthorizedUserName

      public String getAuthorizedUserName()
      After logging in, the actual user who logged in.
      Returns:
      The username that has been authorized to use the system.
    • getEffectiveUserName

      public String getEffectiveUserName()
      After logging in, the user that the current user is acting as
      Returns:
      The username that the authorized user is operating as.
    • getDefaultButton

      public JButton getDefaultButton()
      The default button for this panel. Implementing classes should set the defaultButton variable appropriately.
      Returns:
      Whichever button is appropriate as the default action for a given panel.
    • isAuthenticated

      public boolean isAuthenticated()
      Indicate whether authentication was successful.
      Returns:
      true if the authentication passed completely, false otherwise.
    • isCancelled

      public boolean isCancelled()
      Indicate whether the login attempt was cancelled.
      Returns:
      true if the current login panel's operation has been cancelled, false otherwise.
    • isValidLoginPanelType

      public static boolean isValidLoginPanelType()
      Indicate whether this login panel type is valid in the current environment. For example, if a Windows-specific login panel is being used, it would say it's not a valid type when run on a Mac. Hide this method for any class that might NOT be valid under some circumstances.
      Returns:
      Whether this panel type may be used in the current environment.
    • setExitMethod

      public void setExitMethod(DialogExitOperation exiter)
      Since we can't implement overrides dynamically via reflection (unless we want to do some compile-on-the-fly fun), we can take in a method reference as to what should happen when the dialogExit invocation happens, instead.
      Parameters:
      exiter - An interface containing the 'dialogExit' method to execute when the dialog exits.
    • getFriendlyName

      public static String getFriendlyName()
      Get the name to appear for this class in the login method selection dropdown. Since we want to show the name in the dropdown before actually instantiating the class, this must be static. Note that implementing classes must hide the base class, not override, because it's static.
      Returns:
      The text that should appear in the dropdown for selecting login method.
    • getOKAction

      protected abstract AbstractAction getOKAction()
      Get the action to be performed when the user tries the OK button.
      Returns:
      The action to be performed when the user tries the OK button.
    • canAutoLogin

      public boolean canAutoLogin()
      Indicate whether this panel type is allowed to autologin. A panel must override this to enable autologin.
      Returns:
      True if this panel can be used for autologin, false otherwise.