예제 #1
0
 /** Implement MouseListener interface highlight button state */
 public void mouseEntered(MouseEvent e) {
   super.mouseEntered(e);
   this.setBorder(BorderFactory.createLineBorder(Color.yellow));
   Comment comment = workspace.getEnv().getRenderableBlock(getBlockID()).getComment();
   comment.setVisible(true);
   comment.showOnTop();
 }
예제 #2
0
 /** Implement MouseListener interface de-highlight button state */
 public void mouseExited(MouseEvent e) {
   super.mouseExited(e);
   this.setBorder(BorderFactory.createLineBorder(Color.gray));
   Comment comment = workspace.getEnv().getRenderableBlock(getBlockID()).getComment();
   if (!isActive()) {
     comment.setVisible(false);
   }
 }