Changeset 1298


Ignore:
Timestamp:
04/09/19 16:16:52 (5 years ago)
Author:
bln4
Message:

The currently logged in user is now displayed in the bottom right hand corner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/MessageBay.java

    r1291 r1298  
    2424import org.expeditee.Util;
    2525import org.expeditee.actions.Misc;
     26import org.expeditee.auth.AuthenticatorBrowser;
    2627import org.expeditee.core.Clip;
    2728import org.expeditee.core.Colour;
     
    6465        /** TODO: Comment. cts16 */
    6566        private static Text _status = null;
     67       
     68        private static Text _authorisedUser = null;
    6669
    6770        /** Buffer image of the message window. */
     
    195198                        FrameGraphics.PaintItem(getStatus());
    196199                }
     200               
     201                if (AuthenticatorBrowser.isAuthenticated() && _authorisedUser != null) {
     202                        FrameGraphics.PaintItem(_authorisedUser);
     203                }
    197204
    198205                if (clip == null || clip.isNotClipped() || _messageLink.isInDrawingArea(clip.getBounds())) {
     
    426433                        _status.setText(status);
    427434                }
     435               
     436                _authorisedUser = new Text("Logged in as: " + UserSettings.UserName.get().toUpperCase());
     437                _authorisedUser.setAnchorRight(10);
     438                _authorisedUser.setY(85);
     439                _authorisedUser.setFont(new Font(Text.MONOSPACED_FONT));
    428440
    429441                // invalidateFullBay();
Note: See TracChangeset for help on using the changeset viewer.