java.lang.Object
com.voytechs.html.component.Component
com.voytechs.html.component.SimpleComponent
com.voytechs.html.component.Container
com.voytechs.html.component.Panel
com.voytechs.example.desktop.LoginPanel
- public class LoginPanel
- extends com.voytechs.html.component.Panel
A two state button. When no user is logged in the default
login button displayes 'Login' text. By clicking on the Login
element, a Login popup is displayed on the client. After a user has
logged in, this element automatically turns off the login button and
displays its second button, the profile button. This has the effect
of at first seeing a Login then a Profile button immediately after the
login. The displayed simple elements can be replaced by using the
addLoginElement() and addProfileElement() methods.
| Fields inherited from class com.voytechs.html.component.Container |
|
|
Constructor Summary |
LoginPanel()
Prebuild the static structure of the control panel. |
| Methods inherited from class com.voytechs.html.component.Component |
areFlagsSet, clearFlags, getParent, getRootFrame, getUriPath, setFlags, setParent, show, show, toStringPrefix, toStringPrefixCap, toStringPrefixTee |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
loginButton
private com.voytechs.html.component.Link loginButton
profileButton
private com.voytechs.html.component.LinkComponent profileButton
userName
private java.lang.String userName
LoginPanel
public LoginPanel()
throws com.voytechs.html.event.EventException
- Prebuild the static structure of the control panel.
process
protected void process()
- Description copied from class:
com.voytechs.html.component.Container
- A method that allows a subclass to override and do special processing.
Does nothing by default;
addLoginElement
public void addLoginElement(com.voytechs.html.component.SimpleComponent loginElement)
throws com.voytechs.html.event.EventException
- Adds a simple textual/graphical element to the Login button.
The element is displayed when no user is logged in. The show(false) is
called when a user login is detected at which time the profile element
is displayed.
addProfileElement
public void addProfileElement(com.voytechs.html.component.LinkComponent profileElement)
throws com.voytechs.html.event.EventException
- Adds a simple textual/graphical element to the Profile button.
The element is displayed when a user is logged in. Normally this button
is not displayed when no user is logged in.
main
public static void main(java.lang.String[] args)
- Test function for LoginPanel