|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.portlets.user.templates.client.model.TemplateModel
public class TemplateModel
The TemplateModel class represents the current Template state, the model in the the MVC pattern
| Field Summary | |
|---|---|
static String |
DEFAULT_NAME
DEFAULT_NAME |
static int |
OLD_TEMPLATE_WIDTH
default w and h |
static int |
TEMPLATE_HEIGHT
TEMPLATE_HEIGHT |
static int |
TEMPLATE_WIDTH
|
| Constructor Summary | |
|---|---|
TemplateModel()
Constructs a Default Template Model |
|
| Method Summary | |
|---|---|
void |
addComponentToModel(TemplateComponent tc,
int index)
|
TemplateSection |
discardSection(int sectNo)
|
String |
getAuthor()
|
int |
getColumnWidth()
|
int |
getCurrentPage()
|
Date |
getDateCreated()
|
Date |
getLastEdit()
|
String |
getLastEditBy()
|
int |
getMarginBottom()
|
int |
getMarginLeft()
|
int |
getMarginRight()
|
int |
getMarginTop()
|
List<org.gcube.portlets.d4sreporting.common.shared.Metadata> |
getMetadata()
metadata |
TemplateServiceAsync |
getModelService()
|
Coords |
getNewInsertionPoint(int currSection)
set the insertion point after the last inserted element |
Vector<TemplateComponent> |
getOthersPageTC(com.google.gwt.user.client.ui.Widget toCheck)
Returns the other page coomponents in the page except me |
int |
getPageHeight()
|
int |
getPageWidth()
|
TemplateSection |
getSection(int pageNo)
|
List<TemplateComponent> |
getSectionComponent(int pageNo)
|
String |
getTemplateName()
|
int |
getTotalPages()
|
void |
importSectionInModel(Presenter controller,
org.gcube.portlets.d4sreporting.common.shared.Model toLoad,
int sectionNoToimport,
int beforeSection,
boolean asLastSection)
generally used when reaing a model form disk |
void |
insertNewPage()
|
void |
loadModel(org.gcube.portlets.d4sreporting.common.shared.Model toLoad,
Presenter controller)
generally used when reading a model from disk |
void |
lockComponent(com.google.gwt.user.client.ui.Widget toLock,
boolean locked)
look for the model in the current section and edits its size |
TemplateComponent |
removeComponentFromModel(com.google.gwt.user.client.ui.Widget toRemove)
|
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 |
resetModelInSession()
|
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 |
serializeModel(String basketidToSaveIn)
|
void |
setAuthor(String author)
|
void |
setColumnWidth(int columnWidth)
|
void |
setCurrentPage(int currentPage)
|
void |
setDateCreated(Date dateCreated)
|
void |
setLastEdit(Date lastEdit)
|
void |
setLastEditBy(String lastEditBy)
|
void |
setMarginBottom(int marginBottom)
|
void |
setMarginLeft(int marginLeft)
|
void |
setMarginRight(int marginRight)
|
void |
setMarginTop(int marginTop)
|
void |
setPageHeight(int pageHeight)
|
void |
setPageWidth(int pageWidth)
|
void |
setTemplateName(String templateName)
|
void |
setTotalPages(int totalPages)
|
void |
storeInSession()
stores the current model in the session |
void |
updateModelComponentIndex(com.google.gwt.user.client.ui.Widget toUpdate,
int newIndex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OLD_TEMPLATE_WIDTH
public static final int TEMPLATE_WIDTH
public static final int TEMPLATE_HEIGHT
public static final String DEFAULT_NAME
| Constructor Detail |
|---|
public TemplateModel()
| Method Detail |
|---|
public void addComponentToModel(TemplateComponent tc,
int index)
tc - .public TemplateComponent removeComponentFromModel(com.google.gwt.user.client.ui.Widget toRemove)
toRemove - .
public void updateModelComponentIndex(com.google.gwt.user.client.ui.Widget toUpdate,
int newIndex)
toUpdate - newIndex - public void storeInSession()
public void resetModelInSession()
public void serializeModel(String basketidToSaveIn)
public TemplateSection discardSection(int sectNo)
sectNo - the section to discard
public void resizeModelComponent(com.google.gwt.user.client.ui.Widget toResize,
int newWidth,
int newHeight)
toResize - .newWidth - .newHeight - .
public void lockComponent(com.google.gwt.user.client.ui.Widget toLock,
boolean locked)
toLock - llocked - .
public void repositionModelComponent(com.google.gwt.user.client.ui.Widget toRepos,
int newX,
int newY)
toRepos - .newX - .newY - .public void insertNewPage()
public List<TemplateComponent> getSectionComponent(int pageNo)
pageNo - .
public TemplateSection getSection(int pageNo)
pageNo - .
public void loadModel(org.gcube.portlets.d4sreporting.common.shared.Model toLoad,
Presenter controller)
toLoad - the SerializableModel instance to load in the modelcontroller - .
public void importSectionInModel(Presenter controller,
org.gcube.portlets.d4sreporting.common.shared.Model toLoad,
int sectionNoToimport,
int beforeSection,
boolean asLastSection)
toLoad - the SerializableModel instance where toget the sectionsectionNoToimport - section to import 0 -> n-1beforeSection - say where to import this section (before)asLastSection - say to import this section as last section in the curren template / reportpublic Vector<TemplateComponent> getOthersPageTC(com.google.gwt.user.client.ui.Widget toCheck)
toCheck - the tc to except
public int getCurrentPage()
public void setCurrentPage(int currentPage)
currentPage - .public int getMarginBottom()
public void setMarginBottom(int marginBottom)
marginBottom - .public int getMarginLeft()
public void setMarginLeft(int marginLeft)
marginLeft - .public int getMarginRight()
public void setMarginRight(int marginRight)
marginRight - .public int getMarginTop()
public void setMarginTop(int marginTop)
marginTop - .public int getPageHeight()
public void setPageHeight(int pageHeight)
pageHeight - .public int getPageWidth()
public void setPageWidth(int pageWidth)
pageWidth - .public String getTemplateName()
public void setTemplateName(String templateName)
templateName - .public int getTotalPages()
public void setTotalPages(int totalPages)
totalPages - .public String getAuthor()
public void setAuthor(String author)
public Date getDateCreated()
public void setDateCreated(Date dateCreated)
public Date getLastEdit()
public void setLastEdit(Date lastEdit)
public int getColumnWidth()
public void setColumnWidth(int columnWidth)
columnWidth - .public TemplateServiceAsync getModelService()
public List<org.gcube.portlets.d4sreporting.common.shared.Metadata> getMetadata()
public String getLastEditBy()
public void setLastEditBy(String lastEditBy)
public Coords getNewInsertionPoint(int currSection)
currSection -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||