BrightSide Workbench Full Report + Source Code
org.turro.newsletter.SectionsGrid Class Reference
Inheritance diagram for org.turro.newsletter.SectionsGrid:
Collaboration diagram for org.turro.newsletter.SectionsGrid:

Public Member Functions

void setNewsletter (Newsletter newsletter)
 
void deleteSection (NewsSection newsSection)
 
void moveUp (NewsSection newsSection)
 
void moveDown (NewsSection newsSection)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 47 of file SectionsGrid.java.

Member Function Documentation

◆ deleteSection()

void org.turro.newsletter.SectionsGrid.deleteSection ( NewsSection  newsSection)

Definition at line 123 of file SectionsGrid.java.

123  {
124  EntityCollections.entities(newsletter.getNewsSections()).remove(newsSection);
125  newsSection.setNewsletter(null);
126  setNewsletter(newsletter);
127  }
void setNewsletter(Newsletter newsletter)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveDown()

void org.turro.newsletter.SectionsGrid.moveDown ( NewsSection  newsSection)

Definition at line 140 of file SectionsGrid.java.

140  {
141  for(NewsSection ns : newsletter.getNewsSections()) {
142  if(ns.getNewsOrder() == newsSection.getNewsOrder() + 1) {
143  ns.setNewsOrder(newsSection.getNewsOrder());
144  newsSection.setNewsOrder(newsSection.getNewsOrder() + 1);
145  setNewsletter(newsletter);
146  break;
147  }
148  }
149  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveUp()

void org.turro.newsletter.SectionsGrid.moveUp ( NewsSection  newsSection)

Definition at line 129 of file SectionsGrid.java.

129  {
130  for(NewsSection ns : newsletter.getNewsSections()) {
131  if(ns.getNewsOrder() == newsSection.getNewsOrder() - 1) {
132  ns.setNewsOrder(newsSection.getNewsOrder());
133  newsSection.setNewsOrder(newsSection.getNewsOrder() - 1);
134  setNewsletter(newsletter);
135  break;
136  }
137  }
138  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNewsletter()

void org.turro.newsletter.SectionsGrid.setNewsletter ( Newsletter  newsletter)

Definition at line 51 of file SectionsGrid.java.

51  {
52  this.newsletter = newsletter;
53  addRows();
54  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: