@@ -179,8 +179,7 @@ public final boolean loadGraph(final File nodes, final File edges)
179179 } catch (UnsupportedEncodingException e ) {
180180 e .printStackTrace ();
181181 }
182- graph .addAttribute ("ui.stylesheet" ,
183- "url('src/main/resources/stylesheet.css')" );
182+ graph .addAttribute ("ui.stylesheet" , "url('stylesheet.css')" );
184183 // System.setProperty("org.graphstream.ui.renderer",
185184 // "org.graphstream.ui.j2dviewer.J2DGraphRenderer");
186185 Viewer viewer = new Viewer (graph ,
@@ -269,6 +268,7 @@ private void notifyObservers(final DNode selectedNodeIn) {
269268 /**
270269 * {@inheritDoc} Changes to the graph graphics based on the selected node.
271270 */
271+ @ Override
272272 public final void update (final DNode newSelectedNode ) {
273273 text .setText (newSelectedNode .getContent ());
274274 // TODO change strings to constants (still have to decide in which class
@@ -363,6 +363,7 @@ class Scrolling implements MouseWheelListener {
363363 * @param e
364364 * MouseWheelEvent for which is being handled.
365365 */
366+ @ Override
366367 public void mouseWheelMoved (final MouseWheelEvent e ) {
367368 int rotation = -1 * e .getWheelRotation ();
368369 if (count > NEWLEVEL ) {
@@ -472,23 +473,25 @@ private ScrollListener(final JScrollBar scrollBar) {
472473 }
473474
474475 /** {@inheritDoc} */
476+ @ Override
475477 public void adjustmentValueChanged (final AdjustmentEvent e ) {
476- int type = e .getAdjustmentType ();
477- if (type == AdjustmentEvent .BLOCK_DECREMENT ) {
478- System .out .println ("Scroll block decr" );
479- } else if (type == AdjustmentEvent .BLOCK_INCREMENT ) {
480- System .out .println ("Scroll block incr" );
481- } else if (type == AdjustmentEvent .UNIT_DECREMENT ) {
482- System .out .println ("Scroll unit incr" );
483- } else if (type == AdjustmentEvent .UNIT_INCREMENT ) {
484- System .out .println ("Scroll unit incr" );
485- } else if (type == AdjustmentEvent .TRACK ) {
486- System .out .println ("Scroll track" );
487- System .out .println ("e.getValue() == " + e .getValue ());
488- // TODO (use this for genome location plotting?)
489- // seems to always have this adjustment event type :$
490- // http://examples.javacodegeeks.com/desktop-java/awt/event/adjustmentlistener-example
491- }
478+ // int type = e.getAdjustmentType();
479+ // if (type == AdjustmentEvent.BLOCK_DECREMENT) {
480+ // System.out.println("Scroll block decr");
481+ // } else if (type == AdjustmentEvent.BLOCK_INCREMENT) {
482+ // System.out.println("Scroll block incr");
483+ // } else if (type == AdjustmentEvent.UNIT_DECREMENT) {
484+ // System.out.println("Scroll unit incr");
485+ // } else if (type == AdjustmentEvent.UNIT_INCREMENT) {
486+ // System.out.println("Scroll unit incr");
487+ // } else if (type == AdjustmentEvent.TRACK) {
488+ // System.out.println("Scroll track");
489+ // System.out.println("e.getValue() == " + e.getValue());
490+ // // TODO (use this for genome location plotting?)
491+ // // seems to always have this adjustment event type :$
492+ // //
493+ // http://examples.javacodegeeks.com/desktop-java/awt/event/adjustmentlistener-example
494+ // }
492495 }
493496
494497 }
@@ -511,6 +514,7 @@ public GenomeHighlight() {
511514 }
512515
513516 /** {@inheritDoc} */
517+ @ Override
514518 public void update (final GenomeRow genomeRow ,
515519 final boolean genomeFilterChanged ,
516520 final boolean genomeHighlightChanged ) {
@@ -541,22 +545,25 @@ class NodeClickListener implements ViewerListener {
541545 /**
542546 * {@inheritDoc}
543547 */
548+ @ Override
544549 public void viewClosed (final String viewName ) {
545550 }
546551
547552 /**
548553 * {@inheritDoc}
549554 */
555+ @ Override
550556 public void buttonReleased (final String id ) {
551557 Event .statusBarMid ("Selected node: " + id );
558+ selectNode (graph .getNode (id ));
552559 notifyObservers (dgraph .getDNode (Integer .valueOf (id )));
553560 }
554561
555562 /**
556563 * {@inheritDoc}
557564 */
565+ @ Override
558566 public void buttonPushed (final String id ) {
559- selectNode (graph .getNode (id ));
560567 }
561568 }
562569
@@ -575,24 +582,29 @@ public void buttonPushed(final String id) {
575582 class ViewMouseListener implements MouseListener {
576583
577584 /** {@inheritDoc} */
585+ @ Override
578586 public void mouseReleased (final MouseEvent e ) {
579587 vp .pump ();
580588 }
581589
582590 /** {@inheritDoc} */
591+ @ Override
583592 public void mousePressed (final MouseEvent e ) {
584593 vp .pump ();
585594 }
586595
587596 /** {@inheritDoc} */
597+ @ Override
588598 public void mouseExited (final MouseEvent e ) {
589599 }
590600
591601 /** {@inheritDoc} */
602+ @ Override
592603 public void mouseEntered (final MouseEvent e ) {
593604 }
594605
595606 /** {@inheritDoc} */
607+ @ Override
596608 public void mouseClicked (final MouseEvent e ) {
597609 }
598610
0 commit comments