From: <mg...@us...> - 2007-11-27 19:09:12
|
Revision: 1231 http://obo.svn.sourceforge.net/obo/?rev=1231&view=rev Author: mgibson Date: 2007-11-27 11:09:14 -0800 (Tue, 27 Nov 2007) Log Message: ----------- marginal fix - clears out annot panel on sel but still shows # a little better at least Modified Paths: -------------- phenote/trunk/src/java/phenote/gui/TermInfo2.java Modified: phenote/trunk/src/java/phenote/gui/TermInfo2.java =================================================================== --- phenote/trunk/src/java/phenote/gui/TermInfo2.java 2007-11-27 18:40:05 UTC (rev 1230) +++ phenote/trunk/src/java/phenote/gui/TermInfo2.java 2007-11-27 19:09:14 UTC (rev 1231) @@ -370,7 +370,8 @@ // create the panel the whole thing will live in (including toolbars, // etc.) - this.setLayout(new BorderLayout(0,0)); + //this.setLayout(new BorderLayout(0,0)); + getComponent().setLayout(new BoxLayout(getComponent(),BoxLayout.Y_AXIS)); this.setPreferredSize(new Dimension(TERM_INFO_DEFAULT_WIDTH,TERM_INFO_DEFAULT_HEIGHT)); // create the toolbar @@ -754,13 +755,19 @@ */ public void setComponentTitleFromOBOClass (OBOClass oboClass) { String title = "Term Info: "+ oboClass.getName(); - ComponentManager.getManager().setLabel(this,title); - + // this only works and only makes sense in phenote2 with docking framework + // where each gui item has a border around it with a title - otherwise throws + // null pointer - just catch null pointer and do nothing + try { ComponentManager.getManager().setLabel(this,title); } + catch (NullPointerException x) {} } /** Listen for selection from phenote (mouse over completion list) */ private class InfoTermSelectionListener implements TermSelectionListener { public void termSelected(TermSelectionEvent e) { + + clearAnnotations(); // ??? + //navi selection is a mouseover event if (!e.isMouseOverEvent()) { // add the item to the navi history if selected from list only @@ -963,6 +970,12 @@ synonymPanel.setVisible(true); } + private void clearAnnotations() { + annotationPanel.removeAll(); + annotationPanel.validate(); + annotationPanel.repaint(); + } + private void makeAnnotationPanel(Collection<Annotation> annots) { int rowCount = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |