TemplateSection (gCube Templates Portlet 4.5.0-SNAPSHOT API)
Date: 2013-12-11

org.gcube.portlets.user.templates.client.model

## Class TemplateSection

- java.lang.Object
- - org.gcube.portlets.user.templates.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

    Constructors
    Constructor and Description
    `TemplateSection()`
    `TemplateSection(List<TemplateComponent> components, List<org.gcube.portlets.d4sreporting.common.shared.Metadata> metadata)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addComponent(TemplateComponent tc, int index)` add a component
    `void` | `addMetadata(String attr, String value)`
    `List<TemplateComponent>` | `getAllComponents()`
    `List<org.gcube.portlets.d4sreporting.common.shared.Metadata>` | `getAllMetadata()`
    `TemplateComponent` | `getComponent(int index)`
    `void` | `lockComponent(com.google.gwt.user.client.ui.Widget toLock, boolean locked)` look for the model in the current page and edits its size
    `TemplateComponent` | `removeComponent(com.google.gwt.user.client.ui.Widget toRemove)` remoce a component
    `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
    `void` | `updateModelComponentIndex(com.google.gwt.user.client.ui.Widget toUpdate, int newIndex)` look for the model in the current page and edits its index, the y variable is used for the index

    - ### 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,
                          int index)

      add a component

    - #### removeComponent

          public TemplateComponent removeComponent(com.google.gwt.user.client.ui.Widget toRemove)

      remoce a component
      Parameters:
        `toRemove` -
      Returns:
        the component or null if there is not

    - #### 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` - .

    - #### updateModelComponentIndex

          public void updateModelComponentIndex(com.google.gwt.user.client.ui.Widget toUpdate,
                                       int newIndex)

      look for the model in the current page and edits its index, the y variable is used for the index
      Parameters:
        `toUpdate` -
        `newIndex` -

    - #### lockComponent

          public void lockComponent(com.google.gwt.user.client.ui.Widget toLock,
                           boolean locked)

      look for the model in the current page and edits its size
      Parameters:
        `toLock` - l
        `locked` - .

    - #### 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)

    - #### addMetadata

          public void addMetadata(String attr,
                         String value)

    - #### getAllMetadata

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

    - #### getAllComponents

          public List<TemplateComponent> getAllComponents()

Copyright © 2013. All Rights Reserved.