jview
Class JSwitcherStub

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by util.rmi.RmiPropertyContainer
                  extended by util.rmi.AbstractRmiListener
                      extended by jview.ApplicationJoiner
                          extended by jview.JSwitcherStub
All Implemented Interfaces:
Cloneable, Remote, EventListener, SubComponentListener, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiEventListener, RmiListener, RmiPropertyBearing

public class JSwitcherStub
extends ApplicationJoiner

This client works together with a JRemoteSwitcher server. It also supports application joining because it extends an ApplicationJoiner.

After init, the retrieved mapping of names to icons is used to display a vertical box of buttons. When a button is pressed, we switch to that remote instance.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  JPanel buttons
          The buttons for switching applications.
private static int DEFCOLUMNS
          Per default we have only one column.
static String KEY_COLUMNS
          The number of columns.
 
Fields inherited from class jview.ApplicationJoiner
KEY_APPLICATION, KEY_APPLICATIONHOSTS, KEY_COMPONENTCASTERS, KEY_COMPONENTHOSTS
 
Fields inherited from class util.rmi.AbstractRmiListener
KEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP, KEY_SHUTDOWNDELAY
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
JSwitcherStub(Map<String,String> prop)
          Constructs a new switcher stub.
 
Method Summary
 void init()
          After init, we construct a box of switches, that remotely cahnge the displayed component if pressed.
static void main(String[] arg)
          We construct this switcher stub by first trying to look up the argument as a host name and use the local host as the subcomponent caster host.
 
Methods inherited from class jview.ApplicationJoiner
deregisterAtCaster, getApplications, newKey, registerAtCaster, visible
 
Methods inherited from class util.rmi.AbstractRmiListener
allBound, blockBinding, blockBinding, disconnect, exit, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, rescanned, startBinding, startBinding
 
Methods inherited from class util.rmi.RmiPropertyContainer
containsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemoteProperty
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_COLUMNS

public static final String KEY_COLUMNS
The number of columns.

See Also:
Constant Field Values

DEFCOLUMNS

private static final int DEFCOLUMNS
Per default we have only one column.

See Also:
Constant Field Values

buttons

private JPanel buttons
The buttons for switching applications.

Constructor Detail

JSwitcherStub

public JSwitcherStub(Map<String,String> prop)
              throws RemoteException
Constructs a new switcher stub.

Throws:
RemoteException
Method Detail

init

public void init()
After init, we construct a box of switches, that remotely cahnge the displayed component if pressed.

Specified by:
init in interface Initializable
Overrides:
init in class ApplicationJoiner

main

public static void main(String[] arg)
                 throws RemoteException
We construct this switcher stub by first trying to look up the argument as a host name and use the local host as the subcomponent caster host. If this is not possible, we try to locate the properties file.

Throws:
RemoteException