Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Commit

Permalink
Temporary fix for issue #331 -- all JLabel fields are truncated to a …
Browse files Browse the repository at this point in the history
…maximum of 20 characters.
  • Loading branch information
Jim committed May 14, 2014
1 parent 5f1f3cb commit e7dcc0d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,20 @@ public void actionPerformed(ActionEvent ae) {
return button;
}

public void simpleEllipsify(){
for(String k : keyValueComponentMap.keySet()){
JComponent comp = getComponent(k);
if(comp instanceof JLabel){
JLabel l = (JLabel)comp;
String s = l.getText();
if(s.length() > 25){
s = s.substring(0, 20)+"...";
}
l.setText(s);
}

}
}
public void ellipsifyValues(int width) {
int maxKeyWidth = 0;
int[] maxAdditionalColumnsWidth = new int[additionalColumns];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private void relayout() {
public void actionPerformed(ActionEvent ae) {
try {
// // URI uri = URI.create(MedSavantFrame.FEEDBACK_URI);
Desktop.getDesktop().mail(WebResources.USERGUIDE_URL.toURI());
Desktop.getDesktop().mail(WebResources.FEEDBACK_URL.toURI());
} catch (Exception ex) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ public void setVariantRecord(VariantRecord r) {

p.setValue(KEY_QUAL, ViewUtil.numToString(r.getQual()));
p.setValue(KEY_DBSNP, checkNull(r.getDbSNPID()));
p.ellipsifyValues(StaticInspectorPanel.INSPECTOR_INNER_WIDTH);
//p.ellipsifyValues(StaticInspectorPanel.INSPECTOR_INNER_WIDTH);
p.simpleEllipsify();

KeyValuePairPanel infoPanel = getInfoKVPPanel(r.getCustomInfo());
infoPanel.ellipsifyValues(StaticInspectorPanel.INSPECTOR_INNER_WIDTH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public void actionPerformed(ActionEvent ae) {

col++;
p.setAdditionalColumn(KEY_POSITION, col, genomeBrowserButton);

}
return p;
}
Expand Down Expand Up @@ -280,14 +279,16 @@ public void setSimpleVariant(SimpleVariant r) {
}

selectedVariant = r;
p.setValue(KEY_POSITION, r.getChromosome() + ":" + ViewUtil.numToString(r.getStartPosition())+" - "+r.getEndPosition());

String posVal = r.getChromosome() + ":" + ViewUtil.numToString(r.getStartPosition())+" - "+r.getEndPosition();
p.setValue(KEY_POSITION, posVal);
p.setValue(KEY_REF, r.getReference());
p.setValue(KEY_ALT, r.getAlternate());

p.setValue(KEY_TYPE, checkNull(r.getType()));

p.ellipsifyValues(StaticInspectorPanel.INSPECTOR_INNER_WIDTH);

p.simpleEllipsify();
// p.ellipsifyValues(StaticInspectorPanel.INSPECTOR_INNER_WIDTH);
generateGeneIntersections(r);
}
}

0 comments on commit e7dcc0d

Please sign in to comment.