|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.yospace.yae.pm.Panelet
Panelet holds model information such as state and name, and also holds a reference to the
Panelet's view. By using getPaneletContext(), requests can be made to the Panelet
management system for state changes etc.
| Field Summary | |
static int |
STATE_COMPACT
The constant to define the compact state for a Panelet. |
static int |
STATE_MAXIMIZED
The constant to define the maximized state for a Panelet. |
static int |
STATE_MINIMIZED
The constant to define the minimized state for a Panelet. |
static int |
STATE_UNDEFINED
The constant to define the undefined state for a Panelet. |
| Constructor Summary | |
Panelet()
Sets the current and old states to be STATE_UNDEFINED. |
|
| Method Summary | |
void |
actionPerformed(YogiComponent source)
Listens for state change button presses such as when a Panelet display's minimize button is pressed. |
void |
destroy()
Empty template method for permanently freeing up resources when the Panelet management system decides to kill this Panelet. |
java.lang.String |
getName()
Accessor method for the Panelet's current name. |
int |
getOldState()
Accessor method for the Panelet's old state. |
PaneletContext |
getPaneletContext()
Accessor method for the Panelet's Context object. |
YogiPaneletDisplay |
getPaneletDisplay()
Accessor method for the Panelet Display. |
YogiPaneletDisplay |
getPaneletDisplay(int state)
Accessor method for the Panelet Display registered for the given state. |
java.lang.String |
getPaneletInfo()
Accessor method for the Panelet's info String. |
int |
getState()
Accessor method for the Panelet's current state. |
java.lang.String |
getStringResource(java.lang.String name)
Gets the string resource for the given name. |
static java.lang.String |
getStringResource(YogiComponent source,
java.lang.String resourceId)
Where a reference to the Panelet is not available, this method can be used. |
java.util.Hashtable |
getStringResources()
Gets the Hashtable of string resources associated with this Panelet. |
YogiComponent |
getTopLevelComponent(java.lang.String id)
Gets a top level component from the those generated by the UI builder. |
java.lang.String[] |
getTopLevelComponentIds()
Gets the ids of all of the top level components (which do not include YogiPaneletDisplays here). |
void |
init(java.lang.String name,
java.util.Hashtable topLevelObjects)
Initialises a Panelet. |
protected void |
modifyState(int newState)
Change the current state value for this Panelet. |
void |
notifyDestroyed()
Called by application code to signify to the Panelet Manager that this Panelet should be removed. |
void |
pause()
Empty template method for freeing up resources when the Panelet management system goes to sleep. |
void |
setName(java.lang.String name)
Setter method for the Panelet's name. |
static void |
setPaneletManager(PaneletManager pm,
YogiRootWindow key)
Initialises Panelets to all have the given Panelet manager. |
void |
setState(int newState)
Sets the current state of the Panelet. |
void |
setStringResources(java.util.Hashtable stringResources)
Sets the Hashtable of string resources associated with this Panelet. |
void |
start()
Empty template method, called after creation of a Panelet just as it is about to be displayed. |
java.lang.String |
toString()
Returns a String of the form " ["Panelet name" - "state]". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int STATE_UNDEFINED
public static final int STATE_MINIMIZED
public static final int STATE_COMPACT
public static final int STATE_MAXIMIZED
| Constructor Detail |
public Panelet()
| Method Detail |
public void init(java.lang.String name,
java.util.Hashtable topLevelObjects)
start is called.name - the name of the Panelet (the name that is used in the panelet config file).topLevelObjects - the top level components built from the Panelet XML.
public static void setPaneletManager(PaneletManager pm,
YogiRootWindow key)
YogiRootWindow) is non-null.pm - the PaneletManager to use.key - the YogiRootWindow key.public YogiPaneletDisplay getPaneletDisplay()
public YogiPaneletDisplay getPaneletDisplay(int state)
state - the Panelet state to get the Panelet Display for.public void setState(int newState)
newState - the state to change into, if allowed.protected void modifyState(int newState)
newState - the new state of the Panelet.public int getState()
public int getOldState()
STATE_UNDEFINED is used where there was no
previous state.public void setName(java.lang.String name)
name - the name to use.public java.lang.String getName()
public PaneletContext getPaneletContext()
java.lang.IllegalArgumentException - currently always thrown as this method has yet to be
implemented.
public void start()
throws java.lang.Exception
public void pause()
public void destroy()
public void notifyDestroyed()
IllegalStateException - if this Panelet has no Panelet Manager.public java.lang.String getPaneletInfo()
toString().public java.lang.String toString()
["Panelet name" - "state]".toString in class java.lang.Objectpublic YogiComponent getTopLevelComponent(java.lang.String id)
id - the id of the top level component to be fetched.public java.lang.String[] getTopLevelComponentIds()
public void setStringResources(java.util.Hashtable stringResources)
stringResources - the string resources Hashtable.public java.lang.String getStringResource(java.lang.String name)
name.name - the string resource id to get.
public static java.lang.String getStringResource(YogiComponent source,
java.lang.String resourceId)
source - the component associated with the relevant Panelet.resourceId - the resource String to fetch.public java.util.Hashtable getStringResources()
public void actionPerformed(YogiComponent source)
actionPerformed in interface ActionListenersource - the source button.
|
Copyright 2002 Yospace Holdings Ltd. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||