public static int isButtonOnScreen(final String buttonKey){
  Component onScreen;
  try {
    onScreen=BubbleWindow.findButton(buttonKey,RapidMinerGUI.getMainFrame());
  }
 catch (  NullPointerException e) {
    return OBJECT_NOT_ON_SCREEN;
  }
  if (onScreen == null) {
    return OBJECT_NOT_ON_SCREEN;
  }
  int xposition=onScreen.getLocationOnScreen().x;
  int yposition=onScreen.getLocationOnScreen().y;
  int otherXposition=xposition + onScreen.getWidth();
  int otherYposition=yposition + onScreen.getHeight();
  Window frame=RapidMinerGUI.getMainFrame();
  if (otherXposition <= frame.getWidth() && otherYposition <= frame.getHeight() && xposition > 0 && yposition > 0) {
    return OBJECT_SHOWING_ON_SCREEN;
  }
 else {
    return OBJECT_NOT_SHOWING;
  }
}

public static int isButtonOnScreen ( final String buttonKey ) { Component onScreen ; try { onScreen = BubbleWindow . findButton ( buttonKey , RapidMinerGUI . getMainFrame ( ) ) ; } catch ( NullPointerException e ) { return OBJECT_NOT_ON_SCREEN ; } if ( onScreen == null ) { return OBJECT_NOT_ON_SCREEN ; } int xposition = onScreen . getLocationOnScreen ( ) . x ; int yposition = onScreen . getLocationOnScreen ( ) . y ; int otherXposition = xposition + onScreen . getWidth ( ) ; int otherYposition = yposition + onScreen . getHeight ( ) ; Window frame = RapidMinerGUI . getMainFrame ( ) ; if ( otherXposition <= frame . getWidth ( ) && otherYposition <= frame . getHeight ( ) && xposition > 0 && yposition > 0 ) { return OBJECT_SHOWING_ON_SCREEN ; } else { return OBJECT_NOT_SHOWING ; } }
method to get to know whether the abstractbutton with the given key is on screen
