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

Public Member Functions

void onSelectImage ()
 
void onUrlLink ()
 
void doAfterCompose (Component comp) throws Exception
 
- Public Member Functions inherited from org.turro.composer.EntityPathComposer< E >
void doBeforeComposeChildren (Component comp) throws Exception
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.composer.EntityPathComposer< E >
String entityPath
 
entity
 

Detailed Description

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

Definition at line 44 of file ImageComposer.java.

Member Function Documentation

◆ doAfterCompose()

void org.turro.newsletter.ImageComposer.doAfterCompose ( Component  comp) throws Exception

Definition at line 81 of file ImageComposer.java.

81  {
82  super.doAfterCompose(comp);
83  html.setContent(entity.getBody());
84  urlLink.setValue(entity.getBanner());
85  }

◆ onSelectImage()

void org.turro.newsletter.ImageComposer.onSelectImage ( )

Definition at line 53 of file ImageComposer.java.

53  {
54  RepositoryWalker repositories = new RepositoryWalker(null);
55  repositories.selectFolder("/_internal/files" + PublicationPU.getObjectPath(entity.getNewsletter()));
56  repositories.setFilter(RepositoryContent.IMAGE_FILTER);
57  repositories.setReadOnlyRepository(entity.getNewsletter().getId() == null);
58  repositories.setNoTreeRepository(false);
59  SelectionDialog.showComponent(getPage(), I_.get("Repository"), repositories, "90%", "90%", new Command() {
60  @Override
61  public Object execute(Context context) {
62  File result = repositories.getResult();
63  if(result != null) {
64  entity.setWiki("$no_wiki\n" + imageString(result));
65  entity.setBody(imageString(result));
66  html.setContent(entity.getBody());
67  Events.postEvent(new Event(Events.ON_CHANGE));
68  }
69  return null;
70  }
71  });
72  }
Here is the call graph for this function:

◆ onUrlLink()

void org.turro.newsletter.ImageComposer.onUrlLink ( )

Definition at line 75 of file ImageComposer.java.

75  {
76  entity.setBanner(urlLink.getValue());
77  Events.postEvent(new Event(Events.ON_CHANGE));
78  }

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