-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new database identifier look and feel
- Loading branch information
Showing
1 changed file
with
9 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
@@ -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(); | ||
|
@@ -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(); | ||
|
@@ -84,22 +84,18 @@ public TreeItem asTreeItem() { | |
|
||
private HTMLPanel getReference(){ | ||
//noinspection NonJREEmulationClassesInClientCode | ||
StringBuilder builder = new StringBuilder(reference); | ||
builder.append(" >> <span class=\""); | ||
//noinspection NonJREEmulationClassesInClientCode | ||
builder.append(reference.replaceAll(" ","")); | ||
builder.append("\">"); | ||
builder.append(reference.substring(0, 1)); | ||
builder.append("</span>"); | ||
builder.append(" [<a title=\"Go to "); | ||
StringBuilder builder = new StringBuilder(); | ||
builder.append("- <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()); | ||
} | ||
|