Skip to content

Commit

Permalink
Fixed image clipping and changed title of plugin view.
Browse files Browse the repository at this point in the history
  • Loading branch information
balhoff committed Mar 25, 2011
1 parent f82b972 commit 4d99ceb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Image Depiction View
Bundle-Name: Image Depictions View
Bundle-SymbolicName: org.nescent.protege.image;singleton:=true
Bundle-Category: protege
Bundle-Description: An alternative to the annotations view with configurable fields
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plugin>

<extension id="ImageDepictionView" point="org.protege.editor.core.application.ViewComponent">
<label value="Image Depiction View"/>
<label value="Image depictions"/>
<class value="org.nescent.protege.image.ImageDepictionView"/>
</extension>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Component getListCellRendererComponent(JList list, Object value, int inde
final Image image = row.getImage();
if (image != null) {
final int imageWidth = image.getWidth(null);
final int parentWidth = Math.max(0, list.getWidth() - 20);
final int parentWidth = Math.max(1, list.getWidth() - 80);
final int resizeWidth = (imageWidth > parentWidth) ? parentWidth : imageWidth;
this.imageLabel.setIcon((new ImageIcon(image.getScaledInstance(resizeWidth, -1, Image.SCALE_DEFAULT))));
} else {
Expand Down

0 comments on commit 4d99ceb

Please sign in to comment.