Skip to content

Commit

Permalink
new database identifier look and feel
Browse files Browse the repository at this point in the history
  • Loading branch information
fabregat committed Sep 1, 2017
1 parent 252b691 commit 84cd903
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author Antonio Fabregat <[email protected]>
*/
public class DatabaseIdentifierPanel extends DetailsPanel {
// private DatabaseIdentifier databaseIdentifier;

private String reference;
private String id;
private String url;
Expand Down Expand Up @@ -45,7 +45,7 @@ public DatabaseIdentifierPanel(DetailsPanel parentPanel, PhysicalEntity pe) {
}

if (re != null){
this.reference = re.getDisplayName();
this.reference = re.getDatabaseName();
this.id = re.getIdentifier();
this.url = re.getUrl();
initialize();
Expand All @@ -60,7 +60,7 @@ public DatabaseIdentifierPanel(ReferenceEntity re) {

public DatabaseIdentifierPanel(DetailsPanel parentPanel, ReferenceEntity re) {
super(parentPanel);
this.reference = re.getDisplayName();
this.reference = re.getDatabaseName();
this.id = re.getIdentifier();
this.url = re.getUrl();
initialize();
Expand All @@ -84,22 +84,18 @@ public TreeItem asTreeItem() {

private HTMLPanel getReference(){
//noinspection NonJREEmulationClassesInClientCode
StringBuilder builder = new StringBuilder(reference);
builder.append("&nbsp;&nbsp;>>&nbsp;&nbsp;<span class=\"");
//noinspection NonJREEmulationClassesInClientCode
builder.append(reference.replaceAll(" ",""));
builder.append("\">");
builder.append(reference.substring(0, 1));
builder.append("</span>");
builder.append("&nbsp;&nbsp;[<a title=\"Go to ");
StringBuilder builder = new StringBuilder();
builder.append("-&nbsp;<a title=\"Go to ");
builder.append(reference);
builder.append(": ");
builder.append(":");
builder.append(id);
builder.append("\" target=\"_blank\" href=\"");
builder.append(url);
builder.append("\">");
builder.append(reference);
builder.append(":");
builder.append(id);
builder.append("</a>]");
builder.append("</a>");

return new HTMLPanel(builder.toString());
}
Expand Down

0 comments on commit 84cd903

Please sign in to comment.