org.gcube.portlets.user.reportgenerator.client.model
Class TemplateComponent

java.lang.Object
  extended by org.gcube.portlets.user.reportgenerator.client.model.TemplateComponent

public class TemplateComponent
extends Object

This class represent all the possible template components IN THE MODEL

Author:
Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it

Field Summary
static String DEFAULT_IMAGE_NAME
           
static String DEFAULT_IMAGE_PATH
           
 
Constructor Summary
TemplateComponent()
          Creates a empty TemplateComponent
TemplateComponent(TemplateModel myModel, org.gcube.portlets.d4sreporting.common.shared.BasicComponent sc, Presenter presenter, boolean showClose, TextTableImage owner)
          create a template component which is displayable (create an actual Widget in the content field)
TemplateComponent(TemplateModel myModel, int x, int y, int width, int height, int templatePage, org.gcube.portlets.d4sreporting.common.shared.ComponentType type, String paramName, com.google.gwt.user.client.ui.Widget content)
          Creates a TemplateComponent with the given charactheristics and single column
TemplateComponent(TemplateModel myModel, int x, int y, int width, int height, int templatePage, org.gcube.portlets.d4sreporting.common.shared.ComponentType type, String paramName, com.google.gwt.user.client.ui.Widget content, boolean doubleColLayout)
          Creates a TemplateComponent with the given charactheristics in double column
 
Method Summary
 void addMetadata(String attr, String value)
           
 List<org.gcube.portlets.d4sreporting.common.shared.Metadata> getAllMetadata()
           
 com.google.gwt.user.client.ui.Widget getContent()
           
 int getHeight()
           
 String getIdInBasket()
           
 String getParamName()
           
 org.gcube.portlets.d4sreporting.common.shared.BasicComponent getSerializable()
          return a template Component which is serializable
 int getTemplatePage()
           
 org.gcube.portlets.d4sreporting.common.shared.ComponentType getType()
           
 String getUserComments()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 boolean isDoubleColLayout()
           
 boolean isLocked()
           
 void setContent(com.google.gwt.user.client.ui.Widget content)
           
 void setHeight(int height)
           
 void setIdInBasket(String idInBasket)
           
 void setLocked(boolean locked)
           
 void setParamName(String paramName)
           
 void setTemplatePage(int templatePage)
           
 void setType(org.gcube.portlets.d4sreporting.common.shared.ComponentType type)
           
 void setWidth(int width)
           
 void setX(int x)
           
 void setY(int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IMAGE_NAME

public static final String DEFAULT_IMAGE_NAME
See Also:
Constant Field Values

DEFAULT_IMAGE_PATH

public static final String DEFAULT_IMAGE_PATH
Constructor Detail

TemplateComponent

public TemplateComponent()
Creates a empty TemplateComponent


TemplateComponent

public TemplateComponent(TemplateModel myModel,
                         int x,
                         int y,
                         int width,
                         int height,
                         int templatePage,
                         org.gcube.portlets.d4sreporting.common.shared.ComponentType type,
                         String paramName,
                         com.google.gwt.user.client.ui.Widget content,
                         boolean doubleColLayout)
Creates a TemplateComponent with the given charactheristics in double column

Parameters:
myModel - .
x - .
y - .
width - .
height - .
templatePage - .
content - the inserted widget
type - the type of the inserted widget
paramName - for assigning it a value when exporting to pdf, valid only for Dynamic Content
doubleColLayout - to specify that its layout is double columned

TemplateComponent

public TemplateComponent(TemplateModel myModel,
                         int x,
                         int y,
                         int width,
                         int height,
                         int templatePage,
                         org.gcube.portlets.d4sreporting.common.shared.ComponentType type,
                         String paramName,
                         com.google.gwt.user.client.ui.Widget content)
Creates a TemplateComponent with the given charactheristics and single column

Parameters:
myModel - .
x - .
y - .
width - .
height - .
templatePage - .
content - the inserted widget
type - the type of the inserted widget
paramName - for assigning it a value when exporting to pdf, valid only for Dynamic Content

TemplateComponent

public TemplateComponent(TemplateModel myModel,
                         org.gcube.portlets.d4sreporting.common.shared.BasicComponent sc,
                         Presenter presenter,
                         boolean showClose,
                         TextTableImage owner)
create a template component which is displayable (create an actual Widget in the content field)

Parameters:
myModel - the model
sc - the serialiazble to convert
presenter - .
showClose -
owner - needed only for the TextTableImage case and because im in hurry
Method Detail

getSerializable

public org.gcube.portlets.d4sreporting.common.shared.BasicComponent getSerializable()
return a template Component which is serializable

Returns:
.

getHeight

public int getHeight()
Returns:
.

setHeight

public void setHeight(int height)
Parameters:
height - .

getType

public org.gcube.portlets.d4sreporting.common.shared.ComponentType getType()
Returns:
.

setType

public void setType(org.gcube.portlets.d4sreporting.common.shared.ComponentType type)
Parameters:
type - .

getWidth

public int getWidth()
Returns:
.

setWidth

public void setWidth(int width)
Parameters:
width - .

getX

public int getX()
Returns:
.

setX

public void setX(int x)
Parameters:
x - .

getY

public int getY()
Returns:
.

setY

public void setY(int y)
Parameters:
y - .

getTemplatePage

public int getTemplatePage()
Returns:
.

setTemplatePage

public void setTemplatePage(int templatePage)
Parameters:
templatePage - .

getContent

public com.google.gwt.user.client.ui.Widget getContent()
Returns:
.

setContent

public void setContent(com.google.gwt.user.client.ui.Widget content)
Parameters:
content - .

getParamName

public String getParamName()
Returns:
.

setParamName

public void setParamName(String paramName)
Parameters:
paramName - .

isLocked

public boolean isLocked()
Returns:
.

setLocked

public void setLocked(boolean locked)
Parameters:
locked - .

addMetadata

public void addMetadata(String attr,
                        String value)
Parameters:
attr - .
value - .

getAllMetadata

public List<org.gcube.portlets.d4sreporting.common.shared.Metadata> getAllMetadata()
Returns:
.

getUserComments

public String getUserComments()
Returns:

getIdInBasket

public String getIdInBasket()
Returns:
.

setIdInBasket

public void setIdInBasket(String idInBasket)
Parameters:
id - .

isDoubleColLayout

public boolean isDoubleColLayout()
Returns:
.


Copyright © 2014. All Rights Reserved.