BrightSide Workbench Full Report + Source Code
org.turro.zkoss.text.Link Class Reference
Inheritance diagram for org.turro.zkoss.text.Link:
Collaboration diagram for org.turro.zkoss.text.Link:

Public Member Functions

 Link (WikiElement wikiElement)
 
String getFileFolder ()
 
void setFileFolder (String fileFolder)
 
void setReadOnlyRepository (boolean readOnlyRepository)
 
void setNoTreeRepository (boolean noTreeRepository)
 
boolean renderResult ()
 
void onFindFile ()
 

Detailed Description

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

Definition at line 43 of file Link.java.

Constructor & Destructor Documentation

◆ Link()

org.turro.zkoss.text.Link.Link ( WikiElement  wikiElement)

Definition at line 54 of file Link.java.

54  {
55  HashMap args = new HashMap();
56  args.put("el_label", I_.compatibilityMap());
57  args.put("i_", I_.api());
58  args.put("i", I_.map());
59  args.put("k", I_.byKeyMap());
60  Executions.createComponents("/WEB-INF/_zul/bs/comps/editor/link.zul", this, args);
61  Selectors.wireComponents(this, this, false);
62  Selectors.wireEventListeners(this, this);
63  this.wikiElement = wikiElement;
64  initiate();
65  }
Here is the call graph for this function:

Member Function Documentation

◆ getFileFolder()

String org.turro.zkoss.text.Link.getFileFolder ( )

Definition at line 67 of file Link.java.

67  {
68  return fileFolder;
69  }

◆ onFindFile()

void org.turro.zkoss.text.Link.onFindFile ( )

Definition at line 98 of file Link.java.

98  {
99  final RepositoryWalker repositories = new RepositoryWalker(null);
100 
101  repositories.selectFolder(fileFolder);
102  repositories.setFilter(RepositoryContent.FILE_FILTER);
103  repositories.setReadOnlyRepository(readOnlyRepository);
104  repositories.setNoTreeRepository(noTreeRepository);
105  SelectionDialog.showComponent(getPage(), I_.get("Repository"), repositories, "90%", "90%", new Command() {
106  @Override
107  public Object execute(Context context) {
108  File result = repositories.getResult();
109  if(result != null) {
110  link.setValue(ElephantContext.getRootWebPath() + ElephantContext.getRelativePath(result.getAbsolutePath()));
111  content.setValue(result.getName());
112  }
113  return null;
114  }
115  });
116  }
Here is the call graph for this function:

◆ renderResult()

boolean org.turro.zkoss.text.Link.renderResult ( )

Definition at line 83 of file Link.java.

83  {
84  wikiElement.getAttributes().clear();
85  wikiElement.addNoValuedAttribute(link.getValue().replaceAll("\\:", "\\\\\\:"));
86  String sclass = cssClass.getSelectedItem() == null ? "" : cssClass.getSelectedItem().getLabel();
87  wikiElement.setContent(content.getValue());
88  if(!Strings.isBlank(sclass)) {
89  wikiElement.addClass(sclass);
90  }
91  if(newTab.isChecked()) {
92  wikiElement.getAttributes().put("&target", "_blank");
93  }
94  return wikiElement.render();
95  }
void addNoValuedAttribute(String value)
HashMap< String, String > getAttributes()
void setContent(String content)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFileFolder()

void org.turro.zkoss.text.Link.setFileFolder ( String  fileFolder)

Definition at line 71 of file Link.java.

71  {
72  this.fileFolder = fileFolder;
73  }
Here is the caller graph for this function:

◆ setNoTreeRepository()

void org.turro.zkoss.text.Link.setNoTreeRepository ( boolean  noTreeRepository)

Definition at line 79 of file Link.java.

79  {
80  this.noTreeRepository = noTreeRepository;
81  }
Here is the caller graph for this function:

◆ setReadOnlyRepository()

void org.turro.zkoss.text.Link.setReadOnlyRepository ( boolean  readOnlyRepository)

Definition at line 75 of file Link.java.

75  {
76  this.readOnlyRepository = readOnlyRepository;
77  }
Here is the caller graph for this function:

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