Exemplo n.º 1
0
 /**
  * Shows message in the status bar.
  *
  * @param project Current project component
  * @param message information message
  */
 public static void showStatusMessage(final Project project, final String message) {
   SwingUtilities.invokeLater(
       new Runnable() {
         @Override
         public void run() {
           if (project.isOpen()) {
             StatusBar.Info.set(message, project);
           }
         }
       });
 }
 private boolean fitsInBounds(final Rectangle rect) {
   final Container container = getParent();
   if (container instanceof JViewport) {
     final Container scrollPane = container.getParent();
     if (scrollPane instanceof JScrollPane) {
       final Rectangle rectangle =
           SwingUtilities.convertRectangle(this, rect, scrollPane.getParent());
       return scrollPane.getBounds().contains(rectangle);
     }
   }
   return true;
 }