Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.voytechs.example.desktop
Class LoginPanel  view LoginPanel download LoginPanel.java

java.lang.Object
  extended bycom.voytechs.html.component.Component
      extended bycom.voytechs.html.component.SimpleComponent
          extended bycom.voytechs.html.component.Container
              extended bycom.voytechs.html.component.Panel
                  extended bycom.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.


Field Summary
private  com.voytechs.html.component.Link loginButton
           
private  com.voytechs.html.component.LinkComponent profileButton
           
private  java.lang.String userName
           
 
Fields inherited from class com.voytechs.html.component.Container
 
Fields inherited from class com.voytechs.html.component.Component
COMPONENT_FLAG_DISPATCHABLE, COMPONENT_FLAG_FORM, COMPONENT_FLAG_INIT, COMPONENT_FLAG_SHOW, tagProperties
 
Constructor Summary
LoginPanel()
          Prebuild the static structure of the control panel.
 
Method Summary
 void addLoginElement(com.voytechs.html.component.SimpleComponent loginElement)
          Adds a simple textual/graphical element to the Login button.
 void addProfileElement(com.voytechs.html.component.LinkComponent profileElement)
          Adds a simple textual/graphical element to the Profile button.
static void main(java.lang.String[] args)
          Test function for LoginPanel
protected  void process()
          A method that allows a subclass to override and do special processing.
 
Methods inherited from class com.voytechs.html.component.Panel
addElement, addElement, addElement
 
Methods inherited from class com.voytechs.html.component.Container
addChild, init, paint, paintChildren, removeElement, toStringTree
 
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
 

Field Detail

loginButton

private com.voytechs.html.component.Link loginButton

profileButton

private com.voytechs.html.component.LinkComponent profileButton

userName

private java.lang.String userName
Constructor Detail

LoginPanel

public LoginPanel()
           throws com.voytechs.html.event.EventException
Prebuild the static structure of the control panel.

Method Detail

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