You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by sg...@apache.org on 2001/03/12 10:26:44 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls FullScreenControl.java TitleControl.java TitlePortletControl.java
sgala 01/03/12 01:26:44
Modified: src/java/org/apache/jetspeed/portal/controls
FullScreenControl.java TitleControl.java
TitlePortletControl.java
Log:
Having indentation according to standard while I try to understand code
Revision Changes Path
1.9 +164 -160 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/FullScreenControl.java
Index: FullScreenControl.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/FullScreenControl.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FullScreenControl.java 2001/03/07 06:46:05 1.8
+++ FullScreenControl.java 2001/03/12 09:26:42 1.9
@@ -1,3 +1,5 @@
+package org.apache.jetspeed.portal.controls;
+
/* ====================================================================
* The Apache Software License, Version 1.1
*
@@ -52,9 +54,7 @@
* <http://www.apache.org/>.
*/
-package org.apache.jetspeed.portal.controls;
-
//ECS stuff
import org.apache.ecs.html.*;
import org.apache.ecs.*;
@@ -83,187 +83,191 @@
*/
public class FullScreenControl extends PortletControl
{
- /* Path to the image representing the Info button */
- private static String INFO_IMAGE = "images/info.gif";
-
- /* Path to the image representing the Restore button */
- private static String RESTORE_IMAGE = "images/restore.gif";
+ /* Path to the image representing the Info button */
+ private static String INFO_IMAGE = "images/info.gif";
+ /* Path to the image representing the Restore button */
+ private static String RESTORE_IMAGE = "images/restore.gif";
-
- /**
- Method checks, which MimeTyp is requested. According to this MimeTyp, the
- appropriate method is invoked (getWMLContent() or getHTMLContent() ).
- @param rundata RunData object from Turbine.
- @return ConcreteElement object, including the complete ECS code for rendering
- the page.
- */
- public ConcreteElement getContent( RunData rundata ){
- CapabilityMap cm = CapabilityMapFactory.getCapabilityMap( rundata );
- if ( cm.getPreferredType().equals( MimeType.HTML ) ){
- return getHTMLContent( rundata );
- }
- else if ( cm.getPreferredType().equals( MimeType.WML ) ){
- return getWMLContent( rundata );
- }
- else {
- Log.error("The Given MIME-Type is not supportet for this control");
- return null;
- }
- }
- /**
- Method returns content for WML, in case that the requested MimeTyp is WML.
- @param rundata RunData object from Turbine.
- @return ConcreteElement object, including the complete ECS code for rendering
- the html page.
- */
- public ConcreteElement getWMLContent( RunData rundata ){
- return getPortlet().getContent( rundata );
+ /**
+ Method checks, which MimeTyp is requested. According to this MimeTyp, the
+ appropriate method is invoked (getWMLContent() or getHTMLContent() ).
+ @param rundata RunData object from Turbine.
+ @return ConcreteElement object, including the complete ECS code for rendering
+ the page.
+ */
+ public ConcreteElement getContent( RunData rundata ){
+ CapabilityMap cm = CapabilityMapFactory.getCapabilityMap( rundata );
+ if ( cm.getPreferredType().equals( MimeType.HTML ) ) {
+ return getHTMLContent( rundata );
}
-
- /**
- Method returns content for html, in case that the requested MimeTyp is html.
- @param rundata RunData object from Turbine.
- @return ConcreteElement object, including the complete ECS code for rendering
- the html page.
- */
- public ConcreteElement getHTMLContent( RunData rundata )
- {
-
- //embed this here
- ElementContainer base = new ElementContainer();
-
- //the overall portlet...
- Table t = new Table().setBgColor( this.getColor() )
- .setBorder(0)
- .setCellPadding(1)
- .setCellSpacing(0)
- .setWidth( getWidth() )
- .setAlign( "center" );
-
-
- ConcreteElement[] options = this.getPortletOptions( rundata );
-
- TR finalTitle = new TR().setBgColor( this.getTitleColor() )
- .addElement( new TD().setBgColor( this.getTitleColor() ).setNoWrap( true ).setWidth("100%").setVAlign("middle")
- .addElement( new B().addElement( getPortlet().getTitle() )
- .addElement(" ") ) );
-
- if ( options.length > 0 )
- {
-
- ElementContainer alloptions = new ElementContainer();
- for (int i = 0; i < options.length; ++i)
- {
- alloptions.addElement( options[i] );
- }
-
- finalTitle.addElement( new TD().setBgColor( this.getTitleColor() ).setNoWrap( true ).setAlign("right").setVAlign("middle")
- .addElement( alloptions ) );
-
- }
+ else if ( cm.getPreferredType().equals( MimeType.WML ) ) {
+ return getWMLContent( rundata );
+ }
+ else {
+ Log.error("The Given MIME-Type is not supportet for this control");
+ return null;
+ }
+ }
+
+ /**
+ Method returns content for WML, in case that the requested MimeTyp is WML.
+ @param rundata RunData object from Turbine.
+ @return ConcreteElement object, including the complete ECS code for rendering
+ the html page.
+ */
+ public ConcreteElement getWMLContent( RunData rundata ) {
+ return getPortlet().getContent( rundata );
+ }
+
+ /**
+ Method returns content for html, in case that the requested MimeTyp is html.
+ @param rundata RunData object from Turbine.
+ @return ConcreteElement object, including the complete ECS code for rendering
+ the html page.
+ */
+ public ConcreteElement getHTMLContent( RunData rundata ) {
+
+ //embed this here
+ ElementContainer base = new ElementContainer();
+ //the overall portlet...
+ Table t = new Table()
+ .setBgColor( this.getColor() )
+ .setBorder(0)
+ .setCellPadding(1)
+ .setCellSpacing(0)
+ .setWidth( getWidth() )
+ .setAlign( "center" );
+
+
+ ConcreteElement[] options = this.getPortletOptions( rundata );
+
+ TR finalTitle = new TR()
+ .setBgColor( this.getTitleColor() )
+ .addElement( new TD()
+ .setBgColor( this.getTitleColor() )
+ .setNoWrap( true )
+ .setWidth("100%")
+ .setVAlign("middle")
+ .addElement( new B()
+ .addElement( getPortlet().getTitle() )
+ .addElement(" ") ) );
+
+ if ( options.length > 0 ) {
+
+ ElementContainer alloptions = new ElementContainer();
+ for (int i = 0; i < options.length; ++i) {
+ alloptions.addElement( options[i] );
+ }
- t.addElement( finalTitle );
+ finalTitle.addElement( new TD()
+ .setBgColor( this.getTitleColor() )
+ .setNoWrap( true )
+ .setAlign("right")
+ .setVAlign("middle")
+ .addElement( alloptions ) );
- TR background = new TR().addElement(
- new TD().setWidth("100%")
- .setVAlign("top")
- .setColSpan( 2 )
- .setBgColor( this.getBackgroundColor() )
- .addElement( getPortlet().getContent( rundata ) ));
- t.addElement( background );
+ }
- base.addElement( t );
- return base;
- }
+ t.addElement( finalTitle );
- /**
- Method checks whether the requested MimeTyp is supported by this control.
- Moreover, it checks, if the included portlet fits the given MimeTyp as well.
- Thus, the method returns true, iff both the control and the portlet(set) support
- the requested MimeType. Otherwise false is returned.
- @param mimeType MimeType object describing the requested MimeTyp.
- @return Boolean true if MimeTyp is supported, false if not.
- */
- public boolean supportsType( MimeType mimeType ) {
- if ( (!MimeType.HTML.equals( mimeType )) && (!MimeType.WML.equals( mimeType )) ){
- return false;
- }
- // Call of the same method of control's portlet
- return getPortlet().supportsType( mimeType );
+ TR background = new TR().addElement( new TD()
+ .setWidth("100%")
+ .setVAlign("top")
+ .setColSpan( 2 )
+ .setBgColor( this.getBackgroundColor() )
+ .addElement( getPortlet().getContent( rundata ) ));
+ t.addElement( background );
+
+ base.addElement( t );
+
+ return base;
+
+ }
+
+ /**
+ Method checks whether the requested MimeTyp is supported by this control.
+ Moreover, it checks, if the included portlet fits the given MimeTyp as well.
+ Thus, the method returns true, iff both the control and the portlet(set) support
+ the requested MimeType. Otherwise false is returned.
+ @param mimeType MimeType object describing the requested MimeTyp.
+ @return Boolean true if MimeTyp is supported, false if not.
+ */
+ public boolean supportsType( MimeType mimeType ) {
+ if ( (!MimeType.HTML.equals( mimeType )) &&
+ (!MimeType.WML.equals( mimeType )) ) {
+ return false;
}
+ // Call of the same method of control's portlet
+ return getPortlet().supportsType( mimeType );
+ }
- /**
- Get the options for this portlet.
- */
- private ConcreteElement[] getPortletOptions( RunData rundata )
- {
-
- Vector v = new Vector();
-
- int type = URILookup.getURIType(this.getPortlet(), rundata);
- int subtype = URILookup.SUBTYPE_NONE;
- try
- {
- subtype = URILookup.getURISubType(this.getPortlet(), rundata);
- }
- catch (JetspeedException e)
- {
- Log.error(e.getMessage());
- }
-
- if (type != URILookup.TYPE_EDIT_ACCOUNT)
- {
- if ( ( rundata.getUser() != null ) &&
- ( rundata.getUser().hasLoggedIn()) )
- {
- if ( this.getPortlet().getAllowEdit( rundata ) )
- {
- if (type!=URILookup.TYPE_INFO)
- {
- try
- {
- A info = new A(
- URILookup.getURI( URILookup.TYPE_INFO, URILookup.SUBTYPE_MARK, this.getPortlet(), rundata )
- ).addElement( new IMG( INFO_IMAGE ).setBorder( 0 ) );
-
- v.addElement( info );
- }
- catch (JetspeedException e)
- {
- Log.error(e.getMessage());
- }
- }
- }
+ /**
+ Get the options for this portlet.
+ */
+ private ConcreteElement[] getPortletOptions( RunData rundata ) {
- }
+ Vector v = new Vector();
+
+ int type = URILookup.getURIType(this.getPortlet(), rundata);
+ int subtype = URILookup.SUBTYPE_NONE;
+ try {
+ subtype = URILookup.getURISubType(this.getPortlet(), rundata);
+ }
+ catch (JetspeedException e) {
+ Log.error(e.getMessage());
+ }
- try
- {
- String str = RESTORE_IMAGE;
- A max = new A(
- URILookup.getURI( URILookup.TYPE_HOME, URILookup.SUBTYPE_RESTORE, this.getPortlet(), rundata )
- ).addElement( new IMG( RESTORE_IMAGE ).setBorder( 0 ) );
+ if (type != URILookup.TYPE_EDIT_ACCOUNT) {
+ if ( ( rundata.getUser() != null ) &&
+ ( rundata.getUser().hasLoggedIn()) ) {
+ if ( this.getPortlet().getAllowEdit( rundata ) ) {
+ if (type!=URILookup.TYPE_INFO) {
+ try {
+ A info = new A(
+ URILookup.getURI( URILookup.TYPE_INFO,
+ URILookup.SUBTYPE_MARK,
+ this.getPortlet(),
+ rundata )
+ ).addElement( new IMG( INFO_IMAGE ).setBorder( 0 ) );
- v.addElement( max );
+ v.addElement( info );
}
- catch (JetspeedException e)
- {
- Log.error(e.getMessage());
+ catch (JetspeedException e) {
+ Log.error(e.getMessage());
}
-
+ }
}
+
+ }
+
+ try {
+ String str = RESTORE_IMAGE;
+ A max = new A(
+ URILookup.getURI( URILookup.TYPE_HOME,
+ URILookup.SUBTYPE_RESTORE,
+ this.getPortlet(),
+ rundata )
+ ).addElement( new IMG( RESTORE_IMAGE ).setBorder( 0 ) );
- ConcreteElement[] elements = new ConcreteElement[v.size()];
- v.copyInto(elements);
- return elements;
+ v.addElement( max );
+ }
+ catch (JetspeedException e) {
+ Log.error(e.getMessage());
+ }
+
}
+
+ ConcreteElement[] elements = new ConcreteElement[v.size()];
+ v.copyInto(elements);
+ return elements;
+ }
}
1.8 +184 -167 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/TitleControl.java
Index: TitleControl.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/TitleControl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TitleControl.java 2001/03/07 06:46:08 1.7
+++ TitleControl.java 2001/03/12 09:26:42 1.8
@@ -1,3 +1,5 @@
+package org.apache.jetspeed.portal.controls;
+
/* ====================================================================
* The Apache Software License, Version 1.1
*
@@ -52,8 +54,6 @@
* <http://www.apache.org/>.
*/
-package org.apache.jetspeed.portal.controls;
-
//ECS stuff
import org.apache.ecs.html.*;
@@ -81,191 +81,208 @@
</p>
@author <a href="mailto:sasalda@de.ibm.com">Sascha Alda</a>
@author <a href="mailto:stephan.hesmer@de.ibm.com">Stephan Hesmer</a>
+ @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
+ @version $Id: TitleControl.java,v 1.8 2001/03/12 09:26:42 sgala Exp $
*/
public class TitleControl extends PortletControl {
- /**
- Method checks, which MimeTyp is requested. According to this MimeTyp, the
- appropriate method is invoked (getWMLContent() or getHTMLContent() ).
- @param rundata RunData object from Turbine.
- @return ConcreteElement object, including the complete ECS code for rendering
- the page.
- */
- public ConcreteElement getContent( RunData rundata ){
- CapabilityMap cm = CapabilityMapFactory.getCapabilityMap( rundata );
- if ( cm.getPreferredType().equals( MimeType.HTML ) ){
- return getHTMLContent( rundata );
- }
- else if ( cm.getPreferredType().equals( MimeType.WML ) ){
- return getWMLContent( rundata );
- }
- else {
- Log.error("The Given MIME-Type is not supportet for this control");
- return null;
- }
-
- }
-
- /**
- Method returns content for html, in case that the requested MimeTyp is html.
- @param rundata RunData object from Turbine.
- @return ConcreteElement object, including the complete ECS code for rendering
- the html page.
- */
- public ConcreteElement getHTMLContent( RunData rundata ){
- //embed this here
- ElementContainer base = new ElementContainer();
-
- //the overall portlet...
- Table t = new Table().setBgColor( this.getColor() )
- .setBorder(0)
- .setCellPadding(1)
- .setCellSpacing(0)
- .setWidth( getWidth() )
- .setAlign( "center" );
-
-
- ConcreteElement[] options = this.getPortletOptions( rundata );
-
- TR finalTitle = new TR().setBgColor( this.getTitleColor() )
- .addElement( new TD().setBgColor( this.getTitleColor() ).setNoWrap( true ).setWidth("100%").setVAlign("middle")
- .addElement( new B().addElement( getPortlet().getTitle() )
- .addElement(" ") ) );
-
- if ( options.length > 0 )
- {
-
- ElementContainer alloptions = new ElementContainer();
- for (int i = 0; i < options.length; ++i)
- {
- alloptions.addElement( options[i] );
- }
-
- finalTitle.addElement( new TD().setBgColor( this.getTitleColor() ).setNoWrap( true ).setAlign("right").setVAlign("middle")
- .addElement( alloptions ) );
+ /**
+ Method checks, which MimeTyp is requested. According to this MimeTyp, the
+ appropriate method is invoked (getWMLContent() or getHTMLContent() ).
+ @param rundata RunData object from Turbine.
+ @return ConcreteElement object, including the complete ECS code for rendering
+ the page.
+ */
+ public ConcreteElement getContent( RunData rundata ) {
+ CapabilityMap cm = CapabilityMapFactory.getCapabilityMap( rundata );
+ if ( cm.getPreferredType().equals( MimeType.HTML ) ) {
+ return getHTMLContent( rundata );
+ }
+ if ( cm.getPreferredType().equals( MimeType.WML ) ) {
+ return getWMLContent( rundata );
+ }
+ Log.error("The Given MIME-Type is not supportet for this control");
+ return null;
+ }
+
+
+ /**
+ Method returns content for html, in case that the requested MimeTyp is html.
+ @param rundata RunData object from Turbine.
+ @return ConcreteElement object, including the complete ECS code for rendering
+ the html page.
+ */
+ public ConcreteElement getHTMLContent( RunData rundata ) {
+ //embed this here
+ ElementContainer base = new ElementContainer();
+
+ //the overall portlet...
+ Table t = new Table()
+ .setBgColor( this.getColor() )
+ .setBorder(0)
+ .setCellPadding(1)
+ .setCellSpacing(0)
+ .setWidth( getWidth() )
+ .setAlign( "center" );
+
+
+ ConcreteElement[] options = this.getPortletOptions( rundata );
+
+ TR finalTitle = new TR()
+ .setBgColor( this.getTitleColor() )
+ .addElement( new TD()
+ .setBgColor( this.getTitleColor() )
+ .setNoWrap( true )
+ .setWidth("100%")
+ .setVAlign("middle")
+ .addElement( new B()
+ .addElement( getPortlet().getTitle() )
+ .addElement(" ") ) );
+
+ if ( options.length > 0 ) {
+
+ ElementContainer alloptions = new ElementContainer();
+ for (int i = 0; i < options.length; ++i) {
+ alloptions.addElement( options[i] );
+ }
+
+ finalTitle.addElement( new TD()
+ .setBgColor( this.getTitleColor() )
+ .setNoWrap( true )
+ .setAlign("right")
+ .setVAlign("middle")
+ .addElement( alloptions ) );
- }
+ }
- t.addElement( finalTitle );
+ t.addElement( finalTitle );
- base.addElement( t );
+ base.addElement( t );
- return base;
- }
+ return base;
+ }
- /**
- Method returns content for WML, in case that the requested MimeTyp is WML.
- @param rundata RunData object from Turbine.
- @return ConcreteElement object, including the complete ECS code for rendering
- the html page.
- */
- public ConcreteElement getWMLContent( RunData rundata ) {
- ElementContainer ec = new ElementContainer();
- try {
- ec.addElement(
- new org.apache.ecs.wml.P().addElement(
- new org.apache.ecs.wml.A(
- URILookup.getURI( URILookup.TYPE_HOME, URILookup.SUBTYPE_MAXIMIZE, getName(), rundata ) )
+ /**
+ Method returns content for WML, in case that the requested MimeTyp is WML.
+ @param rundata RunData object from Turbine.
+ @return ConcreteElement object, including the complete ECS code for rendering
+ the html page.
+ */
+ public ConcreteElement getWMLContent( RunData rundata ) {
+ ElementContainer ec = new ElementContainer();
+ try {
+ ec.addElement(new org.apache.ecs.wml.P()
+ .addElement(
+ new org.apache.ecs.wml.A(
+ URILookup.getURI( URILookup.TYPE_HOME,
+ URILookup.SUBTYPE_MAXIMIZE,
+ getName(),
+ rundata ) )
.addElement( getTitle() ) ) );
- }
- catch (JetspeedException e) {
- Log.error(e.getMessage());
- }
- return ec;
- }
+ }
+ catch (JetspeedException e) {
+ Log.error(e.getMessage());
+ }
+ return ec;
+ }
- /**
- Method returns the title of the portlet, which is placed within this control.
- @return String object, representing the portlet's title.
- */
- public String getTitle(){
- return getPortlet().getTitle();
- }
-
- /**
- Method checks whether the requested MimeTyp is supported by this control.
- Moreover, it checks, if the included portlet fits the given MimeTyp as well.
- Thus, the method returns true, iff both the control and the portlet(set) support
- the requested MimeType. Otherwise false is returned.
- @param mimeType MimeType object describing the requested MimeTyp.
- @return Boolean true if MimeTyp is supported, false if not.
- */
- public boolean supportsType( MimeType mimeType ) {
- if ( (!MimeType.HTML.equals( mimeType )) && (!MimeType.WML.equals( mimeType )) ){
- return false;
- }
- // Call of the same method of control's portlet
- return getPortlet().supportsType( mimeType );
- }
-
- /**
- Get the options for this portlet.
- */
- private ConcreteElement[] getPortletOptions( RunData rundata ){
-
- Vector v = new Vector();
- ContentURI content = new ContentURI( rundata );
-
- int type = URILookup.getURIType(this.getPortlet(), rundata);
- int subtype = URILookup.SUBTYPE_NONE;
- try {
- subtype = URILookup.getURISubType(this.getPortlet(), rundata);
- }
- catch (JetspeedException e) {
- Log.error(e.getMessage());
- }
+ /**
+ Method returns the title of the portlet, which is placed within this control.
+ @return String object, representing the portlet's title.
+ */
+ public String getTitle(){
+ return getPortlet().getTitle();
+ }
+
+ /**
+ Method checks whether the requested MimeTyp is supported by this control.
+ Moreover, it checks, if the included portlet fits the given MimeTyp as well.
+ Thus, the method returns true, iff both the control and the portlet(set) support
+ the requested MimeType. Otherwise false is returned.
+ @param mimeType MimeType object describing the requested MimeTyp.
+ @return Boolean true if MimeTyp is supported, false if not.
+ */
+ public boolean supportsType( MimeType mimeType ) {
+ if ( (!MimeType.HTML.equals( mimeType )) &&
+ (!MimeType.WML.equals( mimeType )) ){
+ return false;
+ }
+ // Call of the same method of control's portlet
+ return getPortlet().supportsType( mimeType );
+ }
+
+ /**
+ Get the options for this portlet.
+ */
+ private ConcreteElement[] getPortletOptions( RunData rundata ) {
+
+ Vector v = new Vector();
+ ContentURI content = new ContentURI( rundata );
+
+ int type = URILookup.getURIType(this.getPortlet(),
+ rundata);
+ int subtype = URILookup.SUBTYPE_NONE;
+ try {
+ subtype = URILookup.getURISubType(this.getPortlet(),
+ rundata);
+ }
+ catch (JetspeedException e) {
+ Log.error(e.getMessage());
+ }
- if ( type != URILookup.TYPE_EDIT_ACCOUNT)
- {
- if ( ( rundata.getUser() != null ) &&
- ( rundata.getUser().hasLoggedIn()) )
- {
- if ( this.getPortlet().getAllowEdit( rundata ) )
- {
- if (type!=URILookup.TYPE_INFO)
- {
- try {
- org.apache.ecs.html.A edit =
- new org.apache.ecs.html.A(
- URILookup.getURI( URILookup.TYPE_INFO, URILookup.SUBTYPE_MARK, this.getPortlet(), rundata ) )
- .addElement( new IMG( content.getURI( JetspeedResources.INFO_IMAGE ) ).setBorder( 0 ) );
-
- v.addElement( edit );
- }
- catch (JetspeedException e) {
- Log.error(e.getMessage());
- }
- }
- }
+ if ( type != URILookup.TYPE_EDIT_ACCOUNT) {
+ if ( ( rundata.getUser() != null ) &&
+ ( rundata.getUser().hasLoggedIn()) ) {
+ if ( this.getPortlet().getAllowEdit( rundata ) ) {
+ if (type!=URILookup.TYPE_INFO) {
+ try {
+ org.apache.ecs.html.A edit =
+ new org.apache.ecs.html.A(
+ URILookup.getURI( URILookup.TYPE_INFO,
+ URILookup.SUBTYPE_MARK,
+ this.getPortlet(),
+ rundata ) )
+ .addElement( new IMG( content.getURI( JetspeedResources.INFO_IMAGE ) )
+ .setBorder( 0 ) );
+ v.addElement( edit );
}
-
- if ( this.getPortlet().getAllowMaximize( rundata ) )
- {
- try {
- if ( subtype != URILookup.SUBTYPE_MAXIMIZE )
- {
- org.apache.ecs.html.A max =
- new org.apache.ecs.html.A(
- URILookup.getURI( URILookup.TYPE_HOME, URILookup.SUBTYPE_MAXIMIZE, this.getPortlet(), rundata ) )
- .addElement( new IMG( content.getURI( JetspeedResources.MAX_IMAGE ) ).setBorder( 0 ) );
-
- v.addElement( max );
- }
- }
- catch (JetspeedException e) {
- Log.error(e.getMessage());
- }
+ catch (JetspeedException e) {
+ Log.error(e.getMessage());
}
+ }
}
+
+ }
+
+ if ( this.getPortlet().getAllowMaximize( rundata ) ) {
+ try {
+ if ( subtype != URILookup.SUBTYPE_MAXIMIZE ) {
+ org.apache.ecs.html.A max =
+ new org.apache.ecs.html.A(
+ URILookup.getURI( URILookup.TYPE_HOME,
+ URILookup.SUBTYPE_MAXIMIZE,
+ this.getPortlet(),
+ rundata ) )
+ .addElement( new IMG( content.getURI( JetspeedResources.MAX_IMAGE ) )
+ .setBorder( 0 ) );
- ConcreteElement[] elements = new ConcreteElement[v.size()];
- v.copyInto(elements);
- return elements;
+ v.addElement( max );
+ }
+ }
+ catch (JetspeedException e) {
+ Log.error(e.getMessage());
+ }
+ }
}
+
+ ConcreteElement[] elements = new ConcreteElement[v.size()];
+ v.copyInto(elements);
+ return elements;
+ }
1.15 +11 -4 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/TitlePortletControl.java
Index: TitlePortletControl.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/TitlePortletControl.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- TitlePortletControl.java 2001/03/07 06:46:09 1.14
+++ TitlePortletControl.java 2001/03/12 09:26:43 1.15
@@ -80,7 +80,7 @@
@author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
@author <a href="mailto:raphael@apache.org">Rapha�l Luta</a>
-@version $Id: TitlePortletControl.java,v 1.14 2001/03/07 06:46:09 taylor Exp $
+@version $Id: TitlePortletControl.java,v 1.15 2001/03/12 09:26:43 sgala Exp $
*/
public class TitlePortletControl extends PortletControl {
@@ -162,8 +162,12 @@
try
{
- A info = new A( URILookup.getURI( URILookup.TYPE_INFO, URILookup.SUBTYPE_MARK, this.getPortlet(), rundata ) )
- .addElement( new IMG( content.getURI( JetspeedResources.INFO_IMAGE ) ).setBorder( 0 ) );
+ A info = new A( URILookup.getURI( URILookup.TYPE_INFO,
+ URILookup.SUBTYPE_MARK,
+ this.getPortlet(),
+ rundata ) )
+ .addElement( new IMG( content.getURI( JetspeedResources.INFO_IMAGE ) )
+ .setBorder( 0 ) );
v.addElement( info );
}
catch (JetspeedException e)
@@ -178,7 +182,10 @@
try
{
- A max = new A( URILookup.getURI( URILookup.TYPE_HOME, URILookup.SUBTYPE_MAXIMIZE, this.getPortlet(), rundata ) )
+ A max = new A( URILookup.getURI( URILookup.TYPE_HOME,
+ URILookup.SUBTYPE_MAXIMIZE,
+ this.getPortlet(),
+ rundata ) )
.addElement( new IMG( content.getURI( JetspeedResources.MAX_IMAGE ) ).setBorder( 0 ) );
v.addElement( max );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org