added profile "inline" menus as a way of extending the user profile display
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
* Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
@@ -164,6 +164,8 @@ class DialogImpl implements Dialog
|
||||
private String m_error_message = null;
|
||||
private Map m_default_render_params;
|
||||
private HashMap m_render_params;
|
||||
private Object m_upper_content = null;
|
||||
private Object m_lower_content = null;
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Constructors
|
||||
@@ -384,6 +386,10 @@ class DialogImpl implements Dialog
|
||||
// Get the content header and render it.
|
||||
control.renderSubObject(m_plaf.getContentHeader(m_title,m_subtitle));
|
||||
|
||||
// Render the "upper content" object, if any.
|
||||
if (m_upper_content!=null)
|
||||
control.renderSubObject(m_upper_content);
|
||||
|
||||
// Write the error message.
|
||||
if (m_error_message!=null)
|
||||
wr.write("<p align=\"center\" class=\"content\" style=\"color: red; font-weight: bold;\">\n"
|
||||
@@ -453,6 +459,10 @@ class DialogImpl implements Dialog
|
||||
|
||||
wr.write("</div></form>\n");
|
||||
|
||||
// Render the "lower content" object, if any.
|
||||
if (m_lower_content!=null)
|
||||
control.renderSubObject(m_lower_content);
|
||||
|
||||
} // end render
|
||||
|
||||
public void reset()
|
||||
@@ -640,4 +650,16 @@ class DialogImpl implements Dialog
|
||||
|
||||
} // end setRenderParam
|
||||
|
||||
public synchronized void setUpperContentObject(Object o)
|
||||
{
|
||||
m_upper_content = o;
|
||||
|
||||
} // end setUpperContentObject
|
||||
|
||||
public synchronized void setLowerContentObject(Object o)
|
||||
{
|
||||
m_lower_content = o;
|
||||
|
||||
} // end setLowerContentObject
|
||||
|
||||
} // end class DialogImpl
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.silverwrist.dynamo.iface.*;
|
||||
import com.silverwrist.dynamo.util.*;
|
||||
|
||||
public class DialogManager
|
||||
implements NamedObject, ComponentInitialize, ComponentShutdown, DialogFactoryConfig, DialogLoader
|
||||
implements NamedObject, ComponentInitialize, ComponentShutdown, DialogFactoryConfig, DialogLoader, TextRenderer
|
||||
{
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Internal class implementing the dialog item factory
|
||||
@@ -83,6 +83,7 @@ public class DialogManager
|
||||
private Hashtable m_factory_data = new Hashtable();
|
||||
private ComponentShutdown m_shut_init;
|
||||
private ComponentShutdown m_shut_runtime;
|
||||
private ComponentShutdown m_shut_render;
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Constructor
|
||||
@@ -190,6 +191,10 @@ public class DialogManager
|
||||
ssp = new SingletonServiceProvider("DialogManager",DialogLoader.class,(DialogLoader)this);
|
||||
m_shut_runtime = hooker.hookRuntimeServiceProvider(ssp);
|
||||
|
||||
// Register this object as a renderer for dialogs.
|
||||
RendererRegistration rr = (RendererRegistration)(services.queryService(RendererRegistration.class));
|
||||
m_shut_render = rr.registerRenderer(Dialog.class,this);
|
||||
|
||||
} // end initialize
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
@@ -199,6 +204,8 @@ public class DialogManager
|
||||
|
||||
public void shutdown()
|
||||
{
|
||||
m_shut_render.shutdown();
|
||||
m_shut_render = null;
|
||||
m_shut_runtime.shutdown();
|
||||
m_shut_runtime = null;
|
||||
m_shut_init.shutdown();
|
||||
@@ -297,4 +304,15 @@ public class DialogManager
|
||||
|
||||
} // end loadDialogResource
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Implementations from interface TextRenderer
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public void render(Object obj, TextRenderControl control) throws IOException, RenderingException
|
||||
{
|
||||
((Dialog)obj).render(control);
|
||||
|
||||
} // end render
|
||||
|
||||
} // end class DialogManager
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
* Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
@@ -61,4 +61,8 @@ public interface Dialog extends Cloneable, NamedObject
|
||||
|
||||
public void setRenderParam(String name, String value);
|
||||
|
||||
public void setUpperContentObject(Object o);
|
||||
|
||||
public void setLowerContentObject(Object o);
|
||||
|
||||
} // end interface Dialog
|
||||
|
||||
@@ -77,6 +77,12 @@ public class LibraryCast
|
||||
|
||||
} // end booleanObject
|
||||
|
||||
public final int[] newIntArray(int size)
|
||||
{
|
||||
return new int[size];
|
||||
|
||||
} // end newIntArray
|
||||
|
||||
public final ChainParameterInput queryChainParameterInput(Object obj)
|
||||
{
|
||||
return (ChainParameterInput)query(obj,ChainParameterInput.class);
|
||||
|
||||
Reference in New Issue
Block a user