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

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

public class TemplateSection
extends Object

The TemplateSection class represents a Template Section that can be associated to any Template

Version:
October 2009 (1.4)
Author:
Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it

Constructor Summary
TemplateSection()
           
TemplateSection(List<TemplateComponent> components, List<org.gcube.portlets.d4sreporting.common.shared.Metadata> metadata)
           
 
Method Summary
 void addCommentToComponent(com.google.gwt.user.client.ui.Widget component, String comment2Add, int visibleHeight)
          look for the model in the current page and edits its size
 void addComponent(TemplateComponent tc)
          enqueue a component
 void addMetadata(String attr, String value)
           
 void discardComments(com.google.gwt.user.client.ui.Widget component)
           
 List<TemplateComponent> getAllComponents()
           
 List<org.gcube.portlets.d4sreporting.common.shared.Metadata> getAllMetadata()
           
 TemplateComponent getComponent(int index)
           
 AddCommentEvent getComponentComments(com.google.gwt.user.client.ui.Widget component)
          look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:
 ArrayList<String> getSectionComments()
           
 boolean hasComments(com.google.gwt.user.client.ui.Widget component)
          look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:
 boolean removeComponent(TemplateComponent tc)
           
 void repositionModelComponent(com.google.gwt.user.client.ui.Widget toRepos, int newX, int newY)
          look for the model in the current section and edits its position
 void resizeModelComponent(com.google.gwt.user.client.ui.Widget toResize, int newWidth, int newHeight)
          look for the model in the current page and edits its size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateSection

public TemplateSection()
Parameters:
components -
metadata -

TemplateSection

public TemplateSection(List<TemplateComponent> components,
                       List<org.gcube.portlets.d4sreporting.common.shared.Metadata> metadata)
Parameters:
components - .
metadata - .
Method Detail

addComponent

public void addComponent(TemplateComponent tc)
enqueue a component


removeComponent

public boolean removeComponent(TemplateComponent tc)

getSectionComments

public ArrayList<String> getSectionComments()

resizeModelComponent

public void resizeModelComponent(com.google.gwt.user.client.ui.Widget toResize,
                                 int newWidth,
                                 int newHeight)
look for the model in the current page and edits its size

Parameters:
toResize - .
newWidth - .
newHeight - .

discardComments

public void discardComments(com.google.gwt.user.client.ui.Widget component)

addCommentToComponent

public void addCommentToComponent(com.google.gwt.user.client.ui.Widget component,
                                  String comment2Add,
                                  int visibleHeight)
look for the model in the current page and edits its size


hasComments

public boolean hasComments(com.google.gwt.user.client.ui.Widget component)
look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:

Returns:
true if comment is present yet false otherwise

getComponentComments

public AddCommentEvent getComponentComments(com.google.gwt.user.client.ui.Widget component)
look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:

Returns:
true if comment is present yet false otherwise

repositionModelComponent

public void repositionModelComponent(com.google.gwt.user.client.ui.Widget toRepos,
                                     int newX,
                                     int newY)
look for the model in the current section and edits its position

Parameters:
toRepos - .
newX - .
newY - .

getComponent

public TemplateComponent getComponent(int index)
Parameters:
index - .
Returns:
.

addMetadata

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

getAllMetadata

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

getAllComponents

public List<TemplateComponent> getAllComponents()
Returns:
.


Copyright © 2014. All Rights Reserved.